@tempoxyz/ds 0.3.14 → 0.3.16

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 (209) hide show
  1. package/dist/docs/AGENTS.md +75 -10
  2. package/dist/docs/arsenal.md +44 -0
  3. package/dist/docs/{marketing/introduction/getting-started.md → marketing.md} +32 -24
  4. package/dist/docs/product/components/actions.md +2110 -0
  5. package/dist/docs/product/components/blockchain.md +3969 -0
  6. package/dist/docs/product/components/data-display.md +5901 -0
  7. package/dist/docs/product/components/feedback-and-status.md +4138 -0
  8. package/dist/docs/product/components/forms-and-inputs.md +10543 -0
  9. package/dist/docs/product/components/layout.md +3339 -0
  10. package/dist/docs/product/components/navigation.md +2914 -0
  11. package/dist/docs/product/components/overlays.md +4917 -0
  12. package/dist/docs/product/components.md +125 -125
  13. package/dist/docs/product/foundations.md +4597 -0
  14. package/dist/docs/product/patterns.md +10110 -0
  15. package/dist/marketing/index.js.zyzz.json +1 -1
  16. package/dist/marketing/vars.d.ts +618 -758
  17. package/dist/marketing/vars.d.ts.map +1 -1
  18. package/dist/marketing/vars.js +8 -5
  19. package/dist/marketing/vars.js.map +1 -1
  20. package/dist/marketing/vars.js.zyzz.json +1 -1
  21. package/dist/marketing/zyzz.config.d.ts +3042 -3757
  22. package/dist/marketing/zyzz.config.d.ts.map +1 -1
  23. package/dist/marketing/zyzz.config.js +1 -1
  24. package/dist/marketing/zyzz.config.js.map +1 -1
  25. package/dist/marketing/zyzz.config.js.zyzz.json +1 -1
  26. package/dist/mobile/components/Button.d.ts +115 -15
  27. package/dist/mobile/components/Button.d.ts.map +1 -1
  28. package/dist/mobile/components/Button.js +85 -14
  29. package/dist/mobile/components/Button.js.map +1 -1
  30. package/dist/mobile/components/IconButton.d.ts +129 -40
  31. package/dist/mobile/components/IconButton.d.ts.map +1 -1
  32. package/dist/mobile/components/IconButton.js +97 -28
  33. package/dist/mobile/components/IconButton.js.map +1 -1
  34. package/dist/mobile/components/TextInput.d.ts +132 -11
  35. package/dist/mobile/components/TextInput.d.ts.map +1 -1
  36. package/dist/mobile/components/TextInput.js +115 -14
  37. package/dist/mobile/components/TextInput.js.map +1 -1
  38. package/dist/mobile/index.d.ts +1 -0
  39. package/dist/mobile/index.d.ts.map +1 -1
  40. package/dist/mobile/index.js +1 -0
  41. package/dist/mobile/index.js.map +1 -1
  42. package/dist/mobile/vars.d.ts +103 -0
  43. package/dist/mobile/vars.d.ts.map +1 -1
  44. package/dist/mobile/vars.js +74 -0
  45. package/dist/mobile/vars.js.map +1 -1
  46. package/dist/mobile/zyzz.config.d.ts +408 -0
  47. package/dist/mobile/zyzz.config.d.ts.map +1 -1
  48. package/dist/web/components/AddressCard.js.zyzz.json +1 -1
  49. package/dist/web/components/Amount.css +1 -1
  50. package/dist/web/components/Amount.d.ts +9 -0
  51. package/dist/web/components/Amount.d.ts.map +1 -1
  52. package/dist/web/components/Amount.js +8 -5
  53. package/dist/web/components/Amount.js.map +1 -1
  54. package/dist/web/components/Amount.js.zyzz.json +1 -1
  55. package/dist/web/components/CopyButton.d.ts +6 -0
  56. package/dist/web/components/CopyButton.d.ts.map +1 -1
  57. package/dist/web/components/CopyButton.js +4 -1
  58. package/dist/web/components/CopyButton.js.map +1 -1
  59. package/dist/web/components/CopyButton.js.zyzz.json +1 -1
  60. package/dist/web/components/Hex.css +1 -1
  61. package/dist/web/components/Hex.d.ts +84 -3
  62. package/dist/web/components/Hex.d.ts.map +1 -1
  63. package/dist/web/components/Hex.js +20 -13
  64. package/dist/web/components/Hex.js.map +1 -1
  65. package/dist/web/components/Hex.js.zyzz.json +1 -1
  66. package/dist/web/components/Progress.css +1 -1
  67. package/dist/web/components/Progress.d.ts +12 -2
  68. package/dist/web/components/Progress.d.ts.map +1 -1
  69. package/dist/web/components/Progress.js +9 -5
  70. package/dist/web/components/Progress.js.map +1 -1
  71. package/dist/web/components/Progress.js.zyzz.json +1 -1
  72. package/dist/web/components/SecretValue.js.zyzz.json +1 -1
  73. package/dist/web/components/SidebarMenu.d.ts +4 -4
  74. package/dist/web/components/SidebarMenu.js +6 -6
  75. package/dist/web/components/SidebarMenu.js.map +1 -1
  76. package/dist/web/components/Snippet.js.zyzz.json +1 -1
  77. package/dist/web/index.js.zyzz.json +1 -1
  78. package/package.json +1 -1
  79. package/src/marketing/README.md +1 -1
  80. package/src/marketing/vars.ts +526 -604
  81. package/src/marketing/zyzz.config.ts +5 -4
  82. package/src/mobile/README.md +19 -6
  83. package/src/mobile/components/Button.tsx +94 -17
  84. package/src/mobile/components/IconButton.tsx +122 -30
  85. package/src/mobile/components/TextInput.tsx +139 -24
  86. package/src/mobile/index.ts +1 -0
  87. package/src/mobile/vars.ts +74 -0
  88. package/src/web/components/Amount.tsx +37 -3
  89. package/src/web/components/CopyButton.tsx +8 -0
  90. package/src/web/components/Hex.tsx +79 -13
  91. package/src/web/components/Progress.tsx +8 -2
  92. package/src/web/components/SidebarMenu.tsx +6 -6
  93. package/dist/docs/index.md +0 -145
  94. package/dist/docs/product/components/accordion.md +0 -489
  95. package/dist/docs/product/components/address-card.md +0 -147
  96. package/dist/docs/product/components/agent-logo.md +0 -194
  97. package/dist/docs/product/components/alert-dialog.md +0 -631
  98. package/dist/docs/product/components/alert.md +0 -448
  99. package/dist/docs/product/components/amount-input.md +0 -305
  100. package/dist/docs/product/components/amount.md +0 -794
  101. package/dist/docs/product/components/app-shell.md +0 -559
  102. package/dist/docs/product/components/asset-chip.md +0 -294
  103. package/dist/docs/product/components/autocomplete.md +0 -620
  104. package/dist/docs/product/components/avatar.md +0 -321
  105. package/dist/docs/product/components/badge.md +0 -339
  106. package/dist/docs/product/components/badged-logo.md +0 -116
  107. package/dist/docs/product/components/banner.md +0 -379
  108. package/dist/docs/product/components/bar-chart.md +0 -208
  109. package/dist/docs/product/components/breadcrumbs.md +0 -380
  110. package/dist/docs/product/components/button-group.md +0 -286
  111. package/dist/docs/product/components/button.md +0 -650
  112. package/dist/docs/product/components/calendar.md +0 -375
  113. package/dist/docs/product/components/callout.md +0 -96
  114. package/dist/docs/product/components/checkbox-group.md +0 -521
  115. package/dist/docs/product/components/checkbox.md +0 -467
  116. package/dist/docs/product/components/choice-group.md +0 -516
  117. package/dist/docs/product/components/choicebox.md +0 -641
  118. package/dist/docs/product/components/code.md +0 -100
  119. package/dist/docs/product/components/combobox.md +0 -939
  120. package/dist/docs/product/components/container.md +0 -257
  121. package/dist/docs/product/components/copy-button.md +0 -642
  122. package/dist/docs/product/components/date-picker.md +0 -514
  123. package/dist/docs/product/components/dialog.md +0 -1332
  124. package/dist/docs/product/components/drawer.md +0 -966
  125. package/dist/docs/product/components/empty.md +0 -340
  126. package/dist/docs/product/components/field.md +0 -570
  127. package/dist/docs/product/components/fieldset.md +0 -398
  128. package/dist/docs/product/components/frame.md +0 -434
  129. package/dist/docs/product/components/gauge.md +0 -299
  130. package/dist/docs/product/components/get-started-visual.md +0 -117
  131. package/dist/docs/product/components/grid.md +0 -288
  132. package/dist/docs/product/components/hero-visual.md +0 -155
  133. package/dist/docs/product/components/hex.md +0 -487
  134. package/dist/docs/product/components/icon-tile.md +0 -292
  135. package/dist/docs/product/components/identicon.md +0 -371
  136. package/dist/docs/product/components/inline.md +0 -233
  137. package/dist/docs/product/components/inset.md +0 -225
  138. package/dist/docs/product/components/kbd.md +0 -423
  139. package/dist/docs/product/components/list-group.md +0 -981
  140. package/dist/docs/product/components/loading-dots.md +0 -237
  141. package/dist/docs/product/components/menu.md +0 -934
  142. package/dist/docs/product/components/native-select.md +0 -204
  143. package/dist/docs/product/components/network-logo.md +0 -248
  144. package/dist/docs/product/components/number-field.md +0 -543
  145. package/dist/docs/product/components/otp-field.md +0 -616
  146. package/dist/docs/product/components/pagination.md +0 -516
  147. package/dist/docs/product/components/popover.md +0 -544
  148. package/dist/docs/product/components/progress.md +0 -388
  149. package/dist/docs/product/components/qr.md +0 -314
  150. package/dist/docs/product/components/radio-group.md +0 -528
  151. package/dist/docs/product/components/secret-value.md +0 -406
  152. package/dist/docs/product/components/select.md +0 -751
  153. package/dist/docs/product/components/separator.md +0 -379
  154. package/dist/docs/product/components/sidebar-menu.md +0 -922
  155. package/dist/docs/product/components/skeleton.md +0 -517
  156. package/dist/docs/product/components/slider.md +0 -539
  157. package/dist/docs/product/components/snippet.md +0 -424
  158. package/dist/docs/product/components/spinner.md +0 -216
  159. package/dist/docs/product/components/split-bar.md +0 -139
  160. package/dist/docs/product/components/split-button.md +0 -464
  161. package/dist/docs/product/components/stack.md +0 -299
  162. package/dist/docs/product/components/status-chip.md +0 -226
  163. package/dist/docs/product/components/status-indicator.md +0 -119
  164. package/dist/docs/product/components/status-row.md +0 -174
  165. package/dist/docs/product/components/stepper.md +0 -451
  166. package/dist/docs/product/components/success-hero.md +0 -157
  167. package/dist/docs/product/components/surface.md +0 -639
  168. package/dist/docs/product/components/switch.md +0 -472
  169. package/dist/docs/product/components/table.md +0 -968
  170. package/dist/docs/product/components/tabs.md +0 -627
  171. package/dist/docs/product/components/tempo-logo.md +0 -185
  172. package/dist/docs/product/components/text-input.md +0 -624
  173. package/dist/docs/product/components/textarea.md +0 -352
  174. package/dist/docs/product/components/toast.md +0 -535
  175. package/dist/docs/product/components/token-logo.md +0 -371
  176. package/dist/docs/product/components/token.md +0 -247
  177. package/dist/docs/product/components/tooltip.md +0 -490
  178. package/dist/docs/product/components/verification-code.md +0 -116
  179. package/dist/docs/product/components/visual.md +0 -249
  180. package/dist/docs/product/foundations/accessibility.md +0 -377
  181. package/dist/docs/product/foundations/agents.md +0 -159
  182. package/dist/docs/product/foundations/color.md +0 -522
  183. package/dist/docs/product/foundations/content/tone.md +0 -194
  184. package/dist/docs/product/foundations/content/voice.md +0 -194
  185. package/dist/docs/product/foundations/content/writing-style.md +0 -406
  186. package/dist/docs/product/foundations/iconography.md +0 -282
  187. package/dist/docs/product/foundations/intent.md +0 -360
  188. package/dist/docs/product/foundations/layout.md +0 -508
  189. package/dist/docs/product/foundations/linter.md +0 -523
  190. package/dist/docs/product/foundations/motion.md +0 -151
  191. package/dist/docs/product/foundations/radius-and-padding.md +0 -86
  192. package/dist/docs/product/foundations/typography.md +0 -331
  193. package/dist/docs/product/introduction/faq.md +0 -133
  194. package/dist/docs/product/introduction/getting-started.md +0 -377
  195. package/dist/docs/product/patterns/blockchain-values.md +0 -709
  196. package/dist/docs/product/patterns/dashboards.md +0 -638
  197. package/dist/docs/product/patterns/destructive-actions.md +0 -626
  198. package/dist/docs/product/patterns/empty-states.md +0 -612
  199. package/dist/docs/product/patterns/errors-and-validation.md +0 -808
  200. package/dist/docs/product/patterns/feedback-and-status.md +0 -518
  201. package/dist/docs/product/patterns/forms.md +0 -679
  202. package/dist/docs/product/patterns/loading.md +0 -630
  203. package/dist/docs/product/patterns/navigation.md +0 -397
  204. package/dist/docs/product/patterns/payments.md +0 -765
  205. package/dist/docs/product/patterns/responsive-layout.md +0 -997
  206. package/dist/docs/product/patterns/tables-and-lists.md +0 -1170
  207. package/dist/docs/product/products/tempo-console.md +0 -671
  208. package/dist/docs/product/products/tempo-performance.md +0 -435
  209. package/dist/docs/product/products/tempo-wallet.md +0 -438
@@ -1,489 +0,0 @@
1
- # Accordion
2
-
3
- Stacks collapsible sections that each reveal a labelled panel.
4
-
5
- [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/Accordion.tsx)
6
-
7
- ## Overview
8
-
9
- Each trigger toggles a labelled panel. By default, one item is open at a time.
10
-
11
- ## Examples
12
-
13
- ### Basic
14
-
15
- ```tsx
16
- import { Accordion, style } from '@tempoxyz/ds'
17
-
18
- export const fill = true
19
- export function Demo() {
20
- return (
21
- <Accordion.Root defaultValue={['one']} {...styles.root()}>
22
- <Accordion.Item value="one">
23
- <Accordion.Trigger>What is Tempo?</Accordion.Trigger>
24
- <Accordion.Panel>A blockchain for payments.</Accordion.Panel>
25
- </Accordion.Item>
26
- <Accordion.Item value="two">
27
- <Accordion.Trigger>How do fees work?</Accordion.Trigger>
28
- <Accordion.Panel>Fees are paid in stablecoins.</Accordion.Panel>
29
- </Accordion.Item>
30
- </Accordion.Root>
31
- )
32
- }
33
-
34
- namespace styles {
35
- export const root = style({ maxWidth: '28rem !custom' })
36
- }
37
- ```
38
-
39
- [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Accordion/Basic.tsx)
40
-
41
- ### Size
42
-
43
- Set `size` to `small`, `medium` (default), or `large`.
44
-
45
- ```tsx
46
- import { Accordion, Stack, style } from '@tempoxyz/ds'
47
-
48
- export const fill = true
49
- function Items(props: Accordion.Root.Props) {
50
- return (
51
- <Accordion.Root {...props}>
52
- <Accordion.Item value="one">
53
- <Accordion.Trigger>What is Tempo?</Accordion.Trigger>
54
- <Accordion.Panel>A blockchain for payments.</Accordion.Panel>
55
- </Accordion.Item>
56
- <Accordion.Item value="two">
57
- <Accordion.Trigger>How do fees work?</Accordion.Trigger>
58
- <Accordion.Panel>Fees are paid in stablecoins.</Accordion.Panel>
59
- </Accordion.Item>
60
- </Accordion.Root>
61
- )
62
- }
63
-
64
- export function Demo() {
65
- return (
66
- <Stack gap="32" {...styles.stack()}>
67
- {(['small', 'medium', 'large'] as const).map((size) => (
68
- <Items defaultValue={['one']} key={size} size={size} />
69
- ))}
70
- </Stack>
71
- )
72
- }
73
-
74
- namespace styles {
75
- export const stack = style({ maxWidth: '28rem !custom' })
76
- }
77
- ```
78
-
79
- [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Accordion/Size.tsx)
80
-
81
- ### Multiple
82
-
83
- Set `multiple` on `Accordion.Root` to keep several items open at once.
84
-
85
- ```tsx
86
- import { Accordion, style } from '@tempoxyz/ds'
87
-
88
- export const fill = true
89
- export function Demo() {
90
- return (
91
- <Accordion.Root multiple {...styles.root()}>
92
- <Accordion.Item value="one">
93
- <Accordion.Trigger>What is Tempo?</Accordion.Trigger>
94
- <Accordion.Panel>A blockchain for payments.</Accordion.Panel>
95
- </Accordion.Item>
96
- <Accordion.Item value="two">
97
- <Accordion.Trigger>How do fees work?</Accordion.Trigger>
98
- <Accordion.Panel>Fees are paid in stablecoins.</Accordion.Panel>
99
- </Accordion.Item>
100
- </Accordion.Root>
101
- )
102
- }
103
-
104
- namespace styles {
105
- export const root = style({ maxWidth: '28rem !custom' })
106
- }
107
- ```
108
-
109
- [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Accordion/Multiple.tsx)
110
-
111
- ### Disabled
112
-
113
- Set `disabled` on an `Accordion.Item` to block it from opening.
114
-
115
- ```tsx
116
- import { Accordion, style } from '@tempoxyz/ds'
117
-
118
- export const fill = true
119
- export function Demo() {
120
- return (
121
- <Accordion.Root {...styles.root()}>
122
- <Accordion.Item value="one">
123
- <Accordion.Trigger>What is Tempo?</Accordion.Trigger>
124
- <Accordion.Panel>A blockchain for payments.</Accordion.Panel>
125
- </Accordion.Item>
126
- <Accordion.Item disabled value="three">
127
- <Accordion.Trigger>Disabled</Accordion.Trigger>
128
- <Accordion.Panel>Hidden.</Accordion.Panel>
129
- </Accordion.Item>
130
- </Accordion.Root>
131
- )
132
- }
133
-
134
- namespace styles {
135
- export const root = style({ maxWidth: '28rem !custom' })
136
- }
137
- ```
138
-
139
- [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Accordion/Disabled.tsx)
140
-
141
- ## Anatomy
142
-
143
- Import the component and assemble its parts.
144
-
145
- ```tsx
146
- import { Accordion } from '@tempoxyz/ds'
147
-
148
- <Accordion.Root>
149
- <Accordion.Item>
150
- <Accordion.Trigger />
151
- <Accordion.Panel />
152
- </Accordion.Item>
153
- </Accordion.Root>
154
- ```
155
-
156
- ## Guidelines
157
-
158
- ### When to Use
159
-
160
- * Shorten a page of related, optional content, such as fee help answers or advanced webhook settings.
161
- * Let people scan summaries and open only the sections they need.
162
-
163
- ### When Not to Use
164
-
165
- * Use [Tabs](tabs.md) to switch between views of equal weight, such as Balances and Activity.
166
- * Use [ListGroup](list-group.md) for facts people check at a glance, such as the amount and fee of a payment.
167
- * Use [Stepper](stepper.md) for steps people complete in order.
168
- * If most people need the content, keep it visible in a [Surface](surface.md), such as the amount and fee on a payment review.
169
-
170
- ### Summarize the Panel in the Trigger
171
-
172
- A closed panel shows only its trigger. Write each trigger so people can tell what the panel holds before they open it.
173
-
174
- **Do:** Write triggers that say what each panel contains.
175
-
176
- ```tsx
177
- /**
178
- * Do example for "Summarize the Panel in the Trigger" on the Accordion page.
179
- * Write triggers that say what each panel contains.
180
- * @module
181
- */
182
- import { Accordion } from '@tempoxyz/ds'
183
-
184
- /** Renders the static preview, which the guideline card shows inert. */
185
- export function Demo() {
186
- return (
187
- <Accordion.Root>
188
- <Accordion.Item value="cost">
189
- <Accordion.Trigger>What does a transfer cost?</Accordion.Trigger>
190
- <Accordion.Panel>Each transfer pays a network fee in a stablecoin.</Accordion.Panel>
191
- </Accordion.Item>
192
- <Accordion.Item value="settle">
193
- <Accordion.Trigger>When does a payment settle?</Accordion.Trigger>
194
- <Accordion.Panel>A payment settles when its block is final.</Accordion.Panel>
195
- </Accordion.Item>
196
- <Accordion.Item value="tokens">
197
- <Accordion.Trigger>Which tokens can pay fees?</Accordion.Trigger>
198
- <Accordion.Panel>Supported stablecoins, such as PathUSD and USDC.</Accordion.Panel>
199
- </Accordion.Item>
200
- </Accordion.Root>
201
- )
202
- }
203
- ```
204
-
205
- **Don't:** Use labels such as Details, More info, or Other.
206
-
207
- ```tsx
208
- /**
209
- * Don't example for "Summarize the Panel in the Trigger" on the Accordion page.
210
- * Don't use labels such as Details, More info, or Other.
211
- * @module
212
- */
213
- import { Accordion } from '@tempoxyz/ds'
214
-
215
- /** Renders the static preview, which the guideline card shows inert. */
216
- export function Demo() {
217
- return (
218
- <Accordion.Root>
219
- <Accordion.Item value="details">
220
- <Accordion.Trigger>Details</Accordion.Trigger>
221
- <Accordion.Panel>Each transfer pays a network fee in a stablecoin.</Accordion.Panel>
222
- </Accordion.Item>
223
- <Accordion.Item value="more">
224
- <Accordion.Trigger>More info</Accordion.Trigger>
225
- <Accordion.Panel>A payment settles when its block is final.</Accordion.Panel>
226
- </Accordion.Item>
227
- <Accordion.Item value="other">
228
- <Accordion.Trigger>Other</Accordion.Trigger>
229
- <Accordion.Panel>Supported stablecoins, such as PathUSD and USDC.</Accordion.Panel>
230
- </Accordion.Item>
231
- </Accordion.Root>
232
- )
233
- }
234
- ```
235
-
236
- ### Open the Item Most People Need
237
-
238
- Opening one item closes the others. Open the item most people need with `defaultValue`. If people compare panels, such as two groups of webhook settings, set `multiple`.
239
-
240
- **Do:** Open one item by default, the one most people need.
241
-
242
- ```tsx
243
- /**
244
- * Do example for "Open the Item Most People Need" on the Accordion page.
245
- * Open one item by default, the one most people need.
246
- * @module
247
- */
248
- import { Accordion } from '@tempoxyz/ds'
249
-
250
- /** Renders the static preview, which the guideline card shows inert. */
251
- export function Demo() {
252
- return (
253
- <Accordion.Root defaultValue={['cost']}>
254
- <Accordion.Item value="cost">
255
- <Accordion.Trigger>What does a transfer cost?</Accordion.Trigger>
256
- <Accordion.Panel>Each transfer pays a network fee in a stablecoin.</Accordion.Panel>
257
- </Accordion.Item>
258
- <Accordion.Item value="settle">
259
- <Accordion.Trigger>When does a payment settle?</Accordion.Trigger>
260
- <Accordion.Panel>A payment settles when its block is final.</Accordion.Panel>
261
- </Accordion.Item>
262
- <Accordion.Item value="tokens">
263
- <Accordion.Trigger>Which tokens can pay fees?</Accordion.Trigger>
264
- <Accordion.Panel>Supported stablecoins, such as PathUSD and USDC.</Accordion.Panel>
265
- </Accordion.Item>
266
- </Accordion.Root>
267
- )
268
- }
269
- ```
270
-
271
- **Don't:** Open every item when people read one at a time.
272
-
273
- ```tsx
274
- /**
275
- * Don't example for "Open the Item Most People Need" on the Accordion page.
276
- * Don't open every item when people read one at a time.
277
- * @module
278
- */
279
- import { Accordion } from '@tempoxyz/ds'
280
-
281
- /** Renders the static preview, which the guideline card shows inert. */
282
- export function Demo() {
283
- return (
284
- <Accordion.Root defaultValue={['cost', 'settle', 'tokens']} multiple>
285
- <Accordion.Item value="cost">
286
- <Accordion.Trigger>What does a transfer cost?</Accordion.Trigger>
287
- <Accordion.Panel>Each transfer pays a network fee in a stablecoin.</Accordion.Panel>
288
- </Accordion.Item>
289
- <Accordion.Item value="settle">
290
- <Accordion.Trigger>When does a payment settle?</Accordion.Trigger>
291
- <Accordion.Panel>A payment settles when its block is final.</Accordion.Panel>
292
- </Accordion.Item>
293
- <Accordion.Item value="tokens">
294
- <Accordion.Trigger>Which tokens can pay fees?</Accordion.Trigger>
295
- <Accordion.Panel>Supported stablecoins, such as PathUSD and USDC.</Accordion.Panel>
296
- </Accordion.Item>
297
- </Accordion.Root>
298
- )
299
- }
300
- ```
301
-
302
- ### Keep Panels Short and Flat
303
-
304
- Keep each panel to a few short paragraphs, a list, or a small form. Link to a separate page for more.
305
-
306
- **Do:** Answer in a sentence or two inside the panel.
307
-
308
- ```tsx
309
- /**
310
- * Do example for "Keep Panels Short and Flat" on the Accordion page.
311
- * Answer in a sentence or two inside the panel.
312
- * @module
313
- */
314
- import { Accordion } from '@tempoxyz/ds'
315
-
316
- /** Renders the static preview, which the guideline card shows inert. */
317
- export function Demo() {
318
- return (
319
- <Accordion.Root defaultValue={['retry']}>
320
- <Accordion.Item value="retry">
321
- <Accordion.Trigger>Retry policy</Accordion.Trigger>
322
- <Accordion.Panel>Failed deliveries retry 5 times over 24 hours.</Accordion.Panel>
323
- </Accordion.Item>
324
- <Accordion.Item value="signing">
325
- <Accordion.Trigger>Signing secret</Accordion.Trigger>
326
- <Accordion.Panel>Each delivery is signed with the webhook's secret.</Accordion.Panel>
327
- </Accordion.Item>
328
- </Accordion.Root>
329
- )
330
- }
331
- ```
332
-
333
- **Don't:** Nest an accordion inside a panel.
334
-
335
- ```tsx
336
- /**
337
- * Don't example for "Keep Panels Short and Flat" on the Accordion page.
338
- * Don't nest an accordion inside a panel.
339
- * @module
340
- */
341
- import { Accordion } from '@tempoxyz/ds'
342
-
343
- /** Renders the static preview, which the guideline card shows inert. */
344
- export function Demo() {
345
- return (
346
- <Accordion.Root defaultValue={['retry']}>
347
- <Accordion.Item value="retry">
348
- <Accordion.Trigger>Retry policy</Accordion.Trigger>
349
- <Accordion.Panel>
350
- <Accordion.Root defaultValue={['attempts']} size="small">
351
- <Accordion.Item value="attempts">
352
- <Accordion.Trigger>Attempts</Accordion.Trigger>
353
- <Accordion.Panel>Failed deliveries retry 5 times over 24 hours.</Accordion.Panel>
354
- </Accordion.Item>
355
- </Accordion.Root>
356
- </Accordion.Panel>
357
- </Accordion.Item>
358
- <Accordion.Item value="signing">
359
- <Accordion.Trigger>Signing secret</Accordion.Trigger>
360
- <Accordion.Panel>Each delivery is signed with the webhook's secret.</Accordion.Panel>
361
- </Accordion.Item>
362
- </Accordion.Root>
363
- )
364
- }
365
- ```
366
-
367
- ### Keep Collapsed Content Reachable
368
-
369
- Closed panels unmount. Set the prop that matches the content, on `Accordion.Root` or an `Accordion.Panel`.
370
-
371
- * **Searchable Text (hiddenUntilFound):** Lets find in page search closed panels and open the one that matches.
372
- * **Form Inputs (keepMounted):** Keeps the values of form inputs when their panel closes.
373
-
374
- ### Explain Instead of Disabling
375
-
376
- A disabled item hides content without a reason. Remove the item, or keep it enabled and explain in the panel what is unavailable.
377
-
378
- **Do:** Keep the item enabled, and state in the panel when it becomes available.
379
-
380
- ```tsx
381
- /**
382
- * Do example for "Explain Instead of Disabling" on the Accordion page.
383
- * Keep the item enabled, and state in the panel when it becomes available.
384
- * @module
385
- */
386
- import { Accordion } from '@tempoxyz/ds'
387
-
388
- /** Renders the static preview, which the guideline card shows inert. */
389
- export function Demo() {
390
- return (
391
- <Accordion.Root defaultValue={['withdraw']}>
392
- <Accordion.Item value="deposit">
393
- <Accordion.Trigger>Deposit funds</Accordion.Trigger>
394
- <Accordion.Panel>Send USDC to your wallet address.</Accordion.Panel>
395
- </Accordion.Item>
396
- <Accordion.Item value="withdraw">
397
- <Accordion.Trigger>Withdraw funds</Accordion.Trigger>
398
- <Accordion.Panel>Withdrawals open after you verify your identity.</Accordion.Panel>
399
- </Accordion.Item>
400
- </Accordion.Root>
401
- )
402
- }
403
- ```
404
-
405
- **Don't:** Disable an item without a reason.
406
-
407
- ```tsx
408
- /**
409
- * Don't example for "Explain Instead of Disabling" on the Accordion page.
410
- * Don't disable an item without a reason.
411
- * @module
412
- */
413
- import { Accordion } from '@tempoxyz/ds'
414
-
415
- /** Renders the static preview, which the guideline card shows inert. */
416
- export function Demo() {
417
- return (
418
- <Accordion.Root>
419
- <Accordion.Item value="deposit">
420
- <Accordion.Trigger>Deposit funds</Accordion.Trigger>
421
- <Accordion.Panel>Send USDC to your wallet address.</Accordion.Panel>
422
- </Accordion.Item>
423
- <Accordion.Item disabled value="withdraw">
424
- <Accordion.Trigger>Withdraw funds</Accordion.Trigger>
425
- <Accordion.Panel>Withdrawals open after you verify your identity.</Accordion.Panel>
426
- </Accordion.Item>
427
- </Accordion.Root>
428
- )
429
- }
430
- ```
431
-
432
- ## Content
433
-
434
- * Use questions for help content and nouns for settings groups, such as Retry policy.
435
- * Keep one form across items: all questions or all nouns.
436
- * Answer in the first sentence of the panel, then add detail.
437
- * Don't repeat the trigger at the top of its panel.
438
-
439
- ## Accessibility
440
-
441
- Each item pairs a heading button with its panel, following the [WAI-ARIA Accordion pattern](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/) for required keys.
442
-
443
- ### Semantics
444
-
445
- * **Accordion.Trigger (button):** A native button inside a heading, reachable by heading navigation.
446
- * **Expanded State (aria-expanded):** Reports whether the panel is open. `aria-controls` points at the panel.
447
- * **Accordion.Panel (region):** Each panel is labelled by its trigger.
448
- * **Disabled Items (aria-disabled):** A disabled trigger stays in the tab order.
449
- * **Chevron (aria-hidden):** Hidden from assistive technology.
450
-
451
- ### Keyboard
452
-
453
- * **Move to the Next Trigger (Tab):** Moves focus to the next trigger or into the open panel.
454
- * **Move to the Previous Control (Shift+Tab):** Moves focus to the previous trigger or control.
455
- * **Open or Close the Item (Enter or Space):** Opens or closes the focused item. Without `multiple`, it also closes the open one.
456
-
457
- The arrow keys do not move focus between triggers.
458
-
459
- ### Focus
460
-
461
- * **Focus Stays Put:** Focus stays on the trigger when its panel opens or closes.
462
- * **Closed Panels (keepMounted):** A closed panel unmounts by default and leaves the tab order.
463
-
464
- ### Motion
465
-
466
- * **Reduced Motion (prefers-reduced-motion):** Panels fade without animating their height, and the chevron flips instantly.
467
-
468
- ### Your Responsibilities
469
-
470
- * **Fit the Outline (h3):** Triggers render inside an `h3`, so place the accordion under an `h2`.
471
- * **Keep Triggers Plain:** Don't put controls inside a trigger. It is already a button.
472
-
473
- ## Related
474
-
475
- [Tabs](tabs.md)
476
-
477
- Use for switching between views.
478
-
479
- [ListGroup](list-group.md)
480
-
481
- Use for expanding a detail under one row.
482
-
483
- [Stepper](stepper.md)
484
-
485
- Use for sequential steps.
486
-
487
- [Surface](surface.md)
488
-
489
- Use for content that stays visible.
@@ -1,147 +0,0 @@
1
- # AddressCard
2
-
3
- Shows a wallet address to receive funds, with its QR code and networks.
4
-
5
- [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/AddressCard.tsx)
6
-
7
- Figma: [Content/Address Card](https://www.figma.com/design/yE96kcymnNR88PJp6G1sPs?node-id=5227-4005)
8
-
9
- ## Overview
10
-
11
- An address card renders a bordered receive card. A QR code of the address sits beside the shortened address, a copy button, and the networks that the address accepts.
12
-
13
- ## Examples
14
-
15
- ### Basic
16
-
17
- Pass the full `address`. The card shows its first and last four characters.
18
-
19
- ```tsx
20
- /** Demonstrates AddressCard in the documentation. @module */
21
- import { AddressCard, style } from '@tempoxyz/ds'
22
-
23
- export function Demo() {
24
- return (
25
- <div {...styles.frame()}>
26
- <AddressCard address="0x7a3f2c9b1e4d8a6f0c5b3e7d9a1f4c8e2b6d91c2" />
27
- </div>
28
- )
29
- }
30
-
31
- namespace styles {
32
- export const frame = style({ maxWidth: '28.75rem !custom', width: '100% !custom' })
33
- }
34
- ```
35
-
36
- [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/AddressCard/Basic.tsx)
37
-
38
- ### Networks
39
-
40
- Add `AddressCard.Networks` with one `AddressCard.Network` per network. Set `selected` on the picked one.
41
-
42
- ```tsx
43
- /** Demonstrates AddressCard in the documentation. @module */
44
- import { AddressCard, style } from '@tempoxyz/ds'
45
-
46
- export function Demo() {
47
- return (
48
- <div {...styles.frame()}>
49
- <AddressCard address="0x7a3f2c9b1e4d8a6f0c5b3e7d9a1f4c8e2b6d91c2">
50
- <AddressCard.Networks>
51
- <AddressCard.Network network="ethereum" selected>
52
- Ethereum
53
- </AddressCard.Network>
54
- <AddressCard.Network network="base">Base</AddressCard.Network>
55
- <AddressCard.Network network="solana">Solana</AddressCard.Network>
56
- <AddressCard.Network network="tempo">Tempo</AddressCard.Network>
57
- </AddressCard.Networks>
58
- </AddressCard>
59
- </div>
60
- )
61
- }
62
-
63
- namespace styles {
64
- export const frame = style({ maxWidth: '28.75rem !custom', width: '100% !custom' })
65
- }
66
- ```
67
-
68
- [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/AddressCard/Networks.tsx)
69
-
70
- ## Anatomy
71
-
72
- Import the component and assemble its parts.
73
-
74
- ```tsx
75
- import { AddressCard } from '@tempoxyz/ds'
76
-
77
- <AddressCard>
78
- <AddressCard.Networks>
79
- <AddressCard.Network />
80
- </AddressCard.Networks>
81
- </AddressCard>
82
- ```
83
-
84
- ## Guidelines
85
-
86
- ### When to Use
87
-
88
- * Show the address that a person sends funds to, such as on a deposit screen.
89
- * Let a person scan the address from another device or copy it.
90
-
91
- ### When Not to Use
92
-
93
- * Use [Hex](hex.md) for an address inside a row or a sentence.
94
- * Use [Qr](qr.md) alone for a code that encodes something other than an address.
95
-
96
- ### List Only the Accepted Networks
97
-
98
- **Do:** List the networks that the address accepts.
99
-
100
- ```tsx
101
- <AddressCard address="0x7a3f2c9b1e4d8a6f0c5b3e7d9a1f4c8e2b6d91c2">
102
- <AddressCard.Networks>
103
- <AddressCard.Network network="tempo" selected>
104
- Tempo
105
- </AddressCard.Network>
106
- <AddressCard.Network network="base">Base</AddressCard.Network>
107
- </AddressCard.Networks>
108
- </AddressCard>
109
- ```
110
-
111
- **Don't:** Leave out the networks when the address accepts only some of them.
112
-
113
- ```tsx
114
- <AddressCard address="0x7a3f2c9b1e4d8a6f0c5b3e7d9a1f4c8e2b6d91c2" />
115
- ```
116
-
117
- ### Keep the Full Address
118
-
119
- Pass the whole address. The card shortens the text, and the copy button and QR code use the full value.
120
-
121
- ## Content
122
-
123
- * **Label:** Name the address from the reader's view, such as Your wallet address.
124
- * **Networks:** Name each network as its brand does, such as Ethereum or Base.
125
-
126
- ## Accessibility
127
-
128
- The card renders a `<div>` with no role. Screen readers read the full address, the named QR code, the copy button, and the network group.
129
-
130
- * **Address (Full value):** Screen readers read every character, not the shortened text.
131
- * **Copy (button):** The copy button announces Copied after a copy.
132
- * **Networks (group):** The label names the group of network chips.
133
- * **Pick a Network (aria-pressed):** A chip with an onClick announces its selected state.
134
-
135
- ## Related
136
-
137
- [Hex](hex.md)
138
-
139
- Use for an address inside a row or a sentence.
140
-
141
- [Qr](qr.md)
142
-
143
- Use for a QR code of another value.
144
-
145
- [AssetChip](asset-chip.md)
146
-
147
- Use for the chips of supported assets.