@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,360 +0,0 @@
1
- # Building From Intent
2
-
3
- Choose each component by the job of its content, not by the markup it replaces.
4
-
5
- ## Overview
6
-
7
- Every part of a screen does a job, such as a list of records to compare, a status to read, or an identifier to check. Each component page documents one job, so the right component follows from the job and not from the look of the old markup.
8
-
9
- ## The Method
10
-
11
- ### Inventory the Screen by Job
12
-
13
- Name the job of each part before you open the catalog: records, details, status, identifier, amount, metric, message, action, choice, or navigation.
14
-
15
- ### Choose by Documented Job
16
-
17
- Find the job in [Common Intents](#common-intents) or the comparisons on [Components](../components.md#choosing-a-component). Then read the When to Use section of the component page.
18
-
19
- ### Check When Not to Use
20
-
21
- Read the When Not to Use section of the same page. If it names your case, use the component that the section links instead.
22
-
23
- ### Write the Labels
24
-
25
- Write every label from the [Writing Style](content/writing-style.md) rules. Map a raw API value, such as `payment_failed`, to a word, such as Failed.
26
-
27
- ### Check the Fit
28
-
29
- Render the result at the narrowest width that its column or container reaches, and confirm that nothing overlaps or clips. In a table, follow [Keep Multi-Line Rows Readable](../patterns/tables-and-lists.md#keep-multi-line-rows-readable).
30
-
31
- ## Common Intents
32
-
33
- Each tile names a job, the component for it, and the question that tells it apart from similar components.
34
-
35
- ### Data
36
-
37
- * **Records (Table):** Do people compare many records across the same fields? Use a [Table](../components/table.md), one row per record.
38
- * **One Record (ListGroup):** Does the view show the fields of one record? Use [ListGroup](../components/list-group.md) rows with `ListGroup.Label`.
39
- * **Identifier (Hex):** Is it an address or a hash outside a table? Use [Hex](../components/hex.md) with `copy`. A table column uses a `mono` cell.
40
- * **Amount (Amount):** Is it money or a token balance? Use [Amount](../components/amount.md) with a `currency` or a `symbol`.
41
- * **Metric (Surface):** Is it a headline number on a dashboard? Use a small [Surface](../components/surface.md) tile, as [Dashboards](../patterns/dashboards.md) shows.
42
-
43
- ### Status
44
-
45
- * **Status in a Table (status):** Does the status sit in a table row? Set `status` on its [Table](../components/table.md) cell, and keep the status word beside the color.
46
- * **Status of a Payment (StatusChip):** Does a payment, an authorization, or a network have a status outside a table? Use a [StatusChip](../components/status-chip.md).
47
- * **Live System Status (StatusIndicator):** Does a service or a connection report its live state? Use a [StatusIndicator](../components/status-indicator.md).
48
- * **Running Task (StatusRow):** Does a person wait on one task that finishes within minutes? Follow it with a [StatusRow](../components/status-row.md).
49
- * **Attribute (Badge):** Does a word name a category or an attribute, such as Testnet? Use a [Badge](../components/badge.md) beside the title.
50
-
51
- ### Interaction
52
-
53
- * **Message (Alert):** Does a sentence explain a condition? Use an [Alert](../components/alert.md) for a section and a [Banner](../components/banner.md) for the page.
54
- * **Action (Button):** Does it start something in the current view? Use a [Button](../components/button.md) with a verb label, such as Send payment.
55
- * **Choice (RadioGroup):** Does a person pick one option? Compare [RadioGroup](../components/radio-group.md) and the others on [Components](../components.md#choosing-one-option).
56
- * **Navigation (SidebarMenu):** Does it open another page? Use a link, or a [SidebarMenu](../components/sidebar-menu.md) for the main destinations of an app.
57
-
58
- ## Porting an Existing Interface
59
-
60
- A port replaces old markup with library components. Map the job of each part instead, since the old screen can already use the wrong element for it.
61
-
62
- ### Show Records as Rows
63
-
64
- **Do:** Show records that share fields as the rows of a [Table](../components/table.md).
65
-
66
- ```tsx
67
- /**
68
- * Do example for "Show Records as Rows" on the Building From Intent page.
69
- * Show records that share fields as the rows of a Table.
70
- * @module
71
- */
72
- import { Table } from '@tempoxyz/ds'
73
-
74
- const payouts = [
75
- ['Ada Lovelace', 'Oct 19', '120.00'],
76
- ['Alan Turing', 'Oct 19', '80.00'],
77
- ['Grace Hopper', 'Oct 18', '45.50'],
78
- ] as const
79
-
80
- /** Renders the static preview, which the guideline card shows inert. */
81
- export function Demo() {
82
- return (
83
- <Table size="small">
84
- <Table.Head>
85
- <Table.Row>
86
- <Table.HeaderCell>Recipient</Table.HeaderCell>
87
- <Table.HeaderCell>Date</Table.HeaderCell>
88
- <Table.HeaderCell>Amount (USDC)</Table.HeaderCell>
89
- </Table.Row>
90
- </Table.Head>
91
- <Table.Body>
92
- {payouts.map(([recipient, date, amount]) => (
93
- <Table.Row key={recipient}>
94
- <Table.Cell>{recipient}</Table.Cell>
95
- <Table.Cell>{date}</Table.Cell>
96
- <Table.Cell numeric>{amount}</Table.Cell>
97
- </Table.Row>
98
- ))}
99
- </Table.Body>
100
- </Table>
101
- )
102
- }
103
- ```
104
-
105
- **Don't:** Wrap each record in a [Surface](../components/surface.md) card because the old screen drew
106
- cards.
107
-
108
- ```tsx
109
- /**
110
- * Don't example for "Show Records as Rows" on the Building From Intent page.
111
- * A card per record repeats each label and breaks the columns that people compare.
112
- * @module
113
- */
114
- import { Grid, style, Surface } from '@tempoxyz/ds'
115
-
116
- const payouts = [
117
- ['Ada Lovelace', 'Oct 19', '120.00 USDC'],
118
- ['Alan Turing', 'Oct 19', '80.00 USDC'],
119
- ['Grace Hopper', 'Oct 18', '45.50 USDC'],
120
- ] as const
121
-
122
- /** Renders the static preview, which the guideline card shows inert. */
123
- export function Demo() {
124
- return (
125
- <Grid fit="small" gap="8" {...styles.grid()}>
126
- {payouts.map(([recipient, date, amount]) => (
127
- <Surface key={recipient} size="small" {...styles.card()}>
128
- <p {...styles.title()}>{recipient}</p>
129
- <p {...styles.meta()}>Date: {date}</p>
130
- <p {...styles.meta()}>Amount: {amount}</p>
131
- </Surface>
132
- ))}
133
- </Grid>
134
- )
135
- }
136
-
137
- namespace styles {
138
- export const card = style({
139
- boxShadow: '0 0 0 1px light-dark(#0000001a, #ffffff1f) !custom',
140
- })
141
-
142
- export const grid = style({ width: '100% !custom' })
143
-
144
- export const meta = style({ color: 'content.secondary', margin: '0', typography: 'body.b3' })
145
-
146
- export const title = style({ margin: '0', typography: 'body.b2' })
147
- }
148
- ```
149
-
150
- ### Write Status Words, Not API Values
151
-
152
- **Do:** Color a status word in sentence case with the `status` of its [Table](../components/table.md)
153
- cell.
154
-
155
- ```tsx
156
- /**
157
- * Do example for "Write Status Words, Not API Values" on the Building From Intent page.
158
- * Color a status word in sentence case with the `status` of its Table cell.
159
- * @module
160
- */
161
- import { Table } from '@tempoxyz/ds'
162
-
163
- /** Renders the static preview, which the guideline card shows inert. */
164
- export function Demo() {
165
- return (
166
- <Table size="small">
167
- <Table.Head>
168
- <Table.Row>
169
- <Table.HeaderCell>Recipient</Table.HeaderCell>
170
- <Table.HeaderCell>Status</Table.HeaderCell>
171
- </Table.Row>
172
- </Table.Head>
173
- <Table.Body>
174
- <Table.Row>
175
- <Table.Cell>Ada Lovelace</Table.Cell>
176
- <Table.Cell status="positive">Confirmed</Table.Cell>
177
- </Table.Row>
178
- <Table.Row>
179
- <Table.Cell>Alan Turing</Table.Cell>
180
- <Table.Cell status="warning">Pending</Table.Cell>
181
- </Table.Row>
182
- <Table.Row>
183
- <Table.Cell>Grace Hopper</Table.Cell>
184
- <Table.Cell status="negative">Failed</Table.Cell>
185
- </Table.Row>
186
- </Table.Body>
187
- </Table>
188
- )
189
- }
190
- ```
191
-
192
- **Don't:** Copy a grey pill into a [Badge](../components/badge.md) with the raw value from the API.
193
-
194
- ```tsx
195
- /**
196
- * Don't example for "Write Status Words, Not API Values" on the Building From Intent page.
197
- * A grey pill copied from the old screen shows raw API values and no status color.
198
- * @module
199
- */
200
- import { Badge, Table } from '@tempoxyz/ds'
201
-
202
- /** Renders the static preview, which the guideline card shows inert. */
203
- export function Demo() {
204
- return (
205
- <Table size="small">
206
- <Table.Head>
207
- <Table.Row>
208
- <Table.HeaderCell>Recipient</Table.HeaderCell>
209
- <Table.HeaderCell>Status</Table.HeaderCell>
210
- </Table.Row>
211
- </Table.Head>
212
- <Table.Body>
213
- <Table.Row>
214
- <Table.Cell>Ada Lovelace</Table.Cell>
215
- <Table.Cell>
216
- <Badge size="small">confirmed</Badge>
217
- </Table.Cell>
218
- </Table.Row>
219
- <Table.Row>
220
- <Table.Cell>Alan Turing</Table.Cell>
221
- <Table.Cell>
222
- <Badge size="small">PENDING</Badge>
223
- </Table.Cell>
224
- </Table.Row>
225
- <Table.Row>
226
- <Table.Cell>Grace Hopper</Table.Cell>
227
- <Table.Cell>
228
- <Badge size="small">payment_failed</Badge>
229
- </Table.Cell>
230
- </Table.Row>
231
- </Table.Body>
232
- </Table>
233
- )
234
- }
235
- ```
236
-
237
- ### Fit Identifiers to Their Column
238
-
239
- [Hex](../components/hex.md) truncates to its container, down to the prefix, one character on each side, and its copy button. A narrower column lets it overflow into the next cell.
240
-
241
- **Do:** Set `mono` on the cell and shorten the value with `formatHex` from `@tempoxyz/ds`, which keeps
242
- four characters on each side. Show the full value with `copy` on the details view.
243
-
244
- ```tsx
245
- /**
246
- * Do example for "Fit Identifiers to Their Column" on the Building From Intent page.
247
- * Shorten an address in a table column with a `mono` cell and `formatHex`.
248
- * @module
249
- */
250
- import { formatHex, Table } from '@tempoxyz/ds'
251
-
252
- const accounts = [
253
- ['Ada Lovelace', '0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc', '120.00'],
254
- ['Alan Turing', '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', '80.00'],
255
- ] as const
256
-
257
- /** Renders the static preview, which the guideline card shows inert. */
258
- export function Demo() {
259
- return (
260
- <Table size="small">
261
- <Table.Head>
262
- <Table.Row>
263
- <Table.HeaderCell>Recipient</Table.HeaderCell>
264
- <Table.HeaderCell>Address</Table.HeaderCell>
265
- <Table.HeaderCell>Amount</Table.HeaderCell>
266
- </Table.Row>
267
- </Table.Head>
268
- <Table.Body>
269
- {accounts.map(([recipient, address, amount]) => (
270
- <Table.Row key={address}>
271
- <Table.Cell>{recipient}</Table.Cell>
272
- <Table.Cell mono>{formatHex(address)}</Table.Cell>
273
- <Table.Cell numeric>{amount}</Table.Cell>
274
- </Table.Row>
275
- ))}
276
- </Table.Body>
277
- </Table>
278
- )
279
- }
280
- ```
281
-
282
- **Don't:** Place a [Hex](../components/hex.md) with `copy` in a column narrower than its minimum
283
- width.
284
-
285
- ```tsx
286
- /**
287
- * Don't example for "Fit Identifiers to Their Column" on the Building From Intent page.
288
- * A Hex with `copy` in a narrow column stops at its minimum width and overlaps the next cell.
289
- * @module
290
- */
291
- import { Hex, style, Table } from '@tempoxyz/ds'
292
-
293
- const accounts = [
294
- ['Ada Lovelace', '0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc', '120.00'],
295
- ['Alan Turing', '0x70997970c51812dc3a010c7d01b50e0d17dc79c8', '80.00'],
296
- ] as const
297
-
298
- /** Renders the static preview, which the guideline card shows inert. */
299
- export function Demo() {
300
- return (
301
- <Table size="small" {...styles.table()}>
302
- <Table.Head>
303
- <Table.Row>
304
- <Table.HeaderCell>Recipient</Table.HeaderCell>
305
- <Table.HeaderCell {...styles.narrow()}>Address</Table.HeaderCell>
306
- <Table.HeaderCell>Amount</Table.HeaderCell>
307
- </Table.Row>
308
- </Table.Head>
309
- <Table.Body>
310
- {accounts.map(([recipient, address, amount]) => (
311
- <Table.Row key={address}>
312
- <Table.Cell>{recipient}</Table.Cell>
313
- <Table.Cell>
314
- <Hex copy size="small" value={address} />
315
- </Table.Cell>
316
- <Table.Cell numeric>{amount}</Table.Cell>
317
- </Table.Row>
318
- ))}
319
- </Table.Body>
320
- </Table>
321
- )
322
- }
323
-
324
- namespace styles {
325
- export const narrow = style({ width: '3rem !custom' })
326
-
327
- export const table = style({ tableLayout: 'fixed !custom' })
328
- }
329
- ```
330
-
331
- ## Checklist
332
-
333
- Before you ship a screen, confirm each item.
334
-
335
- * **Jobs Named:** Each part of the screen has a named job, and each component matches that job.
336
- * **Exclusions Checked:** No component appears in a case that its When Not to Use section excludes.
337
- * **Labels Written:** Labels are words in sentence case, with one word per status and no raw API values.
338
- * **Fit Checked:** Every cell and tile fits at the narrowest width of its layout, without overlap or clipping.
339
-
340
- ## Related
341
-
342
- [Components](../components.md)
343
-
344
- Covers the catalog and the comparisons between similar components.
345
-
346
- [Agents](agents.md)
347
-
348
- Covers the rules that coding agents follow.
349
-
350
- [Tables and Lists](../patterns/tables-and-lists.md)
351
-
352
- Covers tables, lists, and the details of one record.
353
-
354
- [Feedback and Status](../patterns/feedback-and-status.md)
355
-
356
- Covers status words and the channel for each message.
357
-
358
- [Writing Style](content/writing-style.md)
359
-
360
- Covers labels, status words, and sentence case.