@tempoxyz/ds 0.3.1 → 0.3.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 (347) hide show
  1. package/README.md +7 -0
  2. package/dist/web/components/Accordion.css +1 -1
  3. package/dist/web/components/Accordion.js.zyzz.json +1 -1
  4. package/dist/web/components/AddressCard.css +1 -0
  5. package/dist/web/components/AddressCard.d.ts +85 -0
  6. package/dist/web/components/AddressCard.d.ts.map +1 -0
  7. package/dist/web/components/AddressCard.js +79 -0
  8. package/dist/web/components/AddressCard.js.map +1 -0
  9. package/dist/web/components/AddressCard.js.zyzz.json +1 -0
  10. package/dist/web/components/AgentLogo.js +1 -1
  11. package/dist/web/components/AgentLogo.js.map +1 -1
  12. package/dist/web/components/AgentLogo.js.zyzz.json +1 -1
  13. package/dist/web/components/Alert.css +1 -1
  14. package/dist/web/components/Alert.js.zyzz.json +1 -1
  15. package/dist/web/components/AlertDialog.js.zyzz.json +1 -1
  16. package/dist/web/components/Amount.css +1 -1
  17. package/dist/web/components/Amount.js.zyzz.json +1 -1
  18. package/dist/web/components/AmountInput.css +1 -1
  19. package/dist/web/components/AmountInput.d.ts +1 -1
  20. package/dist/web/components/AmountInput.d.ts.map +1 -1
  21. package/dist/web/components/AmountInput.js.zyzz.json +1 -1
  22. package/dist/web/components/AppShell.css +1 -1
  23. package/dist/web/components/AppShell.d.ts +21 -3
  24. package/dist/web/components/AppShell.d.ts.map +1 -1
  25. package/dist/web/components/AppShell.js +74 -32
  26. package/dist/web/components/AppShell.js.map +1 -1
  27. package/dist/web/components/AppShell.js.zyzz.json +1 -1
  28. package/dist/web/components/AssetChip.css +1 -1
  29. package/dist/web/components/AssetChip.d.ts.map +1 -1
  30. package/dist/web/components/AssetChip.js.map +1 -1
  31. package/dist/web/components/AssetChip.js.zyzz.json +1 -1
  32. package/dist/web/components/Autocomplete.js.zyzz.json +1 -1
  33. package/dist/web/components/Avatar.css +1 -1
  34. package/dist/web/components/Avatar.d.ts +68 -6
  35. package/dist/web/components/Avatar.d.ts.map +1 -1
  36. package/dist/web/components/Avatar.js +27 -7
  37. package/dist/web/components/Avatar.js.map +1 -1
  38. package/dist/web/components/Avatar.js.zyzz.json +1 -1
  39. package/dist/web/components/Badge.css +1 -1
  40. package/dist/web/components/Badge.d.ts +48 -0
  41. package/dist/web/components/Badge.d.ts.map +1 -1
  42. package/dist/web/components/Badge.js +5 -3
  43. package/dist/web/components/Badge.js.map +1 -1
  44. package/dist/web/components/Badge.js.zyzz.json +1 -1
  45. package/dist/web/components/Banner.js.zyzz.json +1 -1
  46. package/dist/web/components/BarChart.css +1 -1
  47. package/dist/web/components/BarChart.js.zyzz.json +1 -1
  48. package/dist/web/components/Breadcrumbs.css +1 -1
  49. package/dist/web/components/Breadcrumbs.js.zyzz.json +1 -1
  50. package/dist/web/components/Button.css +1 -1
  51. package/dist/web/components/Button.d.ts +72 -6
  52. package/dist/web/components/Button.d.ts.map +1 -1
  53. package/dist/web/components/Button.js +5 -3
  54. package/dist/web/components/Button.js.map +1 -1
  55. package/dist/web/components/Button.js.zyzz.json +1 -1
  56. package/dist/web/components/ButtonGroup.js.zyzz.json +1 -1
  57. package/dist/web/components/Calendar.css +1 -1
  58. package/dist/web/components/Calendar.js.zyzz.json +1 -1
  59. package/dist/web/components/Callout.css +1 -0
  60. package/dist/web/components/Callout.d.ts +23 -0
  61. package/dist/web/components/Callout.d.ts.map +1 -0
  62. package/dist/web/components/Callout.js +26 -0
  63. package/dist/web/components/Callout.js.map +1 -0
  64. package/dist/web/components/Callout.js.zyzz.json +1 -0
  65. package/dist/web/components/Checkbox.css +1 -1
  66. package/dist/web/components/Checkbox.js.zyzz.json +1 -1
  67. package/dist/web/components/CheckboxGroup.js.zyzz.json +1 -1
  68. package/dist/web/components/ChoiceGroup.css +1 -1
  69. package/dist/web/components/ChoiceGroup.d.ts +17 -10
  70. package/dist/web/components/ChoiceGroup.d.ts.map +1 -1
  71. package/dist/web/components/ChoiceGroup.js +5 -5
  72. package/dist/web/components/ChoiceGroup.js.map +1 -1
  73. package/dist/web/components/ChoiceGroup.js.zyzz.json +1 -1
  74. package/dist/web/components/Choicebox.css +1 -1
  75. package/dist/web/components/Choicebox.js.zyzz.json +1 -1
  76. package/dist/web/components/Code.css +1 -0
  77. package/dist/web/components/Code.d.ts +25 -0
  78. package/dist/web/components/Code.d.ts.map +1 -0
  79. package/dist/web/components/Code.js +28 -0
  80. package/dist/web/components/Code.js.map +1 -0
  81. package/dist/web/components/Code.js.zyzz.json +1 -0
  82. package/dist/web/components/Combobox.css +1 -1
  83. package/dist/web/components/Combobox.js.zyzz.json +1 -1
  84. package/dist/web/components/Container.js.zyzz.json +1 -1
  85. package/dist/web/components/CopyButton.d.ts +8 -1
  86. package/dist/web/components/CopyButton.d.ts.map +1 -1
  87. package/dist/web/components/CopyButton.js.map +1 -1
  88. package/dist/web/components/CopyButton.js.zyzz.json +1 -1
  89. package/dist/web/components/DatePicker.css +1 -1
  90. package/dist/web/components/DatePicker.js.zyzz.json +1 -1
  91. package/dist/web/components/Dialog.css +1 -1
  92. package/dist/web/components/Dialog.d.ts.map +1 -1
  93. package/dist/web/components/Dialog.js +1 -0
  94. package/dist/web/components/Dialog.js.map +1 -1
  95. package/dist/web/components/Dialog.js.zyzz.json +1 -1
  96. package/dist/web/components/Drawer.js.zyzz.json +1 -1
  97. package/dist/web/components/Empty.css +1 -1
  98. package/dist/web/components/Empty.js.zyzz.json +1 -1
  99. package/dist/web/components/Field.css +1 -1
  100. package/dist/web/components/Field.d.ts +41 -5
  101. package/dist/web/components/Field.d.ts.map +1 -1
  102. package/dist/web/components/Field.js +19 -13
  103. package/dist/web/components/Field.js.map +1 -1
  104. package/dist/web/components/Field.js.zyzz.json +1 -1
  105. package/dist/web/components/Fieldset.js.zyzz.json +1 -1
  106. package/dist/web/components/Frame.css +1 -1
  107. package/dist/web/components/Frame.js.zyzz.json +1 -1
  108. package/dist/web/components/Gauge.js.zyzz.json +1 -1
  109. package/dist/web/components/GetStartedVisual.css +1 -0
  110. package/dist/web/components/GetStartedVisual.d.ts +59 -0
  111. package/dist/web/components/GetStartedVisual.d.ts.map +1 -0
  112. package/dist/web/components/GetStartedVisual.js +31 -0
  113. package/dist/web/components/GetStartedVisual.js.map +1 -0
  114. package/dist/web/components/GetStartedVisual.js.zyzz.json +1 -0
  115. package/dist/web/components/Grid.js.zyzz.json +1 -1
  116. package/dist/web/components/HeroVisual.css +1 -0
  117. package/dist/web/components/HeroVisual.d.ts +96 -0
  118. package/dist/web/components/HeroVisual.d.ts.map +1 -0
  119. package/dist/web/components/HeroVisual.js +202 -0
  120. package/dist/web/components/HeroVisual.js.map +1 -0
  121. package/dist/web/components/HeroVisual.js.zyzz.json +1 -0
  122. package/dist/web/components/Hex.css +1 -1
  123. package/dist/web/components/Hex.js.zyzz.json +1 -1
  124. package/dist/web/components/IconTile.js.zyzz.json +1 -1
  125. package/dist/web/components/Identicon.js.zyzz.json +1 -1
  126. package/dist/web/components/Inline.js.zyzz.json +1 -1
  127. package/dist/web/components/Inset.js.zyzz.json +1 -1
  128. package/dist/web/components/Kbd.css +1 -1
  129. package/dist/web/components/Kbd.d.ts +8 -7
  130. package/dist/web/components/Kbd.d.ts.map +1 -1
  131. package/dist/web/components/Kbd.js +1 -1
  132. package/dist/web/components/Kbd.js.map +1 -1
  133. package/dist/web/components/Kbd.js.zyzz.json +1 -1
  134. package/dist/web/components/ListGroup.css +1 -1
  135. package/dist/web/components/ListGroup.d.ts +35 -65
  136. package/dist/web/components/ListGroup.d.ts.map +1 -1
  137. package/dist/web/components/ListGroup.js +9 -10
  138. package/dist/web/components/ListGroup.js.map +1 -1
  139. package/dist/web/components/ListGroup.js.zyzz.json +1 -1
  140. package/dist/web/components/LoadingDots.js.zyzz.json +1 -1
  141. package/dist/web/components/Menu.css +1 -1
  142. package/dist/web/components/Menu.js.zyzz.json +1 -1
  143. package/dist/web/components/NativeSelect.css +1 -0
  144. package/dist/web/components/NativeSelect.d.ts +50 -0
  145. package/dist/web/components/NativeSelect.d.ts.map +1 -0
  146. package/dist/web/components/NativeSelect.js +50 -0
  147. package/dist/web/components/NativeSelect.js.map +1 -0
  148. package/dist/web/components/NativeSelect.js.zyzz.json +1 -0
  149. package/dist/web/components/NetworkLogo.js.zyzz.json +1 -1
  150. package/dist/web/components/NumberField.css +1 -1
  151. package/dist/web/components/NumberField.js.zyzz.json +1 -1
  152. package/dist/web/components/OtpField.css +1 -1
  153. package/dist/web/components/OtpField.js.zyzz.json +1 -1
  154. package/dist/web/components/Pagination.css +1 -1
  155. package/dist/web/components/Pagination.js.zyzz.json +1 -1
  156. package/dist/web/components/Popover.css +1 -1
  157. package/dist/web/components/Popover.js.zyzz.json +1 -1
  158. package/dist/web/components/Progress.css +1 -1
  159. package/dist/web/components/Progress.d.ts +1 -1
  160. package/dist/web/components/Progress.d.ts.map +1 -1
  161. package/dist/web/components/Progress.js +2 -1
  162. package/dist/web/components/Progress.js.map +1 -1
  163. package/dist/web/components/Progress.js.zyzz.json +1 -1
  164. package/dist/web/components/Qr.js.zyzz.json +1 -1
  165. package/dist/web/components/RadioGroup.css +1 -1
  166. package/dist/web/components/RadioGroup.d.ts +1 -1
  167. package/dist/web/components/RadioGroup.js.zyzz.json +1 -1
  168. package/dist/web/components/SecretValue.css +1 -1
  169. package/dist/web/components/SecretValue.js.zyzz.json +1 -1
  170. package/dist/web/components/Select.css +1 -1
  171. package/dist/web/components/Select.d.ts +1 -1
  172. package/dist/web/components/Select.d.ts.map +1 -1
  173. package/dist/web/components/Select.js.map +1 -1
  174. package/dist/web/components/Select.js.zyzz.json +1 -1
  175. package/dist/web/components/Separator.css +1 -1
  176. package/dist/web/components/Separator.js.zyzz.json +1 -1
  177. package/dist/web/components/SidebarMenu.css +1 -1
  178. package/dist/web/components/SidebarMenu.d.ts +8 -2
  179. package/dist/web/components/SidebarMenu.d.ts.map +1 -1
  180. package/dist/web/components/SidebarMenu.js +10 -10
  181. package/dist/web/components/SidebarMenu.js.map +1 -1
  182. package/dist/web/components/SidebarMenu.js.zyzz.json +1 -1
  183. package/dist/web/components/Skeleton.js.zyzz.json +1 -1
  184. package/dist/web/components/Slider.css +1 -1
  185. package/dist/web/components/Slider.js.zyzz.json +1 -1
  186. package/dist/web/components/Snippet.css +1 -1
  187. package/dist/web/components/Snippet.js.zyzz.json +1 -1
  188. package/dist/web/components/Spinner.js.zyzz.json +1 -1
  189. package/dist/web/components/SplitBar.css +1 -1
  190. package/dist/web/components/SplitBar.js.zyzz.json +1 -1
  191. package/dist/web/components/SplitButton.css +1 -1
  192. package/dist/web/components/SplitButton.d.ts +3 -1
  193. package/dist/web/components/SplitButton.d.ts.map +1 -1
  194. package/dist/web/components/SplitButton.js +2 -2
  195. package/dist/web/components/SplitButton.js.map +1 -1
  196. package/dist/web/components/SplitButton.js.zyzz.json +1 -1
  197. package/dist/web/components/Stack.js.zyzz.json +1 -1
  198. package/dist/web/components/StatusChip.css +1 -1
  199. package/dist/web/components/StatusChip.js.zyzz.json +1 -1
  200. package/dist/web/components/StatusIndicator.css +1 -0
  201. package/dist/web/components/StatusIndicator.d.ts +74 -0
  202. package/dist/web/components/StatusIndicator.d.ts.map +1 -0
  203. package/dist/web/components/StatusIndicator.js +32 -0
  204. package/dist/web/components/StatusIndicator.js.map +1 -0
  205. package/dist/web/components/StatusIndicator.js.zyzz.json +1 -0
  206. package/dist/web/components/StatusRow.css +1 -1
  207. package/dist/web/components/StatusRow.js.zyzz.json +1 -1
  208. package/dist/web/components/Stepper.js.zyzz.json +1 -1
  209. package/dist/web/components/SuccessHero.css +1 -0
  210. package/dist/web/components/SuccessHero.d.ts +74 -0
  211. package/dist/web/components/SuccessHero.d.ts.map +1 -0
  212. package/dist/web/components/SuccessHero.js +167 -0
  213. package/dist/web/components/SuccessHero.js.map +1 -0
  214. package/dist/web/components/SuccessHero.js.zyzz.json +1 -0
  215. package/dist/web/components/Surface.css +1 -1
  216. package/dist/web/components/Surface.d.ts +3 -2
  217. package/dist/web/components/Surface.d.ts.map +1 -1
  218. package/dist/web/components/Surface.js +2 -2
  219. package/dist/web/components/Surface.js.map +1 -1
  220. package/dist/web/components/Surface.js.zyzz.json +1 -1
  221. package/dist/web/components/Switch.css +1 -1
  222. package/dist/web/components/Switch.d.ts +6 -6
  223. package/dist/web/components/Switch.d.ts.map +1 -1
  224. package/dist/web/components/Switch.js +3 -2
  225. package/dist/web/components/Switch.js.map +1 -1
  226. package/dist/web/components/Switch.js.zyzz.json +1 -1
  227. package/dist/web/components/Table.css +1 -1
  228. package/dist/web/components/Table.d.ts +85 -0
  229. package/dist/web/components/Table.d.ts.map +1 -1
  230. package/dist/web/components/Table.js +14 -6
  231. package/dist/web/components/Table.js.map +1 -1
  232. package/dist/web/components/Table.js.zyzz.json +1 -1
  233. package/dist/web/components/Tabs.css +1 -1
  234. package/dist/web/components/Tabs.d.ts +183 -6
  235. package/dist/web/components/Tabs.d.ts.map +1 -1
  236. package/dist/web/components/Tabs.js +18 -13
  237. package/dist/web/components/Tabs.js.map +1 -1
  238. package/dist/web/components/Tabs.js.zyzz.json +1 -1
  239. package/dist/web/components/TempoLogo.js +1 -1
  240. package/dist/web/components/TempoLogo.js.map +1 -1
  241. package/dist/web/components/TempoLogo.js.zyzz.json +1 -1
  242. package/dist/web/components/TextInput.css +1 -1
  243. package/dist/web/components/TextInput.d.ts +80 -2
  244. package/dist/web/components/TextInput.d.ts.map +1 -1
  245. package/dist/web/components/TextInput.js +19 -7
  246. package/dist/web/components/TextInput.js.map +1 -1
  247. package/dist/web/components/TextInput.js.zyzz.json +1 -1
  248. package/dist/web/components/Textarea.css +1 -1
  249. package/dist/web/components/Textarea.d.ts +7 -1
  250. package/dist/web/components/Textarea.d.ts.map +1 -1
  251. package/dist/web/components/Textarea.js +3 -2
  252. package/dist/web/components/Textarea.js.map +1 -1
  253. package/dist/web/components/Textarea.js.zyzz.json +1 -1
  254. package/dist/web/components/Toast.css +1 -1
  255. package/dist/web/components/Toast.d.ts +16 -3
  256. package/dist/web/components/Toast.d.ts.map +1 -1
  257. package/dist/web/components/Toast.js +29 -17
  258. package/dist/web/components/Toast.js.map +1 -1
  259. package/dist/web/components/Toast.js.zyzz.json +1 -1
  260. package/dist/web/components/Token.css +1 -1
  261. package/dist/web/components/Token.js.zyzz.json +1 -1
  262. package/dist/web/components/TokenLogo.js.zyzz.json +1 -1
  263. package/dist/web/components/Tooltip.css +1 -1
  264. package/dist/web/components/Tooltip.d.ts.map +1 -1
  265. package/dist/web/components/Tooltip.js +3 -2
  266. package/dist/web/components/Tooltip.js.map +1 -1
  267. package/dist/web/components/Tooltip.js.zyzz.json +1 -1
  268. package/dist/web/components/VerificationCode.css +1 -1
  269. package/dist/web/components/VerificationCode.js.zyzz.json +1 -1
  270. package/dist/web/components/Visual.js.zyzz.json +1 -1
  271. package/dist/web/components/internal/Field.css +1 -1
  272. package/dist/web/components/internal/Field.js.zyzz.json +1 -1
  273. package/dist/web/components/internal/GetStartedArtwork.d.ts +10 -0
  274. package/dist/web/components/internal/GetStartedArtwork.d.ts.map +1 -0
  275. package/dist/web/components/internal/GetStartedArtwork.js +11 -0
  276. package/dist/web/components/internal/GetStartedArtwork.js.map +1 -0
  277. package/dist/web/components/internal/InputGroup.js.zyzz.json +1 -1
  278. package/dist/web/components/internal/Listbox.css +1 -1
  279. package/dist/web/components/internal/Listbox.js.zyzz.json +1 -1
  280. package/dist/web/components/internal/Streaks.css +1 -0
  281. package/dist/web/components/internal/Streaks.d.ts +48 -0
  282. package/dist/web/components/internal/Streaks.d.ts.map +1 -0
  283. package/dist/web/components/internal/Streaks.js +48 -0
  284. package/dist/web/components/internal/Streaks.js.map +1 -0
  285. package/dist/web/components/internal/Streaks.js.zyzz.json +1 -0
  286. package/dist/web/components/internal/TabBar.d.ts +7 -3
  287. package/dist/web/components/internal/TabBar.d.ts.map +1 -1
  288. package/dist/web/components/internal/TabBar.js.map +1 -1
  289. package/dist/web/index.d.ts +8 -0
  290. package/dist/web/index.d.ts.map +1 -1
  291. package/dist/web/index.js +8 -0
  292. package/dist/web/index.js.map +1 -1
  293. package/dist/web/index.js.zyzz.json +1 -1
  294. package/dist/web/vars.d.ts +27 -5
  295. package/dist/web/vars.d.ts.map +1 -1
  296. package/dist/web/vars.js.map +1 -1
  297. package/dist/web/vars.js.zyzz.json +1 -1
  298. package/dist/web/zyzz.config.d.ts +135 -25
  299. package/dist/web/zyzz.config.d.ts.map +1 -1
  300. package/dist/web/zyzz.config.js.zyzz.json +1 -1
  301. package/package.json +1 -1
  302. package/src/web/README.md +1 -1
  303. package/src/web/components/AddressCard.tsx +216 -0
  304. package/src/web/components/AgentLogo.tsx +1 -1
  305. package/src/web/components/AmountInput.tsx +1 -1
  306. package/src/web/components/AppShell.tsx +127 -31
  307. package/src/web/components/AssetChip.tsx +4 -1
  308. package/src/web/components/Avatar.tsx +73 -6
  309. package/src/web/components/Badge.tsx +39 -3
  310. package/src/web/components/Button.tsx +64 -11
  311. package/src/web/components/Callout.tsx +45 -0
  312. package/src/web/components/ChoiceGroup.tsx +26 -12
  313. package/src/web/components/Code.tsx +42 -0
  314. package/src/web/components/CopyButton.tsx +8 -4
  315. package/src/web/components/Dialog.tsx +2 -1
  316. package/src/web/components/Field.tsx +53 -20
  317. package/src/web/components/GetStartedVisual.tsx +66 -0
  318. package/src/web/components/HeroVisual.tsx +304 -0
  319. package/src/web/components/Kbd.tsx +16 -9
  320. package/src/web/components/ListGroup.tsx +47 -81
  321. package/src/web/components/NativeSelect.tsx +167 -0
  322. package/src/web/components/Progress.tsx +3 -2
  323. package/src/web/components/RadioGroup.tsx +1 -1
  324. package/src/web/components/Select.tsx +2 -1
  325. package/src/web/components/SidebarMenu.tsx +9 -4
  326. package/src/web/components/SplitButton.tsx +11 -4
  327. package/src/web/components/StatusIndicator.tsx +94 -0
  328. package/src/web/components/SuccessHero.tsx +249 -0
  329. package/src/web/components/Surface.tsx +5 -3
  330. package/src/web/components/Switch.tsx +18 -25
  331. package/src/web/components/Table.tsx +69 -1
  332. package/src/web/components/Tabs.tsx +172 -10
  333. package/src/web/components/TempoLogo.tsx +1 -1
  334. package/src/web/components/TextInput.tsx +87 -5
  335. package/src/web/components/Textarea.tsx +9 -1
  336. package/src/web/components/Toast.tsx +67 -34
  337. package/src/web/components/Tooltip.tsx +6 -4
  338. package/src/web/components/internal/GetStartedArtwork.tsx +356 -0
  339. package/src/web/components/internal/Streaks.tsx +173 -0
  340. package/src/web/components/internal/TabBar.ts +7 -3
  341. package/src/web/components/visuals/GetStartedConnect.svg +36 -0
  342. package/src/web/components/visuals/GetStartedFunds.svg +31 -0
  343. package/src/web/components/visuals/GetStartedPasskey.svg +34 -0
  344. package/src/web/components/visuals/README.md +15 -0
  345. package/src/web/index.ts +8 -0
  346. package/src/web/logos/README.md +1 -1
  347. package/src/web/vars.ts +20 -9
@@ -4,10 +4,11 @@ import type * as zyzz from 'zyzz'
4
4
  import { variants } from '../zyzz.config.js'
5
5
 
6
6
  /**
7
- * A circular `<span>` that represents a person, contact, or wallet with initials or an icon in its
8
- * `Fallback`. `Avatar` is the same component as `Avatar.Root`.
7
+ * A circular `<span>` that represents a person, contact, or wallet with an `Image`, or with
8
+ * initials or an icon in its `Fallback`. `Avatar` is the same component as `Avatar.Root`.
9
9
  *
10
- * - Use initials for people and contacts, and an icon for wallets and apps.
10
+ * - Use an image when one exists, initials for people and contacts, and an icon for wallets and
11
+ * apps.
11
12
  * - Pair the avatar with a visible name. Do not rely on initials or an icon alone to identify
12
13
  * someone.
13
14
  *
@@ -23,6 +24,12 @@ import { variants } from '../zyzz.config.js'
23
24
  * </Avatar.Fallback>
24
25
  * </Avatar>
25
26
  *
27
+ * @example
28
+ * <Avatar size="64">
29
+ * <Avatar.Image alt="" src={photo} />
30
+ * <Avatar.Fallback>AL</Avatar.Fallback>
31
+ * </Avatar>
32
+ *
26
33
  * @see {@link https://base-ui.com/react/components/avatar | Base UI Avatar}
27
34
  * @see {@link https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/img_role | MDN img role}
28
35
  * @see {@link https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html | WCAG 2.2 Non-text Content}
@@ -36,7 +43,9 @@ export namespace Avatar {
36
43
 
37
44
  /**
38
45
  * Renders the `<span>` that fills the avatar with initials or an icon, and uppercases its text.
39
- * An icon renders at 16px in a `24` or `32` avatar, and at 20px in a `40` avatar.
46
+ * An icon renders at 12px in a `16` avatar, 16px in a `24` or `32` avatar, 20px in a `40`
47
+ * avatar, 24px in a `48` avatar, and 30px in a `64` avatar. Base UI hides it once an `Image`
48
+ * loads.
40
49
  */
41
50
  export function Fallback(props: Fallback.Props) {
42
51
  const { className, vars, ...attributes } = props
@@ -54,8 +63,30 @@ export namespace Avatar {
54
63
  }
55
64
 
56
65
  /**
57
- * Renders the circular `<span>`, filled with `container.strong`. `size` sets its diameter in
58
- * pixels.
66
+ * Renders the `<img>` that fills and crops to the avatar. Base UI mounts it once the image
67
+ * loads, or at once with `keepMounted`, and the `Fallback` shows while it loads or after it
68
+ * fails.
69
+ */
70
+ export function Image(props: Image.Props) {
71
+ const { className, vars, ...attributes } = props
72
+
73
+ return (
74
+ <BaseUi.Avatar.Image
75
+ {...attributes}
76
+ {...styles.image({ className, style: props.style, vars })}
77
+ />
78
+ )
79
+ }
80
+
81
+ export namespace Image {
82
+ export type Props = ComponentPropsWithRef<'img'> &
83
+ zyzz.Props.Variants<typeof styles.image> &
84
+ Pick<BaseUi.Avatar.Image.Props, 'keepMounted' | 'onLoadingStatusChange'>
85
+ }
86
+
87
+ /**
88
+ * Renders the circular `<span>`, filled with `container.strong` until an `Image` loads.
89
+ * `size` sets its diameter in pixels.
59
90
  */
60
91
  export function Root(props: Root.Props) {
61
92
  const { className, size, vars, ...attributes } = props
@@ -90,6 +121,18 @@ namespace styles {
90
121
  { id: 'tds/web/avatar/fallback' },
91
122
  )
92
123
 
124
+ export const image = variants(
125
+ {
126
+ base: {
127
+ display: 'block',
128
+ height: '100% !custom',
129
+ objectFit: 'cover !custom',
130
+ width: '100% !custom',
131
+ },
132
+ },
133
+ { id: 'tds/web/avatar/image' },
134
+ )
135
+
93
136
  export const root = variants(
94
137
  {
95
138
  base: {
@@ -104,12 +147,24 @@ namespace styles {
104
147
  position: 'relative',
105
148
  userSelect: 'none',
106
149
  verticalAlign: 'middle',
150
+ // A loaded image paints the whole circle, so the fill stays clear of its edge.
151
+ selectors: {
152
+ '&:has(> img:not([data-loading], [data-error]))': {
153
+ backgroundColor: 'transparent !custom',
154
+ },
155
+ },
107
156
  },
108
157
  defaultVariants: { size: '40' },
109
158
  variants: {
110
159
  // Icons size by font size, so an `Identicon`, which sets its own width, keeps filling the
111
160
  // circle.
112
161
  size: {
162
+ '16': {
163
+ height: '16',
164
+ typography: 'body.b3Strong',
165
+ width: '16',
166
+ selectors: { '& svg': { fontSize: '12' } },
167
+ },
113
168
  '24': {
114
169
  height: '24',
115
170
  typography: 'body.b3Strong',
@@ -128,6 +183,18 @@ namespace styles {
128
183
  width: '40',
129
184
  selectors: { '& svg': { fontSize: '20' } },
130
185
  },
186
+ '48': {
187
+ height: '48',
188
+ typography: 'body.b1Strong',
189
+ width: '48',
190
+ selectors: { '& svg': { fontSize: '24' } },
191
+ },
192
+ '64': {
193
+ height: '64',
194
+ typography: 'body.b1Strong',
195
+ width: '64',
196
+ selectors: { '& svg': { fontSize: '30' } },
197
+ },
131
198
  },
132
199
  },
133
200
  },
@@ -11,6 +11,8 @@ import { variants } from '../zyzz.config.js'
11
11
  * - Keep the text to a word or two that names a status or attribute, such as Testnet.
12
12
  * - Place it next to a title or row value. Use `inverse` for one recommended option.
13
13
  * - Render a static badge for display. Reach for `render` only when the badge performs an action.
14
+ * - Set `shape="icon"` for a badge that holds one icon: a 32px square, or a 24px circle at
15
+ * `small`. Label it with `aria-label` and `role="img"` when the icon carries meaning.
14
16
  *
15
17
  * @example
16
18
  * <Badge size="small" variant="outlined">
@@ -22,13 +24,13 @@ import { variants } from '../zyzz.config.js'
22
24
  * @see {@link https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum.html | WCAG 2.2 Contrast (Minimum)}
23
25
  */
24
26
  export function Badge(props: Badge.Props) {
25
- const { className, ref, render, size, variant, vars, ...attributes } = props
27
+ const { className, ref, render, shape, size, variant, vars, ...attributes } = props
26
28
 
27
29
  return useRender({
28
30
  defaultTagName: 'span',
29
31
  props: {
30
32
  ...attributes,
31
- ...styles.badge({ className, size, style: props.style, variant, vars }),
33
+ ...styles.badge({ className, shape, size, style: props.style, variant, vars }),
32
34
  },
33
35
  ref,
34
36
  render,
@@ -87,8 +89,42 @@ namespace styles {
87
89
  },
88
90
  },
89
91
  },
90
- defaultVariants: { size: 'medium', variant: 'soft' },
92
+ // An icon badge squares its box to the height of the size, so the shape outranks the size
93
+ // padding and minimum width.
94
+ compoundVariants: [
95
+ {
96
+ when: { shape: 'icon' },
97
+ style: { minWidth: '0', paddingInline: '0', width: '32' },
98
+ },
99
+ {
100
+ when: { shape: 'icon', size: 'small' },
101
+ style: {
102
+ borderRadius: 'full',
103
+ cornerShape: 'round',
104
+ height: '24',
105
+ width: '24',
106
+ // The spacing scale has no 14px step, so the icon takes the literal.
107
+ selectors: {
108
+ '& > svg': { height: '0.875rem !custom', width: '0.875rem !custom' },
109
+ },
110
+ },
111
+ },
112
+ // The Platform Icon Badge fills its gray badge with the subtle container, a step lighter
113
+ // than the soft Badge in light mode.
114
+ {
115
+ when: { shape: 'icon', variant: 'soft' },
116
+ style: { backgroundColor: 'container.subtle' },
117
+ },
118
+ ],
119
+ defaultVariants: { shape: 'default', size: 'medium', variant: 'soft' },
91
120
  variants: {
121
+ /**
122
+ * The box of the badge: `default` fits a label, and `icon` holds one icon in a 32px
123
+ * square, or in a 24px circle at `small`.
124
+ *
125
+ * @default 'default'
126
+ */
127
+ shape: { default: {}, icon: {} },
92
128
  size: {
93
129
  medium: {},
94
130
  small: {
@@ -13,6 +13,8 @@ import { Spinner } from './Spinner.js'
13
13
  * - Label with a specific verb, such as Send payment. Give `shape="icon"` buttons, which render as circles, an `aria-label`.
14
14
  * - Keep one `primary` button per view or section, and give the others `secondary` or `tertiary`.
15
15
  * - Use `danger` for the action that confirms a destructive outcome, such as Revoke key.
16
+ * - Use `text` for a low-emphasis action in running content, such as See more, with a trailing
17
+ * `ChevronRight`. It has no fill or padding, and ignores `size`.
16
18
  * - Set `appearance="inverse"` on an inverse surface, such as a dark banner on a light page, and
17
19
  * `appearance="overlay"` over an image or video.
18
20
  * - Use `large` for the actions in a dialog footer. Keep `xsmall` pills for actions inside a row
@@ -137,7 +139,8 @@ namespace styles {
137
139
  scale: 'press',
138
140
  transitionDuration: '100',
139
141
  },
140
- '&:disabled': { cursor: 'default', opacity: 'disabled' },
142
+ // The Platform Button dims a disabled button to 40%, more than `opacity.disabled`.
143
+ '&:disabled': { cursor: 'default', opacity: '0.4 !custom' },
141
144
  '&:focus-visible': { outlineColor: 'action.focusRing' },
142
145
  '&[data-loading]': { opacity: '1 !custom' },
143
146
  },
@@ -204,24 +207,56 @@ namespace styles {
204
207
  },
205
208
  },
206
209
  },
207
- // Figma paints the overlay fills as gray literals that no variable holds. Hover lightens
208
- // the fill.
210
+ // The overlay fills and text keep the same colors in both schemes. Hover lightens the fill.
209
211
  {
210
212
  when: { appearance: 'overlay', variant: 'secondary' },
211
213
  style: {
212
- backgroundColor: '#70707052 !custom',
213
- color: 'inverse.content.primary',
214
+ backgroundColor: 'overlay.container.regular',
215
+ color: 'overlay.content.primary',
214
216
  selectors: {
215
- '&:is(:hover, :active):not(:disabled)': { backgroundColor: '#70707048 !custom' },
217
+ '&:is(:hover, :active):not(:disabled)': {
218
+ backgroundColor: 'overlay.action.secondary.fill.hover',
219
+ },
216
220
  },
217
221
  },
218
222
  },
219
223
  {
220
- when: { appearance: ['inverse', 'overlay'], variant: 'tertiary' },
224
+ when: { appearance: 'inverse', variant: 'tertiary' },
221
225
  style: {
222
226
  color: 'inverse.content.primary',
223
227
  selectors: {
224
- '&:is(:hover, :active):not(:disabled)': { backgroundColor: 'neutral.tint.012' },
228
+ '&:is(:hover, :active):not(:disabled)': {
229
+ backgroundColor: 'inverse.container.regular',
230
+ },
231
+ },
232
+ },
233
+ },
234
+ {
235
+ when: { appearance: 'overlay', variant: 'tertiary' },
236
+ style: {
237
+ color: 'overlay.content.primary',
238
+ selectors: {
239
+ '&:is(:hover, :active):not(:disabled)': {
240
+ backgroundColor: 'overlay.action.tertiary.fill.hover',
241
+ },
242
+ },
243
+ },
244
+ },
245
+ // On the page, the `xsmall` pill fills with the container colors instead of the button fills.
246
+ {
247
+ when: { appearance: 'base', size: 'xsmall', variant: 'secondary' },
248
+ style: {
249
+ backgroundColor: 'container.regular',
250
+ selectors: {
251
+ '&:is(:hover, :active):not(:disabled)': { backgroundColor: 'container.strong' },
252
+ },
253
+ },
254
+ },
255
+ {
256
+ when: { appearance: 'base', size: 'xsmall', variant: 'tertiary' },
257
+ style: {
258
+ selectors: {
259
+ '&:is(:hover, :active):not(:disabled)': { backgroundColor: 'container.regular' },
225
260
  },
226
261
  },
227
262
  },
@@ -241,16 +276,18 @@ namespace styles {
241
276
  default: {},
242
277
  icon: { aspectRatio: '1 !custom' },
243
278
  },
244
- // `xsmall` is a pill for actions inside a row or field. The others keep radius `xs` and an 80px
245
- // minimum width, set on the label net of the padding, so a flex row never shrinks a button
246
- // below its label.
279
+ // `xsmall` is a pill for actions inside a row or field. `large` and `medium` round at `sm`,
280
+ // and `small` at `xs`. These keep an 80px minimum width, set on the label net of the
281
+ // padding, so a flex row never shrinks a button below its label.
247
282
  size: {
248
283
  large: {
284
+ borderRadius: 'sm',
249
285
  height: '48',
250
286
  paddingInline: '32',
251
287
  selectors: { '& > span:first-child': { minWidth: '1rem !custom' } },
252
288
  },
253
289
  medium: {
290
+ borderRadius: 'sm',
254
291
  height: '40',
255
292
  paddingInline: '24',
256
293
  selectors: { '& > span:first-child': { minWidth: '2rem !custom' } },
@@ -307,6 +344,22 @@ namespace styles {
307
344
  '&:active:not(:disabled)': { backgroundColor: 'action.tertiary.fill.pressed' },
308
345
  },
309
346
  },
347
+ // The text button draws only its label and icon, so it drops the fill, padding, and height
348
+ // of every size, and darkens its label on hover.
349
+ text: {
350
+ backgroundColor: 'transparent !custom',
351
+ borderRadius: '3xs',
352
+ color: 'content.secondary',
353
+ height: 'auto !custom',
354
+ padding: '0',
355
+ typography: 'body.b2Strong',
356
+ selectors: {
357
+ '& > span:first-child': { minWidth: '0 !custom' },
358
+ '& > span > svg': { fontSize: '12' },
359
+ '&:focus-visible': { outlineOffset: '2' },
360
+ '&:hover:not(:disabled)': { color: 'content.primary' },
361
+ },
362
+ },
310
363
  },
311
364
  },
312
365
  },
@@ -0,0 +1,45 @@
1
+ import type { ComponentPropsWithRef } from 'react'
2
+ import type * as zyzz from 'zyzz'
3
+ import { style } from '../zyzz.config.js'
4
+
5
+ /**
6
+ * A subtle box that sets a passage of body text apart from the text around it, such as a summary
7
+ * or an aside in an article. It renders a `div` with no role and announces nothing.
8
+ *
9
+ * - Keep it to a short passage that the reader can skip without missing a step.
10
+ * - Use `Alert` for a message about a status or an outcome.
11
+ *
12
+ * @example
13
+ * <Callout>Settlement finishes in under a second on Tempo.</Callout>
14
+ *
15
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/div | MDN div element}
16
+ */
17
+ export function Callout(props: Callout.Props) {
18
+ const { className, vars, ...attributes } = props
19
+
20
+ return <div {...attributes} {...styles.callout({ className, style: props.style, vars })} />
21
+ }
22
+
23
+ export namespace Callout {
24
+ export type Props = ComponentPropsWithRef<'div'> & zyzz.Props.Variants<typeof styles.callout>
25
+ }
26
+
27
+ namespace styles {
28
+ export const callout = style(
29
+ {
30
+ backgroundColor: 'container.subtle',
31
+ borderRadius: 'sm',
32
+ boxSizing: 'border-box',
33
+ color: 'content.primary',
34
+ paddingBlock: '24',
35
+ paddingInline: '32',
36
+ typography: 'body.b2',
37
+ selectors: {
38
+ // The browser's block margins of paragraphs and lists give way to the padding.
39
+ '& > :where(p, ul, ol):first-child': { marginBlockStart: '0' },
40
+ '& > :where(p, ul, ol):last-child': { marginBlockEnd: '0' },
41
+ },
42
+ },
43
+ { id: 'tds/web/callout' },
44
+ )
45
+ }
@@ -15,8 +15,8 @@ import { style, variants, vars } from '../zyzz.config.js'
15
15
  /**
16
16
  * A single-select segmented control built on Base UI Radio Group. The root has
17
17
  * `role="radiogroup"` and each item `role="radio"`. Tab enters and leaves the group, and the arrow
18
- * keys move and select. The `default` variant matches `Tabs`, with a raised pill that slides under
19
- * the checked item.
18
+ * keys move and select. The `default` variant slides a pill under the checked item. A `medium`
19
+ * track fills its row with equal items, as the Platform segmented control does.
20
20
  *
21
21
  * - Use it for a few mutually exclusive options that fit on screen. Use `Select` for longer lists.
22
22
  * - Name the group with a `Field.Label`, `aria-label`, or `aria-labelledby` pointing at a visible question.
@@ -37,7 +37,7 @@ import { style, variants, vars } from '../zyzz.config.js'
37
37
  export namespace ChoiceGroup {
38
38
  /**
39
39
  * One option, rendered as a `span` with `role="radio"` and a hidden native input beside it. Its
40
- * text content is its accessible name. A checked item sets its label in the strong weight, and
40
+ * text content is its accessible name. A checked small or large item sets its label in the strong weight, and
41
41
  * every item reserves the width of that weight for the text in its children, so a change of
42
42
  * selection never shifts the row. Text that an element child renders reserves no width.
43
43
  */
@@ -303,7 +303,7 @@ namespace styles {
303
303
  export const root = variants(
304
304
  {
305
305
  base: { boxSizing: 'border-box', display: 'inline-flex', position: 'relative' },
306
- // The default track matches Tabs: items and the pill sit 4px in, so their radius is the
306
+ // In the default track, items and the pill sit 4px in, so their radius is the
307
307
  // track's minus 4px. The small track insets them by 2px instead. Chips fill the track
308
308
  // height and take the Choicebox tile radius.
309
309
  compoundVariants: [
@@ -311,9 +311,23 @@ namespace styles {
311
311
  when: { size: 'large', variant: 'default' },
312
312
  style: { borderRadius: 'sm', selectors: { '& > *': { borderRadius: 'xs' } } },
313
313
  },
314
+ // The medium track is the Platform segmented control: it fills its container and splits
315
+ // it into equal items, and its pill lies flat in the secondary background.
314
316
  {
315
317
  when: { size: 'medium', variant: 'default' },
316
- style: { borderRadius: 'xs', selectors: { '& > *': { borderRadius: '2xs' } } },
318
+ style: {
319
+ borderRadius: 'xs',
320
+ display: 'flex',
321
+ justifySelf: 'stretch',
322
+ selectors: {
323
+ '& > *': { borderRadius: '2xs' },
324
+ '& > [role="radio"]': { color: 'content.primary', flex: '1 1 0 !custom' },
325
+ '& > span[aria-hidden="true"]': {
326
+ backgroundColor: 'background.secondary',
327
+ boxShadow: 'none !custom',
328
+ },
329
+ },
330
+ },
317
331
  },
318
332
  {
319
333
  when: { size: 'small', variant: 'default' },
@@ -344,8 +358,8 @@ namespace styles {
344
358
  ],
345
359
  defaultVariants: { size: 'medium', variant: 'default' },
346
360
  variants: {
347
- // The shared control scale: 32, 40 and 56px tracks with 28, 32 and 48px items. Labels
348
- // take the strong weight only while their item is checked.
361
+ // 32, 48 and 56px tracks with 28, 40 and 48px items. Small and large labels take the
362
+ // strong weight only while their item is checked.
349
363
  size: {
350
364
  large: {
351
365
  height: '56',
@@ -359,16 +373,16 @@ namespace styles {
359
373
  '& > [role="radio"] [data-reserve]': { typography: 'body.b1Strong' },
360
374
  },
361
375
  },
376
+ // A checked medium item keeps the regular weight, as the Platform segment item draws it.
362
377
  medium: {
363
- height: '40',
378
+ height: '48',
364
379
  selectors: {
365
380
  '& > [role="radio"]': {
366
- height: '32',
381
+ height: '40',
367
382
  paddingInline: '16',
368
- typography: 'body.b2',
383
+ typography: 'body.b3',
369
384
  },
370
- '& > [role="radio"][data-checked]': { typography: 'body.b2Strong' },
371
- '& > [role="radio"] [data-reserve]': { typography: 'body.b2Strong' },
385
+ '& > [role="radio"] [data-reserve]': { typography: 'body.b3' },
372
386
  },
373
387
  },
374
388
  small: {
@@ -0,0 +1,42 @@
1
+ import type { ComponentPropsWithRef } from 'react'
2
+ import type * as zyzz from 'zyzz'
3
+ import { style } from '../zyzz.config.js'
4
+
5
+ /**
6
+ * Inline code in a native `code` element, set in the mono type on a regular container. It flows
7
+ * with the text around it and wraps with it, repeating its fill and padding on each line.
8
+ *
9
+ * - Use it for short identifiers, commands, and values inside a sentence, such as pnpm check.
10
+ * - Use `Snippet` for a command that people copy, and `Kbd` for keys.
11
+ *
12
+ * @example
13
+ * <p>
14
+ * Run <Code>pnpm check</Code> before you push.
15
+ * </p>
16
+ *
17
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/code | MDN code element}
18
+ */
19
+ export function Code(props: Code.Props) {
20
+ const { className, vars, ...attributes } = props
21
+
22
+ return <code {...attributes} {...styles.code({ className, style: props.style, vars })} />
23
+ }
24
+
25
+ export namespace Code {
26
+ export type Props = ComponentPropsWithRef<'code'> & zyzz.Props.Variants<typeof styles.code>
27
+ }
28
+
29
+ namespace styles {
30
+ export const code = style(
31
+ {
32
+ backgroundColor: 'container.regular',
33
+ borderRadius: '3xs',
34
+ boxDecorationBreak: 'clone !custom',
35
+ color: 'content.primary',
36
+ paddingBlock: '2',
37
+ paddingInline: '4',
38
+ typography: 'mono.m1',
39
+ },
40
+ { id: 'tds/web/code' },
41
+ )
42
+ }
@@ -69,10 +69,7 @@ export namespace CopyButton {
69
69
  ComponentPropsWithRef<'button'>,
70
70
  'children' | 'onClick' | 'onCopy' | 'value'
71
71
  > &
72
- Pick<
73
- Button.Props,
74
- 'focusableWhenDisabled' | 'nativeButton' | 'render' | 'size' | 'variant' | 'vars'
75
- > & {
72
+ Pick<Button.Props, 'focusableWhenDisabled' | 'nativeButton' | 'render' | 'size' | 'vars'> & {
76
73
  /**
77
74
  * Confirmation state from a parent that copies on its own click, such as a clickable row.
78
75
  * When set, the button leaves copying to that parent.
@@ -83,6 +80,13 @@ export namespace CopyButton {
83
80
  onCopy?: (() => void) | undefined
84
81
  /** Text written to the clipboard. */
85
82
  value: string
83
+ /**
84
+ * Style of the icon button. The `text` style has no fill or padding to hold an icon, so it is
85
+ * left out.
86
+ *
87
+ * @default 'tertiary'
88
+ */
89
+ variant?: Exclude<Button.Props['variant'], 'text'> | undefined
86
90
  }
87
91
  }
88
92
 
@@ -235,11 +235,12 @@ export namespace Dialog {
235
235
  // Drawer shares `close`, `description` and `title`. Outside a sized popup, they take the values of
236
236
  // the `small` size.
237
237
  export namespace styles {
238
+ // The scrim dims the page with black at 40%, which no opacity token sets.
238
239
  export const backdrop = style(
239
240
  {
240
241
  backgroundColor: 'neutral.100',
241
242
  inset: '0',
242
- opacity: 'disabled',
243
+ opacity: '0.4 !custom',
243
244
  position: 'fixed',
244
245
  transitionDuration: '240',
245
246
  transitionProperty: 'opacity',