@tempoxyz/ds 0.3.1 → 0.3.2

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 (345) hide show
  1. package/dist/web/components/Accordion.css +1 -1
  2. package/dist/web/components/Accordion.js.zyzz.json +1 -1
  3. package/dist/web/components/AddressCard.css +1 -0
  4. package/dist/web/components/AddressCard.d.ts +85 -0
  5. package/dist/web/components/AddressCard.d.ts.map +1 -0
  6. package/dist/web/components/AddressCard.js +79 -0
  7. package/dist/web/components/AddressCard.js.map +1 -0
  8. package/dist/web/components/AddressCard.js.zyzz.json +1 -0
  9. package/dist/web/components/AgentLogo.js +1 -1
  10. package/dist/web/components/AgentLogo.js.map +1 -1
  11. package/dist/web/components/AgentLogo.js.zyzz.json +1 -1
  12. package/dist/web/components/Alert.css +1 -1
  13. package/dist/web/components/Alert.js.zyzz.json +1 -1
  14. package/dist/web/components/AlertDialog.js.zyzz.json +1 -1
  15. package/dist/web/components/Amount.css +1 -1
  16. package/dist/web/components/Amount.js.zyzz.json +1 -1
  17. package/dist/web/components/AmountInput.css +1 -1
  18. package/dist/web/components/AmountInput.d.ts +1 -1
  19. package/dist/web/components/AmountInput.d.ts.map +1 -1
  20. package/dist/web/components/AmountInput.js.zyzz.json +1 -1
  21. package/dist/web/components/AppShell.css +1 -1
  22. package/dist/web/components/AppShell.d.ts +21 -3
  23. package/dist/web/components/AppShell.d.ts.map +1 -1
  24. package/dist/web/components/AppShell.js +74 -32
  25. package/dist/web/components/AppShell.js.map +1 -1
  26. package/dist/web/components/AppShell.js.zyzz.json +1 -1
  27. package/dist/web/components/AssetChip.css +1 -1
  28. package/dist/web/components/AssetChip.d.ts.map +1 -1
  29. package/dist/web/components/AssetChip.js.map +1 -1
  30. package/dist/web/components/AssetChip.js.zyzz.json +1 -1
  31. package/dist/web/components/Autocomplete.js.zyzz.json +1 -1
  32. package/dist/web/components/Avatar.css +1 -1
  33. package/dist/web/components/Avatar.d.ts +68 -6
  34. package/dist/web/components/Avatar.d.ts.map +1 -1
  35. package/dist/web/components/Avatar.js +27 -7
  36. package/dist/web/components/Avatar.js.map +1 -1
  37. package/dist/web/components/Avatar.js.zyzz.json +1 -1
  38. package/dist/web/components/Badge.css +1 -1
  39. package/dist/web/components/Badge.d.ts +48 -0
  40. package/dist/web/components/Badge.d.ts.map +1 -1
  41. package/dist/web/components/Badge.js +5 -3
  42. package/dist/web/components/Badge.js.map +1 -1
  43. package/dist/web/components/Badge.js.zyzz.json +1 -1
  44. package/dist/web/components/Banner.js.zyzz.json +1 -1
  45. package/dist/web/components/BarChart.css +1 -1
  46. package/dist/web/components/BarChart.js.zyzz.json +1 -1
  47. package/dist/web/components/Breadcrumbs.css +1 -1
  48. package/dist/web/components/Breadcrumbs.js.zyzz.json +1 -1
  49. package/dist/web/components/Button.css +1 -1
  50. package/dist/web/components/Button.d.ts +72 -6
  51. package/dist/web/components/Button.d.ts.map +1 -1
  52. package/dist/web/components/Button.js +5 -3
  53. package/dist/web/components/Button.js.map +1 -1
  54. package/dist/web/components/Button.js.zyzz.json +1 -1
  55. package/dist/web/components/ButtonGroup.js.zyzz.json +1 -1
  56. package/dist/web/components/Calendar.css +1 -1
  57. package/dist/web/components/Calendar.js.zyzz.json +1 -1
  58. package/dist/web/components/Callout.css +1 -0
  59. package/dist/web/components/Callout.d.ts +23 -0
  60. package/dist/web/components/Callout.d.ts.map +1 -0
  61. package/dist/web/components/Callout.js +26 -0
  62. package/dist/web/components/Callout.js.map +1 -0
  63. package/dist/web/components/Callout.js.zyzz.json +1 -0
  64. package/dist/web/components/Checkbox.css +1 -1
  65. package/dist/web/components/Checkbox.js.zyzz.json +1 -1
  66. package/dist/web/components/CheckboxGroup.js.zyzz.json +1 -1
  67. package/dist/web/components/ChoiceGroup.css +1 -1
  68. package/dist/web/components/ChoiceGroup.d.ts +17 -10
  69. package/dist/web/components/ChoiceGroup.d.ts.map +1 -1
  70. package/dist/web/components/ChoiceGroup.js +5 -5
  71. package/dist/web/components/ChoiceGroup.js.map +1 -1
  72. package/dist/web/components/ChoiceGroup.js.zyzz.json +1 -1
  73. package/dist/web/components/Choicebox.css +1 -1
  74. package/dist/web/components/Choicebox.js.zyzz.json +1 -1
  75. package/dist/web/components/Code.css +1 -0
  76. package/dist/web/components/Code.d.ts +25 -0
  77. package/dist/web/components/Code.d.ts.map +1 -0
  78. package/dist/web/components/Code.js +28 -0
  79. package/dist/web/components/Code.js.map +1 -0
  80. package/dist/web/components/Code.js.zyzz.json +1 -0
  81. package/dist/web/components/Combobox.css +1 -1
  82. package/dist/web/components/Combobox.js.zyzz.json +1 -1
  83. package/dist/web/components/Container.js.zyzz.json +1 -1
  84. package/dist/web/components/CopyButton.d.ts +8 -1
  85. package/dist/web/components/CopyButton.d.ts.map +1 -1
  86. package/dist/web/components/CopyButton.js.map +1 -1
  87. package/dist/web/components/CopyButton.js.zyzz.json +1 -1
  88. package/dist/web/components/DatePicker.css +1 -1
  89. package/dist/web/components/DatePicker.js.zyzz.json +1 -1
  90. package/dist/web/components/Dialog.css +1 -1
  91. package/dist/web/components/Dialog.d.ts.map +1 -1
  92. package/dist/web/components/Dialog.js +1 -0
  93. package/dist/web/components/Dialog.js.map +1 -1
  94. package/dist/web/components/Dialog.js.zyzz.json +1 -1
  95. package/dist/web/components/Drawer.js.zyzz.json +1 -1
  96. package/dist/web/components/Empty.css +1 -1
  97. package/dist/web/components/Empty.js.zyzz.json +1 -1
  98. package/dist/web/components/Field.css +1 -1
  99. package/dist/web/components/Field.d.ts +41 -5
  100. package/dist/web/components/Field.d.ts.map +1 -1
  101. package/dist/web/components/Field.js +19 -13
  102. package/dist/web/components/Field.js.map +1 -1
  103. package/dist/web/components/Field.js.zyzz.json +1 -1
  104. package/dist/web/components/Fieldset.js.zyzz.json +1 -1
  105. package/dist/web/components/Frame.css +1 -1
  106. package/dist/web/components/Frame.js.zyzz.json +1 -1
  107. package/dist/web/components/Gauge.js.zyzz.json +1 -1
  108. package/dist/web/components/GetStartedVisual.css +1 -0
  109. package/dist/web/components/GetStartedVisual.d.ts +59 -0
  110. package/dist/web/components/GetStartedVisual.d.ts.map +1 -0
  111. package/dist/web/components/GetStartedVisual.js +31 -0
  112. package/dist/web/components/GetStartedVisual.js.map +1 -0
  113. package/dist/web/components/GetStartedVisual.js.zyzz.json +1 -0
  114. package/dist/web/components/Grid.js.zyzz.json +1 -1
  115. package/dist/web/components/HeroVisual.css +1 -0
  116. package/dist/web/components/HeroVisual.d.ts +96 -0
  117. package/dist/web/components/HeroVisual.d.ts.map +1 -0
  118. package/dist/web/components/HeroVisual.js +202 -0
  119. package/dist/web/components/HeroVisual.js.map +1 -0
  120. package/dist/web/components/HeroVisual.js.zyzz.json +1 -0
  121. package/dist/web/components/Hex.css +1 -1
  122. package/dist/web/components/Hex.js.zyzz.json +1 -1
  123. package/dist/web/components/IconTile.js.zyzz.json +1 -1
  124. package/dist/web/components/Identicon.js.zyzz.json +1 -1
  125. package/dist/web/components/Inline.js.zyzz.json +1 -1
  126. package/dist/web/components/Inset.js.zyzz.json +1 -1
  127. package/dist/web/components/Kbd.css +1 -1
  128. package/dist/web/components/Kbd.d.ts +8 -7
  129. package/dist/web/components/Kbd.d.ts.map +1 -1
  130. package/dist/web/components/Kbd.js +1 -1
  131. package/dist/web/components/Kbd.js.map +1 -1
  132. package/dist/web/components/Kbd.js.zyzz.json +1 -1
  133. package/dist/web/components/ListGroup.css +1 -1
  134. package/dist/web/components/ListGroup.d.ts +35 -65
  135. package/dist/web/components/ListGroup.d.ts.map +1 -1
  136. package/dist/web/components/ListGroup.js +9 -10
  137. package/dist/web/components/ListGroup.js.map +1 -1
  138. package/dist/web/components/ListGroup.js.zyzz.json +1 -1
  139. package/dist/web/components/LoadingDots.js.zyzz.json +1 -1
  140. package/dist/web/components/Menu.css +1 -1
  141. package/dist/web/components/Menu.js.zyzz.json +1 -1
  142. package/dist/web/components/NativeSelect.css +1 -0
  143. package/dist/web/components/NativeSelect.d.ts +50 -0
  144. package/dist/web/components/NativeSelect.d.ts.map +1 -0
  145. package/dist/web/components/NativeSelect.js +50 -0
  146. package/dist/web/components/NativeSelect.js.map +1 -0
  147. package/dist/web/components/NativeSelect.js.zyzz.json +1 -0
  148. package/dist/web/components/NetworkLogo.js.zyzz.json +1 -1
  149. package/dist/web/components/NumberField.css +1 -1
  150. package/dist/web/components/NumberField.js.zyzz.json +1 -1
  151. package/dist/web/components/OtpField.css +1 -1
  152. package/dist/web/components/OtpField.js.zyzz.json +1 -1
  153. package/dist/web/components/Pagination.css +1 -1
  154. package/dist/web/components/Pagination.js.zyzz.json +1 -1
  155. package/dist/web/components/Popover.css +1 -1
  156. package/dist/web/components/Popover.js.zyzz.json +1 -1
  157. package/dist/web/components/Progress.css +1 -1
  158. package/dist/web/components/Progress.d.ts +1 -1
  159. package/dist/web/components/Progress.d.ts.map +1 -1
  160. package/dist/web/components/Progress.js +2 -1
  161. package/dist/web/components/Progress.js.map +1 -1
  162. package/dist/web/components/Progress.js.zyzz.json +1 -1
  163. package/dist/web/components/Qr.js.zyzz.json +1 -1
  164. package/dist/web/components/RadioGroup.css +1 -1
  165. package/dist/web/components/RadioGroup.d.ts +1 -1
  166. package/dist/web/components/RadioGroup.js.zyzz.json +1 -1
  167. package/dist/web/components/SecretValue.css +1 -1
  168. package/dist/web/components/SecretValue.js.zyzz.json +1 -1
  169. package/dist/web/components/Select.css +1 -1
  170. package/dist/web/components/Select.d.ts +1 -1
  171. package/dist/web/components/Select.d.ts.map +1 -1
  172. package/dist/web/components/Select.js.map +1 -1
  173. package/dist/web/components/Select.js.zyzz.json +1 -1
  174. package/dist/web/components/Separator.css +1 -1
  175. package/dist/web/components/Separator.js.zyzz.json +1 -1
  176. package/dist/web/components/SidebarMenu.css +1 -1
  177. package/dist/web/components/SidebarMenu.d.ts +8 -2
  178. package/dist/web/components/SidebarMenu.d.ts.map +1 -1
  179. package/dist/web/components/SidebarMenu.js +10 -10
  180. package/dist/web/components/SidebarMenu.js.map +1 -1
  181. package/dist/web/components/SidebarMenu.js.zyzz.json +1 -1
  182. package/dist/web/components/Skeleton.js.zyzz.json +1 -1
  183. package/dist/web/components/Slider.css +1 -1
  184. package/dist/web/components/Slider.js.zyzz.json +1 -1
  185. package/dist/web/components/Snippet.css +1 -1
  186. package/dist/web/components/Snippet.js.zyzz.json +1 -1
  187. package/dist/web/components/Spinner.js.zyzz.json +1 -1
  188. package/dist/web/components/SplitBar.css +1 -1
  189. package/dist/web/components/SplitBar.js.zyzz.json +1 -1
  190. package/dist/web/components/SplitButton.css +1 -1
  191. package/dist/web/components/SplitButton.d.ts +3 -1
  192. package/dist/web/components/SplitButton.d.ts.map +1 -1
  193. package/dist/web/components/SplitButton.js +2 -2
  194. package/dist/web/components/SplitButton.js.map +1 -1
  195. package/dist/web/components/SplitButton.js.zyzz.json +1 -1
  196. package/dist/web/components/Stack.js.zyzz.json +1 -1
  197. package/dist/web/components/StatusChip.css +1 -1
  198. package/dist/web/components/StatusChip.js.zyzz.json +1 -1
  199. package/dist/web/components/StatusIndicator.css +1 -0
  200. package/dist/web/components/StatusIndicator.d.ts +74 -0
  201. package/dist/web/components/StatusIndicator.d.ts.map +1 -0
  202. package/dist/web/components/StatusIndicator.js +32 -0
  203. package/dist/web/components/StatusIndicator.js.map +1 -0
  204. package/dist/web/components/StatusIndicator.js.zyzz.json +1 -0
  205. package/dist/web/components/StatusRow.css +1 -1
  206. package/dist/web/components/StatusRow.js.zyzz.json +1 -1
  207. package/dist/web/components/Stepper.js.zyzz.json +1 -1
  208. package/dist/web/components/SuccessHero.css +1 -0
  209. package/dist/web/components/SuccessHero.d.ts +74 -0
  210. package/dist/web/components/SuccessHero.d.ts.map +1 -0
  211. package/dist/web/components/SuccessHero.js +167 -0
  212. package/dist/web/components/SuccessHero.js.map +1 -0
  213. package/dist/web/components/SuccessHero.js.zyzz.json +1 -0
  214. package/dist/web/components/Surface.css +1 -1
  215. package/dist/web/components/Surface.d.ts +3 -2
  216. package/dist/web/components/Surface.d.ts.map +1 -1
  217. package/dist/web/components/Surface.js +2 -2
  218. package/dist/web/components/Surface.js.map +1 -1
  219. package/dist/web/components/Surface.js.zyzz.json +1 -1
  220. package/dist/web/components/Switch.css +1 -1
  221. package/dist/web/components/Switch.d.ts +6 -6
  222. package/dist/web/components/Switch.d.ts.map +1 -1
  223. package/dist/web/components/Switch.js +3 -2
  224. package/dist/web/components/Switch.js.map +1 -1
  225. package/dist/web/components/Switch.js.zyzz.json +1 -1
  226. package/dist/web/components/Table.css +1 -1
  227. package/dist/web/components/Table.d.ts +85 -0
  228. package/dist/web/components/Table.d.ts.map +1 -1
  229. package/dist/web/components/Table.js +14 -6
  230. package/dist/web/components/Table.js.map +1 -1
  231. package/dist/web/components/Table.js.zyzz.json +1 -1
  232. package/dist/web/components/Tabs.css +1 -1
  233. package/dist/web/components/Tabs.d.ts +183 -6
  234. package/dist/web/components/Tabs.d.ts.map +1 -1
  235. package/dist/web/components/Tabs.js +18 -13
  236. package/dist/web/components/Tabs.js.map +1 -1
  237. package/dist/web/components/Tabs.js.zyzz.json +1 -1
  238. package/dist/web/components/TempoLogo.js +1 -1
  239. package/dist/web/components/TempoLogo.js.map +1 -1
  240. package/dist/web/components/TempoLogo.js.zyzz.json +1 -1
  241. package/dist/web/components/TextInput.css +1 -1
  242. package/dist/web/components/TextInput.d.ts +80 -2
  243. package/dist/web/components/TextInput.d.ts.map +1 -1
  244. package/dist/web/components/TextInput.js +19 -7
  245. package/dist/web/components/TextInput.js.map +1 -1
  246. package/dist/web/components/TextInput.js.zyzz.json +1 -1
  247. package/dist/web/components/Textarea.css +1 -1
  248. package/dist/web/components/Textarea.d.ts +7 -1
  249. package/dist/web/components/Textarea.d.ts.map +1 -1
  250. package/dist/web/components/Textarea.js +3 -2
  251. package/dist/web/components/Textarea.js.map +1 -1
  252. package/dist/web/components/Textarea.js.zyzz.json +1 -1
  253. package/dist/web/components/Toast.css +1 -1
  254. package/dist/web/components/Toast.d.ts +16 -3
  255. package/dist/web/components/Toast.d.ts.map +1 -1
  256. package/dist/web/components/Toast.js +29 -17
  257. package/dist/web/components/Toast.js.map +1 -1
  258. package/dist/web/components/Toast.js.zyzz.json +1 -1
  259. package/dist/web/components/Token.css +1 -1
  260. package/dist/web/components/Token.js.zyzz.json +1 -1
  261. package/dist/web/components/TokenLogo.js.zyzz.json +1 -1
  262. package/dist/web/components/Tooltip.css +1 -1
  263. package/dist/web/components/Tooltip.d.ts.map +1 -1
  264. package/dist/web/components/Tooltip.js +3 -2
  265. package/dist/web/components/Tooltip.js.map +1 -1
  266. package/dist/web/components/Tooltip.js.zyzz.json +1 -1
  267. package/dist/web/components/VerificationCode.css +1 -1
  268. package/dist/web/components/VerificationCode.js.zyzz.json +1 -1
  269. package/dist/web/components/Visual.js.zyzz.json +1 -1
  270. package/dist/web/components/internal/Field.css +1 -1
  271. package/dist/web/components/internal/Field.js.zyzz.json +1 -1
  272. package/dist/web/components/internal/GetStartedArtwork.d.ts +10 -0
  273. package/dist/web/components/internal/GetStartedArtwork.d.ts.map +1 -0
  274. package/dist/web/components/internal/GetStartedArtwork.js +11 -0
  275. package/dist/web/components/internal/GetStartedArtwork.js.map +1 -0
  276. package/dist/web/components/internal/InputGroup.js.zyzz.json +1 -1
  277. package/dist/web/components/internal/Listbox.css +1 -1
  278. package/dist/web/components/internal/Listbox.js.zyzz.json +1 -1
  279. package/dist/web/components/internal/Streaks.css +1 -0
  280. package/dist/web/components/internal/Streaks.d.ts +48 -0
  281. package/dist/web/components/internal/Streaks.d.ts.map +1 -0
  282. package/dist/web/components/internal/Streaks.js +48 -0
  283. package/dist/web/components/internal/Streaks.js.map +1 -0
  284. package/dist/web/components/internal/Streaks.js.zyzz.json +1 -0
  285. package/dist/web/components/internal/TabBar.d.ts +7 -3
  286. package/dist/web/components/internal/TabBar.d.ts.map +1 -1
  287. package/dist/web/components/internal/TabBar.js.map +1 -1
  288. package/dist/web/index.d.ts +8 -0
  289. package/dist/web/index.d.ts.map +1 -1
  290. package/dist/web/index.js +8 -0
  291. package/dist/web/index.js.map +1 -1
  292. package/dist/web/index.js.zyzz.json +1 -1
  293. package/dist/web/vars.d.ts +25 -3
  294. package/dist/web/vars.d.ts.map +1 -1
  295. package/dist/web/vars.js.map +1 -1
  296. package/dist/web/vars.js.zyzz.json +1 -1
  297. package/dist/web/zyzz.config.d.ts +125 -15
  298. package/dist/web/zyzz.config.d.ts.map +1 -1
  299. package/dist/web/zyzz.config.js.zyzz.json +1 -1
  300. package/package.json +1 -1
  301. package/src/web/components/AddressCard.tsx +216 -0
  302. package/src/web/components/AgentLogo.tsx +1 -1
  303. package/src/web/components/AmountInput.tsx +1 -1
  304. package/src/web/components/AppShell.tsx +127 -31
  305. package/src/web/components/AssetChip.tsx +4 -1
  306. package/src/web/components/Avatar.tsx +73 -6
  307. package/src/web/components/Badge.tsx +39 -3
  308. package/src/web/components/Button.tsx +64 -11
  309. package/src/web/components/Callout.tsx +45 -0
  310. package/src/web/components/ChoiceGroup.tsx +26 -12
  311. package/src/web/components/Code.tsx +42 -0
  312. package/src/web/components/CopyButton.tsx +8 -4
  313. package/src/web/components/Dialog.tsx +2 -1
  314. package/src/web/components/Field.tsx +53 -20
  315. package/src/web/components/GetStartedVisual.tsx +66 -0
  316. package/src/web/components/HeroVisual.tsx +304 -0
  317. package/src/web/components/Kbd.tsx +16 -9
  318. package/src/web/components/ListGroup.tsx +47 -81
  319. package/src/web/components/NativeSelect.tsx +167 -0
  320. package/src/web/components/Progress.tsx +3 -2
  321. package/src/web/components/RadioGroup.tsx +1 -1
  322. package/src/web/components/Select.tsx +2 -1
  323. package/src/web/components/SidebarMenu.tsx +9 -4
  324. package/src/web/components/SplitButton.tsx +11 -4
  325. package/src/web/components/StatusIndicator.tsx +94 -0
  326. package/src/web/components/SuccessHero.tsx +249 -0
  327. package/src/web/components/Surface.tsx +5 -3
  328. package/src/web/components/Switch.tsx +18 -25
  329. package/src/web/components/Table.tsx +69 -1
  330. package/src/web/components/Tabs.tsx +172 -10
  331. package/src/web/components/TempoLogo.tsx +1 -1
  332. package/src/web/components/TextInput.tsx +87 -5
  333. package/src/web/components/Textarea.tsx +9 -1
  334. package/src/web/components/Toast.tsx +67 -34
  335. package/src/web/components/Tooltip.tsx +6 -4
  336. package/src/web/components/internal/GetStartedArtwork.tsx +356 -0
  337. package/src/web/components/internal/Streaks.tsx +173 -0
  338. package/src/web/components/internal/TabBar.ts +7 -3
  339. package/src/web/components/visuals/GetStartedConnect.svg +36 -0
  340. package/src/web/components/visuals/GetStartedFunds.svg +31 -0
  341. package/src/web/components/visuals/GetStartedPasskey.svg +34 -0
  342. package/src/web/components/visuals/README.md +15 -0
  343. package/src/web/index.ts +8 -0
  344. package/src/web/logos/README.md +1 -1
  345. package/src/web/vars.ts +14 -3
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tempoxyz/ds",
3
3
  "type": "module",
4
- "version": "0.3.1",
4
+ "version": "0.3.2",
5
5
  "license": "MIT",
6
6
  "files": [
7
7
  "DESIGN.md",
@@ -0,0 +1,216 @@
1
+ /**
2
+ * A receive card that pairs a wallet address with its QR code, a copy action, and the networks it
3
+ * accepts.
4
+ * @module
5
+ */
6
+ import type { ComponentPropsWithRef, ReactNode } from 'react'
7
+ import { useId } from 'react'
8
+ import type * as zyzz from 'zyzz'
9
+ import { style } from '../zyzz.config.js'
10
+ import { AssetChip } from './AssetChip.js'
11
+ import { CopyButton } from './CopyButton.js'
12
+ import { formatHex } from './Hex.js'
13
+ import { NetworkLogo } from './NetworkLogo.js'
14
+ import { Qr } from './Qr.js'
15
+
16
+ /**
17
+ * A bordered receive card with a 120px QR code of `address` beside the address, a copy button,
18
+ * and the networks that it accepts. The address shows its first and last four characters, and
19
+ * screen readers receive the full value. Pass `AddressCard.Networks` as children to list the
20
+ * networks.
21
+ *
22
+ * - Use it where a person receives funds, such as a deposit or top-up screen.
23
+ * - List only the networks that the address accepts, and mark the picked one `selected`.
24
+ * - Use `Hex` with `copy` for an address inside a row or a sentence.
25
+ *
26
+ * @example
27
+ * <AddressCard address={address}>
28
+ * <AddressCard.Networks>
29
+ * <AddressCard.Network network="tempo" selected>
30
+ * Tempo
31
+ * </AddressCard.Network>
32
+ * <AddressCard.Network network="base">Base</AddressCard.Network>
33
+ * </AddressCard.Networks>
34
+ * </AddressCard>
35
+ *
36
+ * @see {@link https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html | WCAG 2.2 Non-text Content}
37
+ * @see {@link https://www.w3.org/WAI/WCAG22/Understanding/name-role-value.html | WCAG 2.2 Name, Role, Value}
38
+ */
39
+ export function AddressCard(props: AddressCard.Props) {
40
+ const { address, children, className, label = 'Your wallet address', vars, ...attributes } = props
41
+
42
+ return (
43
+ <div {...attributes} {...styles.card({ className, style: props.style, vars })}>
44
+ <div {...styles.qr()}>
45
+ <Qr value={address} />
46
+ </div>
47
+ <div {...styles.details()}>
48
+ <div {...styles.section()}>
49
+ <span {...styles.label()}>{label}</span>
50
+ <div {...styles.row()}>
51
+ <span {...styles.address()}>
52
+ <span aria-hidden="true">{formatHex(address)}</span>
53
+ <span {...styles.hidden()}>{address}</span>
54
+ </span>
55
+ <CopyButton aria-label="Copy address" value={address} variant="secondary" />
56
+ </div>
57
+ </div>
58
+ {children}
59
+ </div>
60
+ </div>
61
+ )
62
+ }
63
+
64
+ export namespace AddressCard {
65
+ export type Props = ComponentPropsWithRef<'div'> &
66
+ zyzz.Props.Variants<typeof styles.card> & {
67
+ /** Wallet address that the QR code encodes and the copy button writes. */
68
+ address: string
69
+ /**
70
+ * Label above the address.
71
+ * @default 'Your wallet address'
72
+ */
73
+ label?: ReactNode | undefined
74
+ }
75
+
76
+ /**
77
+ * One network that the address accepts, rendered as an `AssetChip` with the 12px logo of
78
+ * `network` before its text. Give it an `onClick` to pick a network, and set `selected` on the
79
+ * picked one.
80
+ */
81
+ export function Network(props: Network.Props) {
82
+ const { children, className, network, ...attributes } = props
83
+
84
+ return (
85
+ <AssetChip {...attributes} {...styles.network({ className, style: props.style })}>
86
+ <NetworkLogo network={network} />
87
+ {children}
88
+ </AssetChip>
89
+ )
90
+ }
91
+
92
+ export namespace Network {
93
+ export type Props = Omit<AssetChip.Props, 'vars'> & {
94
+ /** Network whose logo renders before the text. */
95
+ network: NetworkLogo.Props['network']
96
+ }
97
+ }
98
+
99
+ /**
100
+ * Lists the `AddressCard.Network` chips under a label, wrapping them onto more rows. Screen
101
+ * readers announce the chips as a group named by the label.
102
+ */
103
+ export function Networks(props: Networks.Props) {
104
+ const { children, className, label = 'Network', vars, ...attributes } = props
105
+ const id = useId()
106
+
107
+ return (
108
+ <div {...attributes} {...styles.networks({ className, style: props.style, vars })}>
109
+ <span id={id} {...styles.label()}>
110
+ {label}
111
+ </span>
112
+ <div aria-labelledby={id} role="group" {...styles.chips()}>
113
+ {children}
114
+ </div>
115
+ </div>
116
+ )
117
+ }
118
+
119
+ export namespace Networks {
120
+ export type Props = ComponentPropsWithRef<'div'> &
121
+ zyzz.Props.Variants<typeof styles.networks> & {
122
+ /**
123
+ * Label above the chips, which also names their group.
124
+ * @default 'Network'
125
+ */
126
+ label?: ReactNode | undefined
127
+ }
128
+ }
129
+ }
130
+
131
+ namespace styles {
132
+ export const address = style(
133
+ { color: 'content.primary', typography: 'mono.m1', whiteSpace: 'nowrap' },
134
+ { id: 'tds/web/address-card/address' },
135
+ )
136
+
137
+ // The card pads its 16px corner by 16px inside its 1px border.
138
+ export const card = style(
139
+ {
140
+ borderColor: 'line.secondary',
141
+ borderRadius: 'sm',
142
+ borderStyle: 'solid',
143
+ borderWidth: 'regular',
144
+ boxSizing: 'border-box',
145
+ columnGap: '20',
146
+ display: 'flex',
147
+ padding: '16',
148
+ },
149
+ { id: 'tds/web/address-card' },
150
+ )
151
+
152
+ export const chips = style(
153
+ { columnGap: '6', display: 'flex', flexWrap: 'wrap', rowGap: '6' },
154
+ { id: 'tds/web/address-card/chips' },
155
+ )
156
+
157
+ export const details = style(
158
+ { display: 'flex', flex: '1 !custom', flexDirection: 'column', minWidth: '0', rowGap: '16' },
159
+ { id: 'tds/web/address-card/details' },
160
+ )
161
+
162
+ export const hidden = style(
163
+ {
164
+ clipPath: 'inset(50%) !custom',
165
+ height: '1',
166
+ overflow: 'hidden',
167
+ position: 'absolute',
168
+ whiteSpace: 'nowrap',
169
+ width: '1',
170
+ },
171
+ { id: 'tds/web/address-card/hidden' },
172
+ )
173
+
174
+ export const label = style(
175
+ { color: 'content.secondary', typography: 'body.b3' },
176
+ { id: 'tds/web/address-card/label' },
177
+ )
178
+
179
+ // The chip sizes a token image to its 12px logo slot, and the network logo takes the same slot.
180
+ export const network = style(
181
+ { selectors: { '& > svg': { height: '12', width: '12' } } },
182
+ { id: 'tds/web/address-card/network' },
183
+ )
184
+
185
+ export const networks = style(
186
+ { display: 'flex', flexDirection: 'column', rowGap: '8' },
187
+ { id: 'tds/web/address-card/networks' },
188
+ )
189
+
190
+ // Figma pads the 12px corner of the QR frame by 8px, below its radius, and the 120px code fills
191
+ // the rest.
192
+ export const qr = style(
193
+ {
194
+ backgroundColor: 'background.elevated',
195
+ borderColor: 'line.secondary',
196
+ borderRadius: 'xs',
197
+ borderStyle: 'solid',
198
+ borderWidth: 'regular',
199
+ display: 'flex',
200
+ flexShrink: '0 !custom',
201
+ padding: '8',
202
+ selectors: { '& > svg': { height: '120', width: '120' } },
203
+ },
204
+ { id: 'tds/web/address-card/qr' },
205
+ )
206
+
207
+ export const row = style(
208
+ { alignItems: 'center', columnGap: '8', display: 'flex' },
209
+ { id: 'tds/web/address-card/row' },
210
+ )
211
+
212
+ export const section = style(
213
+ { display: 'flex', flexDirection: 'column', rowGap: '4' },
214
+ { id: 'tds/web/address-card/section' },
215
+ )
216
+ }
@@ -2,7 +2,7 @@ import { type ComponentPropsWithRef, type ReactNode, useId } from 'react'
2
2
  import type * as zyzz from 'zyzz'
3
3
  import { variants } from '../zyzz.config.js'
4
4
 
5
- // The Agent Logo marks from the TDPS page of Web-Wallet, with each clip and gradient ID suffixed
5
+ // The Agent marks of the Logo component in TPDS 1.0 Platform, with each clip and gradient ID suffixed
6
6
  // per instance. A brand tile fills with the agent's color and draws its white mark in
7
7
  // `currentColor`. An outlined tile draws the mark in its own colors, or in `currentColor` for a
8
8
  // black mark.
@@ -74,7 +74,7 @@ export namespace AmountInput {
74
74
  export namespace Root {
75
75
  export type Props = Omit<
76
76
  TextInput.Group.Props,
77
- 'defaultValue' | 'onChange' | 'success' | 'variant'
77
+ 'appearance' | 'defaultValue' | 'onChange' | 'size' | 'success' | 'variant'
78
78
  > & {
79
79
  /** @default '' */
80
80
  defaultValue?: string | undefined
@@ -4,6 +4,8 @@ import {
4
4
  type ComponentPropsWithRef,
5
5
  createContext,
6
6
  use,
7
+ useId,
8
+ useLayoutEffect,
7
9
  useState,
8
10
  useSyncExternalStore,
9
11
  } from 'react'
@@ -23,22 +25,25 @@ type Context = {
23
25
 
24
26
  const context = createContext<Context | undefined>(undefined)
25
27
 
26
- // The sidebar opens as a drawer below 1024px, or below 768px when it collapses to its icons from
27
- // 768px to 1023px. The breakpoints are literals because media queries cannot read CSS variables.
28
- function useCompact(collapse: boolean) {
29
- const compactQuery = collapse ? '(max-width: 767px)' : '(max-width: 1023px)'
30
-
28
+ /** Reads a media query, and `false` on the server and during hydration. */
29
+ function useQuery(query: string) {
31
30
  return useSyncExternalStore(
32
31
  (notify) => {
33
- const query = window.matchMedia(compactQuery)
34
- query.addEventListener('change', notify)
35
- return () => query.removeEventListener('change', notify)
32
+ const list = window.matchMedia(query)
33
+ list.addEventListener('change', notify)
34
+ return () => list.removeEventListener('change', notify)
36
35
  },
37
- () => window.matchMedia(compactQuery).matches,
36
+ () => window.matchMedia(query).matches,
38
37
  () => false,
39
38
  )
40
39
  }
41
40
 
41
+ // The sidebar opens as a drawer below 1024px, or below 768px when it collapses to its icons from
42
+ // 768px to 1023px. The breakpoints are literals because media queries cannot read CSS variables.
43
+ function useCompact(collapse: boolean) {
44
+ return useQuery(collapse ? '(max-width: 767px)' : '(max-width: 1023px)')
45
+ }
46
+
42
47
  function useShell() {
43
48
  const value = use(context)
44
49
  if (!value) throw new Error('AppShell parts must render inside AppShell.Root')
@@ -294,25 +299,49 @@ export namespace AppShell {
294
299
  * Toggles the sidebar drawer from a button fixed to the top-right corner, above the drawer, whose
295
300
  * two bars turn into a close mark while it is open. Hidden from 1024px, where the sidebar is
296
301
  * always visible. It is named `Open menu` or `Close menu` and exposes `aria-expanded`. Pass
297
- * `aria-label` to replace the name, or `children` to replace the bars.
302
+ * `aria-label` to replace the name, or `children` to replace the bars. With `tabBar`, the bottom
303
+ * bar renders it as its floating action button below 768px instead of the top-right button.
304
+ *
305
+ * @example
306
+ * <AppShell.Trigger tabBar />
298
307
  */
299
308
  export function Trigger(props: Trigger.Props) {
300
- const { children, className, vars, ...attributes } = props
309
+ const { children, className, ref, tabBar = false, vars, ...attributes } = props
301
310
  const shell = useShell()
311
+ const store = use(TabBar.Context)
312
+ const id = useId()
313
+ // The bottom bar shows below 768px, so the ref follows whichever of the two buttons shows.
314
+ const bar = useQuery('(max-width: 767px)') && tabBar
315
+
316
+ // Registers on every render, so the bottom bar repeats the current props of the trigger.
317
+ useLayoutEffect(() => {
318
+ if (!store) return
319
+ if (!tabBar) return store.delete(id)
320
+
321
+ const { style: _, ...rest } = attributes
322
+ store.set(id, {
323
+ active: false,
324
+ attributes: { ...rest, ref: bar ? ref : undefined },
325
+ children,
326
+ variant: 'menu',
327
+ })
328
+ })
329
+
330
+ useLayoutEffect(() => {
331
+ if (!store) return
332
+ return () => store.delete(id)
333
+ }, [id, store])
302
334
 
303
335
  return (
304
336
  <BaseUi.Drawer.Trigger
305
337
  aria-label={shell.open ? 'Close menu' : 'Open menu'}
306
338
  {...attributes}
307
339
  {...styles.trigger({ className, style: props.style, vars })}
340
+ data-app-shell-tab-bar={tabBar ? '' : undefined}
308
341
  handle={shell.handle}
342
+ ref={bar ? undefined : ref}
309
343
  >
310
- {children ?? (
311
- <span aria-hidden="true" {...styles.bars()}>
312
- <span {...styles.bar()} />
313
- <span {...styles.bar()} />
314
- </span>
315
- )}
344
+ {children ?? <Bars />}
316
345
  </BaseUi.Drawer.Trigger>
317
346
  )
318
347
  }
@@ -320,25 +349,47 @@ export namespace AppShell {
320
349
  export namespace Trigger {
321
350
  export type Props = ComponentPropsWithRef<'button'> &
322
351
  zyzz.Props.Variants<typeof styles.trigger> &
323
- Pick<BaseUi.Drawer.Trigger.Props, 'nativeButton' | 'render'>
352
+ Pick<BaseUi.Drawer.Trigger.Props, 'nativeButton' | 'render'> & {
353
+ /**
354
+ * Renders the trigger as the floating action button of the bottom bar below 768px, after
355
+ * the `action` items, in place of the top-right button. While the drawer is open, the
356
+ * button stays above it as a close mark, and the other items of the bar fade out.
357
+ */
358
+ tabBar?: boolean | undefined
359
+ }
324
360
  }
325
361
  }
326
362
 
363
+ /** The two bars of a trigger, which cross into a close mark while the drawer is open. */
364
+ function Bars() {
365
+ return (
366
+ <span aria-hidden="true" {...styles.bars()}>
367
+ <span {...styles.bar()} />
368
+ <span {...styles.bar()} />
369
+ </span>
370
+ )
371
+ }
372
+
327
373
  /**
328
374
  * Repeats the `SidebarMenu.Item`s that set `tabBar` in a bar fixed to the bottom edge below 768px:
329
- * `tab` items as icons in a pill `<nav>`, then each `action` item as a floating action button.
330
- * Renders nothing while no item sets `tabBar`.
375
+ * `tab` items as icons in a pill `<nav>`, then each `action` item as a floating action button, then
376
+ * the `AppShell.Trigger` that sets `tabBar`. Renders nothing while nothing registers.
331
377
  */
332
378
  function BottomBar() {
333
379
  const store = use(TabBar.Context)!
334
380
  const entries = useSyncExternalStore(store.subscribe, store.snapshot, store.snapshot)
335
381
  const tabs = entries.filter(([, entry]) => entry.variant === 'tab')
336
382
  const actions = entries.filter(([, entry]) => entry.variant === 'action')
383
+ const menus = entries.filter(([, entry]) => entry.variant === 'menu')
337
384
 
338
385
  if (entries.length === 0) return null
339
386
 
340
387
  return (
341
- <div {...styles.bottomBar()} data-app-shell-bottom-bar="">
388
+ <div
389
+ {...styles.bottomBar()}
390
+ data-app-shell-bottom-bar=""
391
+ data-app-shell-menu={menus.length > 0 ? '' : undefined}
392
+ >
342
393
  {tabs.length > 0 && (
343
394
  <nav aria-label="Main" {...styles.tabBar()}>
344
395
  {tabs.map(([id, entry]) => (
@@ -349,6 +400,9 @@ function BottomBar() {
349
400
  {actions.map(([id, entry]) => (
350
401
  <BottomBarItem entry={entry} key={id} />
351
402
  ))}
403
+ {menus.map(([id, entry]) => (
404
+ <BottomBarTrigger entry={entry} key={id} />
405
+ ))}
352
406
  </div>
353
407
  )
354
408
  }
@@ -372,6 +426,24 @@ function BottomBarItem(props: { entry: TabBar.Entry }) {
372
426
  })
373
427
  }
374
428
 
429
+ /** Renders the `AppShell.Trigger` that sets `tabBar` as a floating action button. */
430
+ function BottomBarTrigger(props: { entry: TabBar.Entry }) {
431
+ const { entry } = props
432
+ const shell = useShell()
433
+
434
+ return (
435
+ <BaseUi.Drawer.Trigger
436
+ aria-label={shell.open ? 'Close menu' : 'Open menu'}
437
+ {...(entry.attributes as BaseUi.Drawer.Trigger.Props)}
438
+ {...styles.action()}
439
+ data-app-shell-menu-trigger=""
440
+ handle={shell.handle}
441
+ >
442
+ {entry.children ?? <Bars />}
443
+ </BaseUi.Drawer.Trigger>
444
+ )
445
+ }
446
+
375
447
  const fadeIn = keyframes(
376
448
  { from: { opacity: 0 }, to: { opacity: 1 } },
377
449
  { id: 'tds/web/app-shell/fade-in' },
@@ -383,11 +455,11 @@ const fadeOut = keyframes(
383
455
  )
384
456
 
385
457
  namespace styles {
386
- // The 56px circle of the Platform Floating Action Button, filled like the primary button.
458
+ // The 56px circle of the Platform Floating Action Button.
387
459
  export const action = style(
388
460
  {
389
461
  alignItems: 'center',
390
- backgroundColor: 'inverse.background.primary',
462
+ backgroundColor: 'inverse.background.secondary',
391
463
  borderRadius: 'full',
392
464
  boxShadow: 'large',
393
465
  boxSizing: 'border-box',
@@ -399,13 +471,13 @@ namespace styles {
399
471
  height: '56',
400
472
  justifyContent: 'center',
401
473
  outlineColor: 'transparent !custom',
402
- outlineOffset: '2',
474
+ outlineOffset: '0',
403
475
  outlineStyle: 'solid !custom',
404
476
  outlineWidth: '2',
405
477
  position: 'relative',
406
478
  textDecoration: 'none !custom',
407
479
  transitionDuration: '160',
408
- transitionProperty: 'background-color, outline-color, scale !custom',
480
+ transitionProperty: 'opacity, outline-color, scale !custom',
409
481
  transitionTimingFunction: 'snappy',
410
482
  width: '56',
411
483
  selectors: {
@@ -420,10 +492,11 @@ namespace styles {
420
492
  },
421
493
  '&:active': { scale: 'press', transitionDuration: '100' },
422
494
  '&:focus-visible': { outlineColor: 'border.focus' },
423
- '&:hover': { backgroundColor: 'action.primary.fill.hover' },
495
+ // The design dims the button to 88% under the pointer, which no opacity token sets.
496
+ '&:hover': { opacity: '0.88 !custom' },
424
497
  },
425
498
  '@media (prefers-reduced-motion: reduce)': {
426
- transitionProperty: 'background-color, outline-color !custom',
499
+ transitionProperty: 'opacity, outline-color !custom',
427
500
  selectors: { '&:active': { scale: 'none !custom' } },
428
501
  },
429
502
  },
@@ -488,6 +561,15 @@ namespace styles {
488
561
  insetInline: '24',
489
562
  position: 'fixed',
490
563
  zIndex: '39 !custom',
564
+ selectors: {
565
+ // A bar that holds the trigger rises above the open drawer, so the trigger closes it. The
566
+ // other items fade out and leave the drawer uncovered.
567
+ '[data-state="open"] > &[data-app-shell-menu]': { zIndex: 'modal' },
568
+ '[data-state="open"] > &[data-app-shell-menu] > :not([data-app-shell-menu-trigger])': {
569
+ opacity: '0 !custom',
570
+ pointerEvents: 'none',
571
+ },
572
+ },
491
573
  '@media (max-width: 767px)': { display: 'flex' },
492
574
  },
493
575
  { id: 'tds/web/app-shell/bottom-bar' },
@@ -518,6 +600,11 @@ namespace styles {
518
600
  },
519
601
  '&[data-starting-style]': { transform: 'translateX(100%) !custom' },
520
602
  '&[data-swiping]': { transitionDuration: '0', userSelect: 'none' },
603
+ // The trigger in the bottom bar stays above the open drawer, so the drawer ends 16px above
604
+ // it, and its footer stays uncovered.
605
+ '[data-state]:has(> [data-app-shell-bottom-bar][data-app-shell-menu]) &': {
606
+ paddingBlockEnd: 'calc(5.5rem + env(safe-area-inset-bottom)) !custom',
607
+ },
521
608
  // The closed drawer stays mounted with the `hidden` attribute, which the flex layout of
522
609
  // the sidebar would override.
523
610
  '&[hidden]': { display: 'none !custom' },
@@ -831,18 +918,19 @@ namespace styles {
831
918
  variants: {
832
919
  active: {
833
920
  false: {},
834
- true: { backgroundColor: 'container.regular', color: 'content.primary' },
921
+ true: { backgroundColor: 'container.strong', color: 'content.primary' },
835
922
  },
836
923
  },
837
924
  },
838
925
  { id: 'tds/web/app-shell/tab' },
839
926
  )
840
927
 
841
- // The 56px pill of the Platform Tab Bar, which takes the width beside the action button.
928
+ // The 56px pill of the Platform Tab Bar, which takes the width beside the action button. Its 48px
929
+ // items sit 4px inside the 1px border at either end and 3px inside it at the top and bottom.
842
930
  export const tabBar = style(
843
931
  {
844
932
  alignItems: 'center',
845
- backgroundColor: 'background.secondary',
933
+ backgroundColor: 'background.elevated',
846
934
  borderColor: 'line.secondary',
847
935
  borderRadius: 'full',
848
936
  borderStyle: 'solid',
@@ -854,7 +942,11 @@ namespace styles {
854
942
  flex: '1 !custom',
855
943
  height: '56',
856
944
  minWidth: '0',
857
- padding: '4',
945
+ paddingBlock: '3',
946
+ paddingInline: '4',
947
+ transitionDuration: '200',
948
+ transitionProperty: 'opacity !custom',
949
+ transitionTimingFunction: 'snappy',
858
950
  },
859
951
  { id: 'tds/web/app-shell/tab-bar' },
860
952
  )
@@ -918,6 +1010,10 @@ namespace styles {
918
1010
  '@media (min-width: 768px) and (max-width: 1023px)': {
919
1011
  selectors: { '[data-app-shell-collapse] &': { display: 'none !custom' } },
920
1012
  },
1013
+ // The bottom bar renders this trigger as its floating action button.
1014
+ '@media (max-width: 767px)': {
1015
+ selectors: { '&[data-app-shell-tab-bar]': { display: 'none !custom' } },
1016
+ },
921
1017
  '@media (prefers-reduced-motion: reduce)': {
922
1018
  transitionProperty: 'background-color, outline-color, outline-offset !custom',
923
1019
  selectors: { '&:active': { transform: 'none !custom' } },
@@ -96,7 +96,10 @@ namespace styles {
96
96
  '&:is(button):not([data-selected], :disabled):hover': {
97
97
  backgroundColor: 'container.strong',
98
98
  },
99
- '&[data-selected]': { backgroundColor: 'content.primary', color: 'background.elevated' },
99
+ '&[data-selected]': {
100
+ backgroundColor: 'inverse.background.primary',
101
+ color: 'inverse.content.primary',
102
+ },
100
103
  // An inside ring would vanish into the selected fill, so a selected chip draws it outside.
101
104
  '&[data-selected]:focus-visible': { outlineOffset: '2' },
102
105
  },