@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,518 +0,0 @@
1
- # Feedback and Status
2
-
3
- Name each system state once, and choose [Toast](../components/toast.md), [Alert](../components/alert.md), or [Banner](../components/banner.md) by urgency.
4
-
5
- ## Overview
6
-
7
- Every action needs a response, and every change of state needs a visible result. Two questions pick the component: what the message describes (one action, one section, or the whole product), and how soon the reader must act. Match the weight of the message to the weight of the event, since overused loud feedback trains people to ignore it.
8
-
9
- [Loading](loading.md) and [Empty States](empty-states.md) cover the states before content arrives.
10
-
11
- ## Components
12
-
13
- | Component | Scope | Lifetime | Typical use |
14
- | --- | --- | --- | --- |
15
- | [Field](../components/field.md) `Field.Error` | One value | Until corrected | Enter 1,250.00 USDC or less |
16
- | [Badge](../components/badge.md), or `status` on a [Table](../components/table.md) cell | One record | While the state holds | A transaction or a webhook delivery |
17
- | [Toast](../components/toast.md) | One action | Seconds | The result of an action the reader started |
18
- | [Alert](../components/alert.md) | One section | Until resolved | Couldn't load older activity |
19
- | [Banner](../components/banner.md) | Whole product | Until resolved or dismissed | Testnet faucets are paused for maintenance |
20
- | [AlertDialog](../components/alert-dialog.md) | One decision | Until answered | Revoke this API key? |
21
-
22
- * **Toast:** Dismisses itself after five seconds by default, so never put information in it that the reader must keep or act on. Offer its action elsewhere too. Set `timeout: 0` for a toast with Undo, and show critical errors inline instead.
23
- * **Alert:** Sits beside the decision it affects, with one action at most. Do not use it for a passing confirmation such as Address copied.
24
- * **Banner:** Describes the product, not one piece of content. Show at most one at a time, and never for a routine confirmation.
25
-
26
- ## State Vocabulary
27
-
28
- Each state has one word, one component, and one icon.
29
-
30
- * **Unavailable (No icon):** The value does not exist now, such as a missing price. Show Unavailable in gray in its place.
31
- * **Couldn't Load (AlertCircle):** A request for the region's content failed. Use a negative [Alert](../components/alert.md) or an [Empty](../components/empty.md) state, with a retry.
32
- * **Pending (Pending):** Submitted and waiting for inclusion in a block. Use a [Badge](../components/badge.md) with the icon.
33
- * **Confirmed (CheckCircle):** Included in a block. Use a [Badge](../components/badge.md) with the icon.
34
- * **Failed (AlertCircle):** Rejected or reverted by the network. Use a [Badge](../components/badge.md) with the icon, and the reason nearby.
35
- * **Amount Hidden (EyeOff):** The reader hid amounts on this device. Show a fixed mask, read aloud as Amount hidden.
36
-
37
- In a [Table](../components/table.md), set `status` on `Table.Cell` to `warning`, `positive`, or `negative` for Pending, Confirmed, and Failed. The cell colors its text, so keep the same word.
38
-
39
- ```tsx
40
- import { Alert, Badge, ListGroup, style, Surface } from '@tempoxyz/ds'
41
- import { AlertCircle, CheckCircle, Pending } from '@tempoxyz/ds/icons'
42
-
43
- export const fill = true
44
- function Balances() {
45
- return (
46
- <Surface>
47
- <Surface.Header>
48
- <Surface.Title>Balances</Surface.Title>
49
- </Surface.Header>
50
- <ListGroup.Root>
51
- <ListGroup.Row>
52
- <ListGroup.Info>
53
- <ListGroup.Title>USDC</ListGroup.Title>
54
- <ListGroup.Description>1,000.00 USDC</ListGroup.Description>
55
- </ListGroup.Info>
56
- $1,000.00
57
- </ListGroup.Row>
58
- <ListGroup.Row>
59
- <ListGroup.Info>
60
- <ListGroup.Title>EURC</ListGroup.Title>
61
- <ListGroup.Description>500.00 EURC</ListGroup.Description>
62
- </ListGroup.Info>
63
- <span {...styles.muted()}>Unavailable</span>
64
- </ListGroup.Row>
65
- </ListGroup.Root>
66
- </Surface>
67
- )
68
- }
69
-
70
- function Activity() {
71
- return (
72
- <Surface>
73
- <Surface.Header>
74
- <Surface.Title>Activity</Surface.Title>
75
- </Surface.Header>
76
- <ListGroup.Root>
77
- <ListGroup.Row>
78
- <ListGroup.Info>
79
- <ListGroup.Title>Sent 25.00 USDC</ListGroup.Title>
80
- <ListGroup.Description>To 0x71C7…976F</ListGroup.Description>
81
- </ListGroup.Info>
82
- <Badge>
83
- <Pending />
84
- Pending
85
- </Badge>
86
- </ListGroup.Row>
87
- <ListGroup.Row>
88
- <ListGroup.Info>
89
- <ListGroup.Title>Received 120.00 USDC</ListGroup.Title>
90
- <ListGroup.Description>From 0x3C44…93BC</ListGroup.Description>
91
- </ListGroup.Info>
92
- <Badge>
93
- <CheckCircle />
94
- Confirmed
95
- </Badge>
96
- </ListGroup.Row>
97
- <ListGroup.Row>
98
- <ListGroup.Info>
99
- <ListGroup.Title>Sent 40.00 USDC</ListGroup.Title>
100
- <ListGroup.Description>
101
- Not enough USDC left to cover the network fee
102
- </ListGroup.Description>
103
- </ListGroup.Info>
104
- <Badge>
105
- <AlertCircle />
106
- Failed
107
- </Badge>
108
- </ListGroup.Row>
109
- </ListGroup.Root>
110
- <Alert intent="negative" {...styles.alert()}>
111
- <Alert.Icon />
112
- <Alert.Content>
113
- Couldn't load older activity.
114
- <Alert.Action>Try again</Alert.Action>
115
- </Alert.Content>
116
- </Alert>
117
- </Surface>
118
- )
119
- }
120
-
121
- export function Demo() {
122
- return (
123
- <div {...styles.grid()}>
124
- <Balances />
125
- <Activity />
126
- </div>
127
- )
128
- }
129
-
130
- namespace styles {
131
- export const alert = style({ marginBlockStart: '16' })
132
-
133
- export const grid = style({
134
- alignItems: 'start',
135
- backgroundColor: 'background.primary',
136
- display: 'grid',
137
- gap: '16',
138
- gridTemplateColumns: 'repeat(auto-fill, minmax(18rem, 1fr)) !custom',
139
- padding: '16',
140
- })
141
-
142
- export const muted = style({ color: 'content.secondary', typography: 'body.b2' })
143
- }
144
- ```
145
-
146
- [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Patterns/StatusVocabulary.tsx)
147
-
148
- This reference layout shows five of the states, built from [Surface](../components/surface.md), [ListGroup](../components/list-group.md), [Badge](../components/badge.md), and [Alert](../components/alert.md).
149
-
150
- * **Unavailable:** Keep the rest of the row, since the token balance is still known. If the reason helps the reader act, state it nearby.
151
- * **Couldn't load:** Name the content, such as Couldn't load activity. If part of a region failed, keep what loaded and use an alert. If all of it failed, use an [empty state](empty-states.md) with Try again.
152
- * **Pending:** Keep the transaction in activity with its amount and recipient, from submission until inclusion in a block (see [Loading](loading.md#show-pending-transactions)).
153
- * **Failed:** Keep the row in activity and state the reason (see [Errors and Validation](errors-and-validation.md#explain-transaction-failures)).
154
- * **Amount hidden:** Mask every amount, as [Blockchain Values](blockchain-values.md#hidden-amounts) describes.
155
-
156
- ## Urgency
157
-
158
- Rank each message before you choose how to show it.
159
-
160
- * **Low (Toast):** An expected confirmation, such as Address copied.
161
- * **Medium (Alert):** Information that affects a decision. Place it beside the decision.
162
- * **High (Banner or Alert):** A condition that blocks work or puts funds at risk. Keep it until the condition clears.
163
- * **Critical (AlertDialog):** A decision the reader must make first (see [Destructive Actions](destructive-actions.md)).
164
-
165
- ## Intent
166
-
167
- Choose the intent from the meaning of the message. Keep it consistent across [Toast](../components/toast.md), [Alert](../components/alert.md), and [Banner](../components/banner.md).
168
-
169
- * **Neutral (neutral):** General information with no judgment.
170
- * **Tip (tip):** Helpful context that does not need action.
171
- * **Positive (positive):** A successful result, such as Confirmed.
172
- * **Warning (warning):** A risk to weigh before continuing, and Pending.
173
- * **Negative (negative):** A failure or a blocked task.
174
-
175
- ## Guidelines
176
-
177
- ### Choose a Channel by Scope
178
-
179
- Show each message in the smallest region it describes, from the [Components](#components) table.
180
-
181
- **Do:** Report a problem with one section in an alert inside that section.
182
-
183
- ```tsx
184
- /**
185
- * Do example for "Choose a Channel by Scope" on the Feedback and Status page.
186
- * Report a problem with one section in an alert inside that section.
187
- * @module
188
- */
189
- import { Alert, ListGroup, Stack, style, Surface } from '@tempoxyz/ds'
190
-
191
- /** Renders the static preview, which the guideline card shows inert. */
192
- export function Demo() {
193
- return (
194
- <Surface size="small" {...styles.fill()}>
195
- <Stack gap="12">
196
- <Surface.Title>Activity</Surface.Title>
197
- <ListGroup.Root>
198
- <ListGroup.Row>
199
- <ListGroup.Info>
200
- <ListGroup.Title>Received 120.00 USDC</ListGroup.Title>
201
- <ListGroup.Description>From 0x8f3a…12c4</ListGroup.Description>
202
- </ListGroup.Info>
203
- </ListGroup.Row>
204
- </ListGroup.Root>
205
- <Alert intent="negative">
206
- <Alert.Icon />
207
- <Alert.Content>
208
- Couldn't load older activity.
209
- <Alert.Action>Try again</Alert.Action>
210
- </Alert.Content>
211
- </Alert>
212
- </Stack>
213
- </Surface>
214
- )
215
- }
216
-
217
- namespace styles {
218
- export const fill = style({ width: '100% !custom' })
219
- }
220
- ```
221
-
222
- **Don't:** Use a page-wide banner for a problem with one section.
223
-
224
- ```tsx
225
- /**
226
- * Don't example for "Choose a Channel by Scope" on the Feedback and Status page.
227
- * Don't use a page-wide banner for a problem with one section.
228
- * @module
229
- */
230
- import { Banner, ListGroup, Stack, style, Surface } from '@tempoxyz/ds'
231
-
232
- /** Renders the static preview, which the guideline card shows inert. */
233
- export function Demo() {
234
- return (
235
- <Stack gap="16" {...styles.fill()}>
236
- <Banner intent="negative">
237
- <Banner.Content>Couldn't load older activity.</Banner.Content>
238
- <Banner.Action>Try again</Banner.Action>
239
- </Banner>
240
- <Surface size="small">
241
- <Stack gap="12">
242
- <Surface.Title>Activity</Surface.Title>
243
- <ListGroup.Root>
244
- <ListGroup.Row>
245
- <ListGroup.Info>
246
- <ListGroup.Title>Received 120.00 USDC</ListGroup.Title>
247
- <ListGroup.Description>From 0x8f3a…12c4</ListGroup.Description>
248
- </ListGroup.Info>
249
- </ListGroup.Row>
250
- </ListGroup.Root>
251
- </Stack>
252
- </Surface>
253
- </Stack>
254
- )
255
- }
256
-
257
- namespace styles {
258
- export const fill = style({ width: '100% !custom' })
259
- }
260
- ```
261
-
262
- ### Pair Color With Text and an Icon
263
-
264
- Each state has a word and an icon as well as a color, so it reads the same in grayscale, in high contrast, and on a screen reader.
265
-
266
- **Do:** Show the state's word, with its icon before the text.
267
-
268
- ```tsx
269
- /**
270
- * Do example for "Pair Color With Text and an Icon" on the Feedback and Status page.
271
- * Show the state's word, with its icon before the text.
272
- * @module
273
- */
274
- import { Badge, style } from '@tempoxyz/ds'
275
- import { AlertCircle, CheckCircle, Pending } from '@tempoxyz/ds/icons'
276
-
277
- /** Renders the static preview, which the guideline card shows inert. */
278
- export function Demo() {
279
- return (
280
- <div {...styles.row()}>
281
- <Badge>
282
- <Pending />
283
- Pending
284
- </Badge>
285
- <Badge>
286
- <CheckCircle />
287
- Confirmed
288
- </Badge>
289
- <Badge>
290
- <AlertCircle />
291
- Failed
292
- </Badge>
293
- </div>
294
- )
295
- }
296
-
297
- namespace styles {
298
- export const row = style({ alignItems: 'center', display: 'flex', flexWrap: 'wrap', gap: '8' })
299
- }
300
- ```
301
-
302
- **Don't:** Use colored dots or tints alone to show a state.
303
-
304
- ```tsx
305
- /**
306
- * Don't example for "Pair Color With Text and an Icon" on the Feedback and Status page.
307
- * Don't use colored dots or tints alone to show a state.
308
- * @module
309
- */
310
- import { Alert, style } from '@tempoxyz/ds'
311
-
312
- /** Renders the static preview, which the guideline card shows inert. */
313
- export function Demo() {
314
- return (
315
- <div {...styles.row()}>
316
- {(['warning', 'positive', 'negative'] as const).map((intent) => (
317
- <Alert intent={intent} key={intent}>
318
- <Alert.Icon />
319
- </Alert>
320
- ))}
321
- </div>
322
- )
323
- }
324
-
325
- namespace styles {
326
- export const row = style({ alignItems: 'center', display: 'flex', flexWrap: 'wrap', gap: '8' })
327
- }
328
- ```
329
-
330
- ### Use the Same Word Everywhere
331
-
332
- Use the vocabulary words for every product and transaction type, including payments, deposits, and swaps. Do not swap in synonyms such as Success, Settled, Complete, Processing, or Error.
333
-
334
- **Do:** Use Pending and Confirmed for every transaction type.
335
-
336
- ```tsx
337
- /**
338
- * Do example for "Use the Same Word Everywhere" on the Feedback and Status page.
339
- * Use Pending and Confirmed for every transaction type.
340
- * @module
341
- */
342
- import { Badge, ListGroup, style } from '@tempoxyz/ds'
343
-
344
- /** Renders the static preview, which the guideline card shows inert. */
345
- export function Demo() {
346
- return (
347
- <ListGroup.Root {...styles.fill()}>
348
- <ListGroup.Row>
349
- <ListGroup.Label>Payment</ListGroup.Label>
350
- <Badge>Confirmed</Badge>
351
- </ListGroup.Row>
352
- <ListGroup.Row>
353
- <ListGroup.Label>Deposit</ListGroup.Label>
354
- <Badge>Confirmed</Badge>
355
- </ListGroup.Row>
356
- <ListGroup.Row>
357
- <ListGroup.Label>Swap</ListGroup.Label>
358
- <Badge>Pending</Badge>
359
- </ListGroup.Row>
360
- </ListGroup.Root>
361
- )
362
- }
363
-
364
- namespace styles {
365
- export const fill = style({ width: '100% !custom' })
366
- }
367
- ```
368
-
369
- **Don't:** Describe the same state with different words and colors.
370
-
371
- ```tsx
372
- /**
373
- * Don't example for "Use the Same Word Everywhere" on the Feedback and Status page.
374
- * Don't describe the same state with different words and colors.
375
- * @module
376
- */
377
- import { Badge, ListGroup, style } from '@tempoxyz/ds'
378
-
379
- /** Renders the static preview, which the guideline card shows inert. */
380
- export function Demo() {
381
- return (
382
- <ListGroup.Root {...styles.fill()}>
383
- <ListGroup.Row>
384
- <ListGroup.Label>Payment</ListGroup.Label>
385
- <Badge>Success!</Badge>
386
- </ListGroup.Row>
387
- <ListGroup.Row>
388
- <ListGroup.Label>Deposit</ListGroup.Label>
389
- <Badge>Settled</Badge>
390
- </ListGroup.Row>
391
- <ListGroup.Row>
392
- <ListGroup.Label>Swap</ListGroup.Label>
393
- <Badge>Processing</Badge>
394
- </ListGroup.Row>
395
- </ListGroup.Root>
396
- )
397
- }
398
-
399
- namespace styles {
400
- export const fill = style({ width: '100% !custom' })
401
- }
402
- ```
403
-
404
- ### Never Show a Stand-In as a Real Value
405
-
406
- A zero, a dash, or a stale number reads as a real measurement. If there is no value, show Unavailable. If the request failed, show Couldn't load.
407
-
408
- **Do:** Show Unavailable when a value has no source.
409
-
410
- ```tsx
411
- /**
412
- * Do example for "Never Show a Stand-In as a Real Value" on the Feedback and Status page.
413
- * Show Unavailable when a value has no source.
414
- * @module
415
- */
416
- import { ListGroup, style } from '@tempoxyz/ds'
417
-
418
- /** Renders the static preview, which the guideline card shows inert. */
419
- export function Demo() {
420
- return (
421
- <ListGroup.Root {...styles.fill()}>
422
- <ListGroup.Row>
423
- <ListGroup.Info>
424
- <ListGroup.Title>EURC</ListGroup.Title>
425
- <ListGroup.Description>500.00 EURC</ListGroup.Description>
426
- </ListGroup.Info>
427
- <span {...styles.muted()}>Unavailable</span>
428
- </ListGroup.Row>
429
- </ListGroup.Root>
430
- )
431
- }
432
-
433
- namespace styles {
434
- export const fill = style({ width: '100% !custom' })
435
-
436
- export const muted = style({ color: 'content.secondary', typography: 'body.b2' })
437
- }
438
- ```
439
-
440
- **Don't:** Show $0.00 for a price you don't know.
441
-
442
- ```tsx
443
- /**
444
- * Don't example for "Never Show a Stand-In as a Real Value" on the Feedback and Status page.
445
- * Don't show $0.00 for a price you don't know.
446
- * @module
447
- */
448
- import { ListGroup, style } from '@tempoxyz/ds'
449
-
450
- /** Renders the static preview, which the guideline card shows inert. */
451
- export function Demo() {
452
- return (
453
- <ListGroup.Root {...styles.fill()}>
454
- <ListGroup.Row>
455
- <ListGroup.Info>
456
- <ListGroup.Title>EURC</ListGroup.Title>
457
- <ListGroup.Description>500.00 EURC</ListGroup.Description>
458
- </ListGroup.Info>
459
- $0.00
460
- </ListGroup.Row>
461
- </ListGroup.Root>
462
- )
463
- }
464
-
465
- namespace styles {
466
- export const fill = style({ width: '100% !custom' })
467
- }
468
- ```
469
-
470
- ## States
471
-
472
- * **Default:** No message. Records show their status badge.
473
- * **Error:** Couldn't load for a failed request, Failed for a rejected transaction, and a field error for a bad value.
474
- * **Empty:** An empty state that states the cause (see [Empty States](empty-states.md)).
475
- * **Success:** Confirmed on the record, and a positive [Toast](../components/toast.md) for a finished action.
476
-
477
- ## Content
478
-
479
- * **Outcome First:** Lead with the result, such as "Payment sent", then add detail.
480
- * **Tense:** Use the past tense for finished actions and the present tense for ongoing state.
481
- * **One Sentence:** Keep toasts and alerts to one sentence.
482
-
483
- ## Accessibility
484
-
485
- * **Toasts (F6):** Toasts are announced, and hover or focus pauses their timers. Pass `priority: 'high'` only for urgent toasts.
486
- * **Alerts (alert or status):** Warning and negative alerts interrupt the screen reader. Info and positive alerts announce politely.
487
- * **Banners (role):** A [Banner](../components/banner.md) renders no live region. Add `role="status"` or `role="alert"` only if it renders after page load.
488
- * **Status Changes:** A change from Pending to Confirmed is not announced. If the reader started the transaction in this session, use a [Toast](../components/toast.md).
489
-
490
- ## Related
491
-
492
- [Badge](../components/badge.md)
493
-
494
- Use for record status.
495
-
496
- [Alert](../components/alert.md)
497
-
498
- Use for section messages.
499
-
500
- [Banner](../components/banner.md)
501
-
502
- Use for product-wide messages.
503
-
504
- [Toast](../components/toast.md)
505
-
506
- Use for confirmations.
507
-
508
- [SecretValue](../components/secret-value.md)
509
-
510
- Use for masked secrets.
511
-
512
- [Loading](loading.md)
513
-
514
- Covers Pending transactions.
515
-
516
- [Blockchain Values](blockchain-values.md)
517
-
518
- Covers amounts and addresses.