@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,178 @@
1
+ # useRefMap
2
+
3
+ Manages a collection of refs using a key-value map structure, allowing dynamic registration and retrieval of refs by their unique identifiers. Commonly used in components that need to track multiple DOM elements, such as tabs, tours, or complex navigation systems.
4
+
5
+ ## Import
6
+
7
+ ```tsx
8
+ import { useRefMap } from '@coinbase/cds-common/hooks/useRefMap'
9
+ ```
10
+
11
+ ## API
12
+
13
+ ### Parameters
14
+
15
+ The `useRefMap` hook accepts an optional configuration object:
16
+
17
+ - `options?: RefMapOptions<RefValue>` - Configuration options for the ref map
18
+ - `initialRefMap?: Record<string, RefValue>` - Optional initial map of refs
19
+
20
+ The generic type `RefValue` represents the type of values stored in the ref map (typically `HTMLElement` or a specific element type).
21
+
22
+ ### Returns
23
+
24
+ Returns a `RefMapApi<RefValue>` object with the following properties:
25
+
26
+ - `refs: Record<string, RefValue>` - The current map of all registered refs
27
+ - `getRef: (id: string) => RefValue | null` - Function to retrieve a ref by its ID
28
+ - `registerRef: (id: string, ref: RefValue) => void` - Function to register a new ref with an ID
29
+
30
+ :::tip
31
+ This hook is particularly useful when working with components that need to manage multiple refs, such as in tour guides where elements need to be highlighted, or in tab systems where tab panels need to be referenced. The hook maintains a stable reference to the ref map and its utility functions across renders.
32
+ :::
33
+
34
+ ## Examples
35
+
36
+ ### Basic usage
37
+
38
+ ```tsx live
39
+ function Example() {
40
+ const { registerRef, getRef } = useRefMap<HTMLDivElement>();
41
+ const toast = useToast();
42
+
43
+ const handleClick = () => {
44
+ // Get the element by its ID and log its dimensions
45
+ const element = getRef('box1');
46
+ if (element) {
47
+ toast.show(`Box dimensions: ${element.offsetWidth}x${element.offsetHeight}`);
48
+ }
49
+ };
50
+
51
+ return (
52
+ <VStack gap={2}>
53
+ <Box
54
+ ref={(el) => el && registerRef('box1', el)}
55
+ padding={3}
56
+ background="bgAlternate"
57
+ borderRadius={300}
58
+ >
59
+ <TextBody>This box is registered with ID 'box1'</TextBody>
60
+ </Box>
61
+ <Button onClick={handleClick}>Get Box Dimensions</Button>
62
+ </VStack>
63
+ );
64
+ }
65
+ ```
66
+
67
+ ### With Multiple Elements
68
+
69
+ ```tsx live
70
+ function Example() {
71
+ const { registerRef, getRef } = useRefMap<HTMLDivElement>();
72
+ const [activeId, setActiveId] = useState<string | null>(null);
73
+
74
+ const highlightElement = (id: string) => {
75
+ // Reset previous highlight
76
+ if (activeId) {
77
+ const prevElement = getRef(activeId);
78
+ if (prevElement) {
79
+ prevElement.style.outline = 'none';
80
+ }
81
+ }
82
+
83
+ // Highlight new element
84
+ const element = getRef(id);
85
+ if (element) {
86
+ element.style.outline = '2px solid var(--color-fgPrimary)';
87
+ setActiveId(id);
88
+ }
89
+ };
90
+
91
+ return (
92
+ <VStack gap={3}>
93
+ <HStack gap={2}>
94
+ <Button onClick={() => highlightElement('box1')}>Highlight Box 1</Button>
95
+ <Button onClick={() => highlightElement('box2')}>Highlight Box 2</Button>
96
+ <Button onClick={() => highlightElement('box3')}>Highlight Box 3</Button>
97
+ </HStack>
98
+
99
+ <VStack gap={2}>
100
+ <Box
101
+ ref={(el) => el && registerRef('box1', el)}
102
+ padding={3}
103
+ background="bgAlternate"
104
+ borderRadius={300}
105
+ >
106
+ <TextBody>Box 1</TextBody>
107
+ </Box>
108
+
109
+ <Box
110
+ ref={(el) => el && registerRef('box2', el)}
111
+ padding={3}
112
+ background="bgAlternate"
113
+ borderRadius={300}
114
+ >
115
+ <TextBody>Box 2</TextBody>
116
+ </Box>
117
+
118
+ <Box
119
+ ref={(el) => el && registerRef('box3', el)}
120
+ padding={3}
121
+ background="bgAlternate"
122
+ borderRadius={300}
123
+ >
124
+ <TextBody>Box 3</TextBody>
125
+ </Box>
126
+ </VStack>
127
+ </VStack>
128
+ );
129
+ }
130
+ ```
131
+
132
+ ### With Initial Refs
133
+
134
+ ```tsx live
135
+ function Example() {
136
+ // Create initial refs map
137
+ const box1Ref = useRef<HTMLDivElement>(null);
138
+ const box2Ref = useRef<HTMLDivElement>(null);
139
+
140
+ const initialRefs = {
141
+ box1: box1Ref.current,
142
+ box2: box2Ref.current,
143
+ };
144
+
145
+ const { refs, registerRef } = useRefMap<HTMLDivElement>({
146
+ initialRefMap: initialRefs,
147
+ });
148
+
149
+ const logRefs = () => {
150
+ console.log('Current refs:', refs);
151
+ };
152
+
153
+ return (
154
+ <VStack gap={2}>
155
+ <Box
156
+ ref={(el) => el && registerRef('box1', el)}
157
+ padding={3}
158
+ background="bgAlternate"
159
+ borderRadius={300}
160
+ >
161
+ <TextBody>Box 1</TextBody>
162
+ </Box>
163
+
164
+ <Box
165
+ ref={(el) => el && registerRef('box2', el)}
166
+ padding={3}
167
+ background="bgAlternate"
168
+ borderRadius={300}
169
+ >
170
+ <TextBody>Box 2</TextBody>
171
+ </Box>
172
+
173
+ <Button onClick={logRefs}>Log Refs</Button>
174
+ </VStack>
175
+ );
176
+ }
177
+ ```
178
+
@@ -0,0 +1,321 @@
1
+ # useTheme
2
+
3
+ Returns the currently active theme including color schemes, spacing, typography, and other design tokens.
4
+
5
+ ## Import
6
+
7
+ ```tsx
8
+ import { useTheme } from '@coinbase/cds-mobile'
9
+ ```
10
+
11
+ ## API
12
+
13
+ ### Overview
14
+
15
+ The `useTheme` hook returns the currently active theme based on the `ThemeProvider's` active color scheme. All values are optimized for React Native usage, with numeric values in points rather than rem units.
16
+
17
+ ### Parameters
18
+
19
+ None. The hook takes no parameters.
20
+
21
+ ### Returns
22
+
23
+ Returns a `Theme` object containing the following categories of design tokens:
24
+
25
+ #### Color Tokens
26
+
27
+ ##### Color Scheme
28
+
29
+ - `colorScheme`: `'light' | 'dark'`
30
+ - `spectrum`: Raw color values in RGB format (e.g., `'245,248,255'` for `blue0`)
31
+
32
+ ##### Semantic Colors
33
+
34
+ - Text Colors
35
+ - `color.fg`: Primary text color (RGB format)
36
+ - `color.fgMuted`: Secondary text color
37
+ - `color.fgInverse`: Inverted text color
38
+ - `color.fgPrimary`: Primary brand text color
39
+ - `color.fgWarning`: Warning text color
40
+ - `color.fgPositive`: Success text color
41
+ - `color.fgNegative`: Error text color
42
+
43
+ - Background Colors
44
+ - `color.bg`: Primary background color
45
+ - `color.bgAlternate`: Secondary background color
46
+ - `color.bgInverse`: Inverted background color
47
+ - `color.bgOverlay`: Semi-transparent overlay
48
+ - `color.bgPrimary`: Primary brand background
49
+ - `color.bgPrimaryWash`: Light primary background
50
+ - `color.bgSecondary`: Secondary background
51
+ - `color.bgTertiary`: Tertiary background
52
+ - `color.bgSecondaryWash`: Light secondary background
53
+ - `color.bgNegative`: Error background
54
+ - `color.bgNegativeWash`: Light error background
55
+ - `color.bgPositive`: Success background
56
+ - `color.bgPositiveWash`: Light success background
57
+ - `color.bgWarning`: Warning background
58
+ - `color.bgWarningWash`: Light warning background
59
+ - `color.currentColor`: Current color context
60
+ - `color.bgElevation1`: First level elevation background
61
+ - `color.bgElevation2`: Second level elevation background
62
+
63
+ - Line Colors
64
+ - `color.bgLine`: Default line color (semi-transparent)
65
+ - `color.bgLineHeavy`: Emphasized line color
66
+ - `color.bgLineInverse`: Inverted line color
67
+ - `color.bgLinePrimary`: Primary brand line color
68
+ - `color.bgLinePrimarySubtle`: Subtle primary line color
69
+
70
+ - Accent Colors
71
+ - `color.accentSubtleGreen`: Subtle green accent
72
+ - `color.accentBoldGreen`: Bold green accent
73
+ - `color.accentSubtleBlue`: Subtle blue accent
74
+ - `color.accentBoldBlue`: Bold blue accent
75
+ - `color.accentSubtlePurple`: Subtle purple accent
76
+ - `color.accentBoldPurple`: Bold purple accent
77
+ - `color.accentSubtleYellow`: Subtle yellow accent
78
+ - `color.accentBoldYellow`: Bold yellow accent
79
+ - `color.accentSubtleRed`: Subtle red accent
80
+ - `color.accentBoldRed`: Bold red accent
81
+ - `color.accentSubtleGray`: Subtle gray accent
82
+ - `color.accentBoldGray`: Bold gray accent
83
+ - `color.transparent`: Transparent color
84
+
85
+ #### Layout Tokens
86
+
87
+ ##### Spacing
88
+
89
+ - `space`: Object containing spacing values from `0` to `10` in points
90
+
91
+ ```tsx
92
+ {
93
+ 0: 0,
94
+ 1: 8,
95
+ 2: 16,
96
+ 3: 24,
97
+ // ...up to 10
98
+ }
99
+ ```
100
+
101
+ ##### Component Sizes
102
+
103
+ - `iconSize`: `{ xs: 8, s: 12, m: 16, l: 24 }`
104
+ - `avatarSize`: `{ s: 16, m: 20, l: 24, xl: 36, xxl: 44, xxxl: 48 }`
105
+ - `controlSize`: Form control sizes
106
+
107
+ ```tsx
108
+ {
109
+ checkboxSize: 16,
110
+ radioSize: 16,
111
+ switchWidth: 42,
112
+ switchHeight: 24,
113
+ switchThumbSize: 22,
114
+ tileSize: 92
115
+ }
116
+ ```
117
+
118
+ ##### Borders
119
+
120
+ - `borderWidth`: Values from `0` to `500` in points
121
+ - `borderRadius`: Values from `0` to `1000` in points
122
+
123
+ #### Typography Tokens
124
+
125
+ ##### Font Families
126
+
127
+ - `fontFamily`: Base font families for each text style
128
+
129
+ ```tsx
130
+ {
131
+ display1: 'CoinbaseDisplay-Regular',
132
+ display2: 'CoinbaseDisplay-Regular',
133
+ display3: 'CoinbaseDisplay-Regular',
134
+ title1: 'CoinbaseDisplay-Medium',
135
+ // ...and more variants
136
+ }
137
+ ```
138
+
139
+ - `fontFamilyMono`: Monospace font families (optional)
140
+
141
+ ```tsx
142
+ {
143
+ display1: 'CoinbaseMono-Regular',
144
+ display2: 'CoinbaseMono-Regular',
145
+ // ...and more variants
146
+ }
147
+ ```
148
+
149
+ ##### Text Styles
150
+
151
+ - `fontSize`: Font sizes in points (not rem)
152
+
153
+ ```tsx
154
+ {
155
+ display1: 64,
156
+ display2: 48,
157
+ display3: 40,
158
+ // ...and more variants
159
+ }
160
+ ```
161
+
162
+ - `fontWeight`: Font weights as React Native TextStyle values
163
+
164
+ ```tsx
165
+ {
166
+ display1: '400',
167
+ title1: '600',
168
+ // ...and more variants
169
+ }
170
+ ```
171
+
172
+ - `lineHeight`: Line heights in points (not rem)
173
+
174
+ ```tsx
175
+ {
176
+ display1: 72,
177
+ display2: 56,
178
+ // ...and more variants
179
+ }
180
+ ```
181
+
182
+ - `textTransform`: Text transformations as React Native TextStyle values
183
+
184
+ ```tsx
185
+ {
186
+ caption: 'uppercase',
187
+ body: 'none',
188
+ // ...and more variants
189
+ }
190
+ ```
191
+
192
+ #### Effect Tokens
193
+
194
+ ##### Shadows
195
+
196
+ - `shadow`: React Native shadow styles
197
+
198
+ ```tsx
199
+ {
200
+ elevation1: {
201
+ shadowColor: '#000000',
202
+ shadowOffset: { width: 0, height: 8 },
203
+ shadowOpacity: 0.02,
204
+ shadowRadius: 12
205
+ },
206
+ elevation2: {
207
+ shadowColor: '#000000',
208
+ shadowOffset: { width: 0, height: 8 },
209
+ shadowOpacity: 0.12,
210
+ shadowRadius: 24
211
+ }
212
+ }
213
+ ```
214
+
215
+ ### Notes
216
+
217
+ 1. The hook must be used within a `ThemeProvider` component, or it will throw an error.
218
+ 2. All numeric values are in points (pt) rather than rem units, optimized for React Native.
219
+ 3. Colors are provided in RGB format for text and background colors, allowing for opacity adjustments.
220
+ 4. Shadow values are provided as React Native shadow style objects, including platform-specific implementations.
221
+ 5. Font families are platform-specific font names that should be properly linked in your React Native project.
222
+
223
+ ## Examples
224
+
225
+ ### `useTheme` hook
226
+
227
+ The `useTheme` hook provides access to the current `theme` and `activeColorScheme`.
228
+
229
+ The `color` and `spectrum` objects automatically change based on the `activeColorScheme`.
230
+
231
+ ```jsx
232
+ const theme = useTheme();
233
+ theme.activeColorScheme; // "light" or "dark"
234
+ theme.spectrum; // Resolves to lightSpectrum or darkSpectrum, depends on activeColorScheme
235
+ theme.color; // Resolves to lightColor or darkColor, depends on activeColorScheme
236
+ theme.color.bgPrimary; // "rgb(0,82,255)" or "rgb(87,139,250)", depends on activeColorScheme
237
+ theme.space[2]; // 16
238
+ theme.borderRadius[200]; // 8
239
+ theme.fontSize.display3; // 40
240
+ ```
241
+
242
+ ### Basic usage
243
+
244
+ ```tsx
245
+ function Example() {
246
+ const theme = useTheme();
247
+
248
+ return (
249
+ <VStack gap={2}>
250
+ <Box padding={3} background="bgAlternate" borderRadius={300}>
251
+ <Text>Current Color Scheme: {theme.activeColorScheme}</Text>
252
+ </Box>
253
+
254
+ <Box padding={3} background="bgAlternate" borderRadius={300}>
255
+ <Text font="headline">Theme Colors</Text>
256
+ <Text>Primary: {theme.color.bgPrimary}</Text>
257
+ <Text>Background: {theme.color.bg}</Text>
258
+ <Text>Text: {theme.color.fg}</Text>
259
+ </Box>
260
+ </VStack>
261
+ );
262
+ }
263
+ ```
264
+
265
+ ### Styling with Theme values
266
+
267
+ ```tsx
268
+ function Example() {
269
+ const theme = useTheme();
270
+
271
+ const styles = StyleSheet.create({
272
+ container: {
273
+ padding: theme.space[3],
274
+ backgroundColor: theme.color.bgAlternate,
275
+ borderRadius: theme.borderRadius[300],
276
+ ...Platform.select({
277
+ ios: {
278
+ shadowColor: theme.shadow.elevation1.shadowColor,
279
+ shadowOffset: theme.shadow.elevation1.shadowOffset,
280
+ shadowOpacity: theme.shadow.elevation1.shadowOpacity,
281
+ shadowRadius: theme.shadow.elevation1.shadowRadius,
282
+ },
283
+ android: {
284
+ elevation: 1,
285
+ },
286
+ }),
287
+ },
288
+ text: {
289
+ fontSize: theme.fontSize.body,
290
+ lineHeight: theme.lineHeight.body,
291
+ fontFamily: theme.fontFamily.body,
292
+ color: theme.color.fgPrimary,
293
+ },
294
+ });
295
+
296
+ return (
297
+ <Box style={styles.container}>
298
+ <Text style={styles.text}>Styled using theme values</Text>
299
+ </Box>
300
+ );
301
+ }
302
+ ```
303
+
304
+ ### Color scheme detection
305
+
306
+ ```tsx
307
+ function Example() {
308
+ const theme = useTheme();
309
+ const isDarkMode = theme.activeColorScheme === 'dark';
310
+
311
+ return (
312
+ <Box padding={3} background={isDarkMode ? 'bgElevation1' : 'bgAlternate'} borderRadius={300}>
313
+ <Text>This box adapts to {isDarkMode ? 'dark' : 'light'} mode</Text>
314
+ <Text color={isDarkMode ? 'fgMuted' : 'fgPrimary'} font="headline">
315
+ With adaptive text colors
316
+ </Text>
317
+ </Box>
318
+ );
319
+ }
320
+ ```
321
+
@@ -0,0 +1,139 @@
1
+
2
+ # CDS Routes
3
+
4
+ ## Getting Started
5
+
6
+ - [theming](mobile/getting-started/theming.txt): The theme contains design tokens like colors, fonts, spacing, and more. The ThemeProvider provides access to these values via CSS Variables for web, and React Context for both web and React Native.
7
+ - [styling](mobile/getting-started/styling.txt): CDS includes powerful and flexible APIs for styling components. Easily access values from the theme, or go rogue with full customization.
8
+ - [playground](mobile/getting-started/playground.txt)
9
+ - [introduction](mobile/getting-started/introduction.txt)
10
+ - [installation](mobile/getting-started/installation.txt): This guide will help you get started with installing CDS in your React Native project. Follow the instructions below to set up CDS and start building with our cross-platform components.
11
+ - [ai-overview](mobile/getting-started/ai-overview.txt)
12
+
13
+ ## Components
14
+
15
+ - [Text](mobile/components/Text.txt): A generic text element.
16
+ - [Tag](mobile/components/Tag.txt): A small label for categorizing or labeling content.
17
+ - [Link](mobile/components/Link.txt): A pressable Text component.
18
+ - [Tray](mobile/components/Tray.txt): An elevated container pinned to the bottom of the screen.
19
+ - [Tooltip](mobile/components/Tooltip.txt): A component that displays additional information on press.
20
+ - [Toast](mobile/components/Toast.txt): A temporary notification that appears at the bottom of the screen.
21
+ - [PortalProvider](mobile/components/PortalProvider.txt): A component that manages the rendering of portals for overlay components.
22
+ - [Overlay](mobile/components/Overlay.txt): A semi-transparent layer that covers content.
23
+ - [ModalHeader](mobile/components/ModalHeader.txt): A component that provides a consistent header section for Modal.
24
+ - [ModalFooter](mobile/components/ModalFooter.txt): A footer component for Modal.
25
+ - [ModalBody](mobile/components/ModalBody.txt): A main content area component for Modal.
26
+ - [Modal](mobile/components/Modal.txt): A component that displays content in a window that requires user interaction.
27
+ - [Alert](mobile/components/Alert.txt): A dialog that communicates critical information and blocks user interaction.
28
+ - [ThemeProvider](mobile/components/ThemeProvider.txt): Provides the theme context to all child components.
29
+ - [DotSymbol](mobile/components/DotSymbol.txt): Dots are component adornments, typically used to communicate a numerical value or indicate the status or identity of a component to the end-user.
30
+ - [DotStatusColor](mobile/components/DotStatusColor.txt): Dots are component adornments, typically used to communicate a numerical value or indicate the status or identity of a component to the end-user.
31
+ - [DotCount](mobile/components/DotCount.txt): Dots are component adornments, typically used to communicate a numerical value or indicate the status or identity of a component to the end-user.
32
+ - [DatePicker](mobile/components/DatePicker.txt): Date Picker allows our global users to input past, present, future and important dates into our interface in a simple and intuitive manner. Date Picker offers both manual and calendar entry options - accommodating both internationalization and accessibility needs while being adaptable across screen platforms.
33
+ - [RollingNumber](mobile/components/RollingNumber.txt): A numeric display that animates value changes with rolling digits.
34
+ - [Tour](mobile/components/Tour.txt): Creates guided tours of a user interface.
35
+ - [TopNavBar](mobile/components/TopNavBar.txt): A customizable top navigation bar that can contain start, middle, and end content, as well as a bottom section for elements like tabs. It remains sticky at the top of the screen.
36
+ - [Tabs](mobile/components/Tabs.txt): Tabs is a flexible, accessible tab navigation component for React Native, supporting animated indicators, custom tab components, and full accessibility.
37
+ - [TabbedChips](mobile/components/TabbedChips.txt): Tab chips are to be used in a filter setting where the user is given the ability to refine the data source they are accessing.
38
+ - [TabNavigation](mobile/components/TabNavigation.txt): Organizes content across different screens or data sets.
39
+ - [TabLabel](mobile/components/TabLabel.txt): A text label component used within tab navigation.
40
+ - [TabIndicator](mobile/components/TabIndicator.txt): A visual indicator that shows the active tab position.
41
+ - [Stepper](mobile/components/Stepper.txt): A component that visualizes states within a multi-step process.
42
+ - [SegmentedTabs](mobile/components/SegmentedTabs.txt): Switches between different views of content.
43
+ - [SectionHeader](mobile/components/SectionHeader.txt): A header component used to organize and label sections of content, with support for icons, descriptions, and additional content, optimized for mobile platforms.
44
+ - [PageHeader](mobile/components/PageHeader.txt): Page Header is a flexible header component.
45
+ - [PageFooter](mobile/components/PageFooter.txt): PageFooter is a layout component that provides a consistent footer area for pages, with centered alignment and fixed height, typically used for action buttons or navigation elements.
46
+ - [NavigationTitleSelect](mobile/components/NavigationTitleSelect.txt): A select component styled as a navigation title, allowing users to switch between different views or contexts from the header. It opens a Tray on mobile.
47
+ - [NavigationTitle](mobile/components/NavigationTitle.txt): A component used to display a title within a navigation bar, with default styling for headlines.
48
+ - [Coachmark](mobile/components/Coachmark.txt): Coachmark is a flexible, accessible overlay component for onboarding, feature tours, and contextual help in React Native apps. It supports custom content, actions, and media.
49
+ - [BrowserBar](mobile/components/BrowserBar.txt): A navigation bar designed for browser-like interfaces, featuring slots for start, end, and central content. It provides a structured layout for controls and information within a browser context.
50
+ - [SubBrandLogoWordMark](mobile/components/SubBrandLogoWordMark.txt): Coinbase sub-brand logo wordmarks for specialized branding.
51
+ - [SubBrandLogoMark](mobile/components/SubBrandLogoMark.txt): Coinbase sub-brand logo marks for specialized branding.
52
+ - [SpotSquare](mobile/components/SpotSquare.txt): A square-shaped illustration component for displaying spot graphics.
53
+ - [SpotRectangle](mobile/components/SpotRectangle.txt): A rectangular illustration component for displaying spot graphics.
54
+ - [SpotIcon](mobile/components/SpotIcon.txt): An icon-sized illustration component for displaying spot graphics.
55
+ - [RemoteImageGroup](mobile/components/RemoteImageGroup.txt): A component to display a group of RemoteImage components in a stack.
56
+ - [RemoteImage](mobile/components/RemoteImage.txt): A React component for displaying different types of images, including network images, static resources, temporary local images, and images from local disk, such as the camera roll.
57
+ - [Pictogram](mobile/components/Pictogram.txt): Displays elevated product icons.
58
+ - [LogoWordMark](mobile/components/LogoWordMark.txt): The full Coinbase logo with text for branding.
59
+ - [LogoMark](mobile/components/LogoMark.txt): The Coinbase logo mark for branding.
60
+ - [Icon](mobile/components/Icon.txt): Displays icons from the icon font.
61
+ - [HeroSquare](mobile/components/HeroSquare.txt): Displays a square-shaped hero illustration.
62
+ - [CellMedia](mobile/components/CellMedia.txt): Displays media within cells.
63
+ - [Avatar](mobile/components/Avatar.txt): Avatar is a visual representation of a user, company, or entity.
64
+ - [VStack](mobile/components/VStack.txt): A Box with flexDirection="column" set by default.
65
+ - [Spacer](mobile/components/Spacer.txt): Creates space between elements.
66
+ - [MultiContentModule](mobile/components/MultiContentModule.txt): A versatile container designed to streamline user experiences across Critical User Journeys. Accommodates a range of content including an illustration, input fields (text inputs, list cells, etc.), and an action button.
67
+ - [HStack](mobile/components/HStack.txt): A Box with flexDirection="row" set by default.
68
+ - [Divider](mobile/components/Divider.txt): Separates content into sections.
69
+ - [Collapsible](mobile/components/Collapsible.txt): A container that can be expanded or collapsed.
70
+ - [Carousel](mobile/components/Carousel.txt): A flexible carousel component for displaying sequences of content with navigation and pagination options.
71
+ - [ButtonGroup](mobile/components/ButtonGroup.txt): Groups buttons with consistent spacing.
72
+ - [Box](mobile/components/Box.txt): A generic container, like a supercharged View.
73
+ - [AccordionItem](mobile/components/AccordionItem.txt): An individual collapsible item within an Accordion.
74
+ - [Accordion](mobile/components/Accordion.txt): A collapsible component for displaying auxiliary content.
75
+ - [TextInput](mobile/components/TextInput.txt): A control for entering text.
76
+ - [Switch](mobile/components/Switch.txt): A control for toggling between on and off.
77
+ - [SlideButton](mobile/components/SlideButton.txt): A button that slides to confirm an action.
78
+ - [SelectOption](mobile/components/SelectOption.txt): A single option of a Select component.
79
+ - [SelectChip](mobile/components/SelectChip.txt): A Chip and Select control for selecting from a list of options
80
+ - [Select](mobile/components/Select.txt): A control for selecting from a list of options.
81
+ - [SearchInput](mobile/components/SearchInput.txt): A control for searching a dataset.
82
+ - [RadioGroup](mobile/components/RadioGroup.txt): Radio is a control component that allows users to select one option from a set.
83
+ - [RadioCell](mobile/components/RadioCell.txt): A selectable cell that pairs a radio button with a title and description for single-choice selections.
84
+ - [Radio](mobile/components/Radio.txt): Radio is a control component that allows users to select one option from a set of mutually exclusive options.
85
+ - [Pressable](mobile/components/Pressable.txt): Extends the Interactable component to add accessibility support for press interactions.
86
+ - [Numpad](mobile/components/Numpad.txt): A keypad for entering numbers.
87
+ - [Interactable](mobile/components/Interactable.txt): A generic component for creating interactable elements. Provides dynamic styling for hovered, pressed, and disabled states.
88
+ - [InputChip](mobile/components/InputChip.txt): A Chip used for removable selections.
89
+ - [IconButton](mobile/components/IconButton.txt): A Button with an Icon for content.
90
+ - [ControlGroup](mobile/components/ControlGroup.txt): A layout component that arranges and manages a group of related controls, such as radio buttons, switches, or checkboxes.
91
+ - [Chip](mobile/components/Chip.txt): A compact, interactive content element.
92
+ - [CheckboxGroup](mobile/components/CheckboxGroup.txt): CheckboxGroup is a control component that allows users to select multiple options from a set of choices. It manages the state and layout of multiple checkbox inputs as a cohesive group.
93
+ - [CheckboxCell](mobile/components/CheckboxCell.txt): A selectable cell that pairs a checkbox with a title and description for multi-choice selections.
94
+ - [Checkbox](mobile/components/Checkbox.txt): Checkbox is a type of control component that allows user to select one or more options from a set. They can also be used alone to switch between on and off.
95
+ - [Button](mobile/components/Button.txt): A pressable button element.
96
+ - [AvatarButton](mobile/components/AvatarButton.txt): A pressable Avatar.
97
+ - [YAxis](mobile/components/YAxis.txt): A vertical axis component for CartesianChart. Displays tick marks, labels, gridlines, and supports custom formatting, positioning, and data domains.
98
+ - [XAxis](mobile/components/XAxis.txt): A horizontal axis component for CartesianChart. Displays tick marks, labels, gridlines, and supports custom formatting, positioning, and data domains.
99
+ - [SparklineInteractiveHeader](mobile/components/SparklineInteractiveHeader.txt): The SparklineInteractiveHeader is used to display chart information that changes over time
100
+ - [SparklineInteractive](mobile/components/SparklineInteractive.txt): The SparklineInteractive is used to display a Sparkline that has multiple time periods
101
+ - [SparklineGradient](mobile/components/SparklineGradient.txt): A small line chart component with gradient fill below the line.
102
+ - [Sparkline](mobile/components/Sparkline.txt): A small line chart component for displaying data trends.
103
+ - [Scrubber](mobile/components/Scrubber.txt): An interactive scrubber component for exploring individual data points in charts. Displays values on hover or drag and supports custom labels and formatting.
104
+ - [ReferenceLine](mobile/components/ReferenceLine.txt): A horizontal or vertical reference line to mark important values on a chart, such as targets, thresholds, or baseline values.
105
+ - [Point](mobile/components/Point.txt): Visual markers that highlight specific data values on a chart. Points can be customized with different colors, sizes, and interactivity.
106
+ - [PeriodSelector](mobile/components/PeriodSelector.txt): A selector component for choosing time periods in charts.
107
+ - [LineChart](mobile/components/LineChart.txt): A flexible line chart component for displaying data trends over time. Supports multiple series, custom curves, areas, scrubbing, and interactive data exploration.
108
+ - [CartesianChart](mobile/components/CartesianChart.txt): A flexible, low-level chart component for displaying data in an x/y coordinate space. Provides a foundation for building custom chart visualizations with full control over rendering.
109
+ - [BarChart](mobile/components/BarChart.txt): A bar chart component for comparing values across categories. Supports horizontal and vertical orientations, stacked bars, and grouped series.
110
+ - [AreaChart](mobile/components/AreaChart.txt): A chart component that displays data as filled areas beneath lines. Ideal for showing cumulative values, stacked data, or emphasizing volume over time.
111
+ - [Spinner](mobile/components/Spinner.txt): A component that displays a spinning animation.
112
+ - [ProgressCircle](mobile/components/ProgressCircle.txt): A circular visual indicator of completion progress.
113
+ - [ProgressBarWithFloatLabel](mobile/components/ProgressBarWithFloatLabel.txt): A ProgressBar with a floating label that moves with progress.
114
+ - [ProgressBarWithFixedLabels](mobile/components/ProgressBarWithFixedLabels.txt): A ProgressBar with fixed labels at defined positions.
115
+ - [ProgressBar](mobile/components/ProgressBar.txt): A visual indicator of completion progress.
116
+ - [Fallback](mobile/components/Fallback.txt): A component that displays a fallback animation.
117
+ - [Banner](mobile/components/Banner.txt): Displays important messages and actions to users.
118
+ - [ListCell](mobile/components/ListCell.txt): A versatile cell component used for displaying content in a list format, supporting various layouts and interactions.
119
+ - [ContentCell](mobile/components/ContentCell.txt): A versatile cell component for displaying content with optional metadata.
120
+ - [UpsellCard](mobile/components/UpsellCard.txt): Upsell Cards are used to promote new features, products, or actions within the app. They are part of the upsell framework and aim to drive user engagement and revenue.
121
+ - [NudgeCard](mobile/components/NudgeCard.txt): A card component designed to encourage users to take essential actions.
122
+ - [FloatingAssetCard](mobile/components/FloatingAssetCard.txt): Asset Cards display current and potential future assets, offering a straightforward method to view and manage a customer's holdings. They provide a clear visual and informative overview, simplifying asset management and investment considerations.
123
+ - [ContentCardHeader](mobile/components/ContentCardHeader.txt): ContentCardHeader is a subcomponent of ContentCard that provides the header section of the card, typically used for the title and subtitle.
124
+ - [ContentCardFooter](mobile/components/ContentCardFooter.txt): ContentCardFooter is a subcomponent of ContentCard that provides the footer section of the card, typically used for actions or additional information.
125
+ - [ContentCardBody](mobile/components/ContentCardBody.txt): ContentCardBody is a subcomponent of ContentCard that provides the main content area of the card.
126
+ - [ContentCard](mobile/components/ContentCard.txt): A flexible card component for displaying content with header, body, and footer sections.
127
+ - [ContainedAssetCard](mobile/components/ContainedAssetCard.txt): Asset Cards display current and potential future assets, offering a straightforward method to view and manage a customer's holdings. They provide a clear visual and informative overview, simplifying asset management and investment considerations.
128
+ - [LottieStatusAnimation](mobile/components/LottieStatusAnimation.txt): A specialized component for displaying trade status animations.
129
+ - [Lottie](mobile/components/Lottie.txt): Renders After Effects animations as vectors.
130
+
131
+ ## Hooks
132
+
133
+ - [useTheme](mobile/hooks/useTheme.txt): Returns the currently active theme including color schemes, spacing, typography, and other design tokens.
134
+ - [useRefMap](mobile/hooks/useRefMap.txt): Manages a collection of refs using a key-value map structure, allowing dynamic registration and retrieval of refs by their unique identifiers. Commonly used in components that need to track multiple DOM elements, such as tabs, tours, or complex navigation systems.
135
+ - [usePreviousValue](mobile/hooks/usePreviousValue.txt): Returns the previous value of a given variable, useful for comparing current and previous states in effects or for tracking changes over time.
136
+ - [useOverlayContentContext](mobile/hooks/useOverlayContentContext.txt): A React context and hook for detecting if components are rendered inside overlay containers like modals, drawers, tours, and trays.
137
+ - [useMergeRefs](mobile/hooks/useMergeRefs.txt): Combines multiple refs into a single ref callback, allowing a component to work with multiple ref instances simultaneously. Useful when you need to combine refs from different sources, such as forwarded refs and internal component state.
138
+ - [useEventHandler](mobile/hooks/useEventHandler.txt): Creates event handlers for components based on the EventHandlerProvider configuration. It enables centralized event handling and analytics tracking by mapping component actions to configured handlers.
139
+ - [useDimensions](mobile/hooks/useDimensions.txt): Measures the screen dimensions and status bar height.