@tempoxyz/ds 0.3.14 → 0.3.15

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 (131) hide show
  1. package/dist/docs/AGENTS.md +73 -10
  2. package/dist/docs/{marketing/introduction/getting-started.md → marketing.md} +28 -20
  3. package/dist/docs/product/components/actions.md +2058 -0
  4. package/dist/docs/product/components/blockchain.md +3825 -0
  5. package/dist/docs/product/components/data-display.md +5901 -0
  6. package/dist/docs/product/components/feedback-and-status.md +4008 -0
  7. package/dist/docs/product/components/forms-and-inputs.md +10543 -0
  8. package/dist/docs/product/components/layout.md +3339 -0
  9. package/dist/docs/product/components/navigation.md +2914 -0
  10. package/dist/docs/product/components/overlays.md +4917 -0
  11. package/dist/docs/product/components.md +125 -125
  12. package/dist/docs/product/foundations.md +4596 -0
  13. package/dist/docs/product/patterns.md +10129 -0
  14. package/package.json +1 -1
  15. package/dist/docs/index.md +0 -145
  16. package/dist/docs/product/components/accordion.md +0 -489
  17. package/dist/docs/product/components/address-card.md +0 -147
  18. package/dist/docs/product/components/agent-logo.md +0 -194
  19. package/dist/docs/product/components/alert-dialog.md +0 -631
  20. package/dist/docs/product/components/alert.md +0 -448
  21. package/dist/docs/product/components/amount-input.md +0 -305
  22. package/dist/docs/product/components/amount.md +0 -794
  23. package/dist/docs/product/components/app-shell.md +0 -559
  24. package/dist/docs/product/components/asset-chip.md +0 -294
  25. package/dist/docs/product/components/autocomplete.md +0 -620
  26. package/dist/docs/product/components/avatar.md +0 -321
  27. package/dist/docs/product/components/badge.md +0 -339
  28. package/dist/docs/product/components/badged-logo.md +0 -116
  29. package/dist/docs/product/components/banner.md +0 -379
  30. package/dist/docs/product/components/bar-chart.md +0 -208
  31. package/dist/docs/product/components/breadcrumbs.md +0 -380
  32. package/dist/docs/product/components/button-group.md +0 -286
  33. package/dist/docs/product/components/button.md +0 -650
  34. package/dist/docs/product/components/calendar.md +0 -375
  35. package/dist/docs/product/components/callout.md +0 -96
  36. package/dist/docs/product/components/checkbox-group.md +0 -521
  37. package/dist/docs/product/components/checkbox.md +0 -467
  38. package/dist/docs/product/components/choice-group.md +0 -516
  39. package/dist/docs/product/components/choicebox.md +0 -641
  40. package/dist/docs/product/components/code.md +0 -100
  41. package/dist/docs/product/components/combobox.md +0 -939
  42. package/dist/docs/product/components/container.md +0 -257
  43. package/dist/docs/product/components/copy-button.md +0 -642
  44. package/dist/docs/product/components/date-picker.md +0 -514
  45. package/dist/docs/product/components/dialog.md +0 -1332
  46. package/dist/docs/product/components/drawer.md +0 -966
  47. package/dist/docs/product/components/empty.md +0 -340
  48. package/dist/docs/product/components/field.md +0 -570
  49. package/dist/docs/product/components/fieldset.md +0 -398
  50. package/dist/docs/product/components/frame.md +0 -434
  51. package/dist/docs/product/components/gauge.md +0 -299
  52. package/dist/docs/product/components/get-started-visual.md +0 -117
  53. package/dist/docs/product/components/grid.md +0 -288
  54. package/dist/docs/product/components/hero-visual.md +0 -155
  55. package/dist/docs/product/components/hex.md +0 -487
  56. package/dist/docs/product/components/icon-tile.md +0 -292
  57. package/dist/docs/product/components/identicon.md +0 -371
  58. package/dist/docs/product/components/inline.md +0 -233
  59. package/dist/docs/product/components/inset.md +0 -225
  60. package/dist/docs/product/components/kbd.md +0 -423
  61. package/dist/docs/product/components/list-group.md +0 -981
  62. package/dist/docs/product/components/loading-dots.md +0 -237
  63. package/dist/docs/product/components/menu.md +0 -934
  64. package/dist/docs/product/components/native-select.md +0 -204
  65. package/dist/docs/product/components/network-logo.md +0 -248
  66. package/dist/docs/product/components/number-field.md +0 -543
  67. package/dist/docs/product/components/otp-field.md +0 -616
  68. package/dist/docs/product/components/pagination.md +0 -516
  69. package/dist/docs/product/components/popover.md +0 -544
  70. package/dist/docs/product/components/progress.md +0 -388
  71. package/dist/docs/product/components/qr.md +0 -314
  72. package/dist/docs/product/components/radio-group.md +0 -528
  73. package/dist/docs/product/components/secret-value.md +0 -406
  74. package/dist/docs/product/components/select.md +0 -751
  75. package/dist/docs/product/components/separator.md +0 -379
  76. package/dist/docs/product/components/sidebar-menu.md +0 -922
  77. package/dist/docs/product/components/skeleton.md +0 -517
  78. package/dist/docs/product/components/slider.md +0 -539
  79. package/dist/docs/product/components/snippet.md +0 -424
  80. package/dist/docs/product/components/spinner.md +0 -216
  81. package/dist/docs/product/components/split-bar.md +0 -139
  82. package/dist/docs/product/components/split-button.md +0 -464
  83. package/dist/docs/product/components/stack.md +0 -299
  84. package/dist/docs/product/components/status-chip.md +0 -226
  85. package/dist/docs/product/components/status-indicator.md +0 -119
  86. package/dist/docs/product/components/status-row.md +0 -174
  87. package/dist/docs/product/components/stepper.md +0 -451
  88. package/dist/docs/product/components/success-hero.md +0 -157
  89. package/dist/docs/product/components/surface.md +0 -639
  90. package/dist/docs/product/components/switch.md +0 -472
  91. package/dist/docs/product/components/table.md +0 -968
  92. package/dist/docs/product/components/tabs.md +0 -627
  93. package/dist/docs/product/components/tempo-logo.md +0 -185
  94. package/dist/docs/product/components/text-input.md +0 -624
  95. package/dist/docs/product/components/textarea.md +0 -352
  96. package/dist/docs/product/components/toast.md +0 -535
  97. package/dist/docs/product/components/token-logo.md +0 -371
  98. package/dist/docs/product/components/token.md +0 -247
  99. package/dist/docs/product/components/tooltip.md +0 -490
  100. package/dist/docs/product/components/verification-code.md +0 -116
  101. package/dist/docs/product/components/visual.md +0 -249
  102. package/dist/docs/product/foundations/accessibility.md +0 -377
  103. package/dist/docs/product/foundations/agents.md +0 -159
  104. package/dist/docs/product/foundations/color.md +0 -522
  105. package/dist/docs/product/foundations/content/tone.md +0 -194
  106. package/dist/docs/product/foundations/content/voice.md +0 -194
  107. package/dist/docs/product/foundations/content/writing-style.md +0 -406
  108. package/dist/docs/product/foundations/iconography.md +0 -282
  109. package/dist/docs/product/foundations/intent.md +0 -360
  110. package/dist/docs/product/foundations/layout.md +0 -508
  111. package/dist/docs/product/foundations/linter.md +0 -523
  112. package/dist/docs/product/foundations/motion.md +0 -151
  113. package/dist/docs/product/foundations/radius-and-padding.md +0 -86
  114. package/dist/docs/product/foundations/typography.md +0 -331
  115. package/dist/docs/product/introduction/faq.md +0 -133
  116. package/dist/docs/product/introduction/getting-started.md +0 -377
  117. package/dist/docs/product/patterns/blockchain-values.md +0 -709
  118. package/dist/docs/product/patterns/dashboards.md +0 -638
  119. package/dist/docs/product/patterns/destructive-actions.md +0 -626
  120. package/dist/docs/product/patterns/empty-states.md +0 -612
  121. package/dist/docs/product/patterns/errors-and-validation.md +0 -808
  122. package/dist/docs/product/patterns/feedback-and-status.md +0 -518
  123. package/dist/docs/product/patterns/forms.md +0 -679
  124. package/dist/docs/product/patterns/loading.md +0 -630
  125. package/dist/docs/product/patterns/navigation.md +0 -397
  126. package/dist/docs/product/patterns/payments.md +0 -765
  127. package/dist/docs/product/patterns/responsive-layout.md +0 -997
  128. package/dist/docs/product/patterns/tables-and-lists.md +0 -1170
  129. package/dist/docs/product/products/tempo-console.md +0 -671
  130. package/dist/docs/product/products/tempo-performance.md +0 -435
  131. 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.