@tempoxyz/ds 0.3.10 → 0.3.11

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 (120) hide show
  1. package/dist/docs/AGENTS.md +9 -0
  2. package/dist/docs/components/accordion.md +489 -0
  3. package/dist/docs/components/address-card.md +147 -0
  4. package/dist/docs/components/agent-logo.md +194 -0
  5. package/dist/docs/components/alert-dialog.md +631 -0
  6. package/dist/docs/components/alert.md +448 -0
  7. package/dist/docs/components/amount-input.md +305 -0
  8. package/dist/docs/components/amount.md +794 -0
  9. package/dist/docs/components/app-shell.md +559 -0
  10. package/dist/docs/components/asset-chip.md +294 -0
  11. package/dist/docs/components/autocomplete.md +619 -0
  12. package/dist/docs/components/avatar.md +321 -0
  13. package/dist/docs/components/badge.md +339 -0
  14. package/dist/docs/components/badged-logo.md +116 -0
  15. package/dist/docs/components/banner.md +379 -0
  16. package/dist/docs/components/bar-chart.md +208 -0
  17. package/dist/docs/components/breadcrumbs.md +380 -0
  18. package/dist/docs/components/button-group.md +286 -0
  19. package/dist/docs/components/button.md +650 -0
  20. package/dist/docs/components/calendar.md +375 -0
  21. package/dist/docs/components/callout.md +96 -0
  22. package/dist/docs/components/checkbox-group.md +521 -0
  23. package/dist/docs/components/checkbox.md +467 -0
  24. package/dist/docs/components/choice-group.md +516 -0
  25. package/dist/docs/components/choicebox.md +641 -0
  26. package/dist/docs/components/code.md +100 -0
  27. package/dist/docs/components/combobox.md +939 -0
  28. package/dist/docs/components/container.md +257 -0
  29. package/dist/docs/components/copy-button.md +642 -0
  30. package/dist/docs/components/date-picker.md +514 -0
  31. package/dist/docs/components/dialog.md +1332 -0
  32. package/dist/docs/components/drawer.md +966 -0
  33. package/dist/docs/components/empty.md +340 -0
  34. package/dist/docs/components/field.md +570 -0
  35. package/dist/docs/components/fieldset.md +398 -0
  36. package/dist/docs/components/frame.md +434 -0
  37. package/dist/docs/components/gauge.md +299 -0
  38. package/dist/docs/components/get-started-visual.md +117 -0
  39. package/dist/docs/components/grid.md +288 -0
  40. package/dist/docs/components/hero-visual.md +155 -0
  41. package/dist/docs/components/hex.md +487 -0
  42. package/dist/docs/components/icon-tile.md +292 -0
  43. package/dist/docs/components/identicon.md +371 -0
  44. package/dist/docs/components/inline.md +233 -0
  45. package/dist/docs/components/inset.md +225 -0
  46. package/dist/docs/components/kbd.md +423 -0
  47. package/dist/docs/components/list-group.md +981 -0
  48. package/dist/docs/components/loading-dots.md +237 -0
  49. package/dist/docs/components/menu.md +934 -0
  50. package/dist/docs/components/native-select.md +204 -0
  51. package/dist/docs/components/network-logo.md +248 -0
  52. package/dist/docs/components/number-field.md +543 -0
  53. package/dist/docs/components/otp-field.md +616 -0
  54. package/dist/docs/components/pagination.md +516 -0
  55. package/dist/docs/components/popover.md +544 -0
  56. package/dist/docs/components/progress.md +388 -0
  57. package/dist/docs/components/qr.md +314 -0
  58. package/dist/docs/components/radio-group.md +528 -0
  59. package/dist/docs/components/secret-value.md +406 -0
  60. package/dist/docs/components/select.md +751 -0
  61. package/dist/docs/components/separator.md +379 -0
  62. package/dist/docs/components/sidebar-menu.md +922 -0
  63. package/dist/docs/components/skeleton.md +517 -0
  64. package/dist/docs/components/slider.md +539 -0
  65. package/dist/docs/components/snippet.md +424 -0
  66. package/dist/docs/components/spinner.md +216 -0
  67. package/dist/docs/components/split-bar.md +139 -0
  68. package/dist/docs/components/split-button.md +464 -0
  69. package/dist/docs/components/stack.md +299 -0
  70. package/dist/docs/components/status-chip.md +226 -0
  71. package/dist/docs/components/status-indicator.md +119 -0
  72. package/dist/docs/components/status-row.md +174 -0
  73. package/dist/docs/components/stepper.md +451 -0
  74. package/dist/docs/components/success-hero.md +157 -0
  75. package/dist/docs/components/surface.md +639 -0
  76. package/dist/docs/components/switch.md +472 -0
  77. package/dist/docs/components/table.md +967 -0
  78. package/dist/docs/components/tabs.md +627 -0
  79. package/dist/docs/components/tempo-logo.md +185 -0
  80. package/dist/docs/components/text-input.md +624 -0
  81. package/dist/docs/components/textarea.md +352 -0
  82. package/dist/docs/components/toast.md +535 -0
  83. package/dist/docs/components/token-logo.md +371 -0
  84. package/dist/docs/components/token.md +247 -0
  85. package/dist/docs/components/tooltip.md +490 -0
  86. package/dist/docs/components/verification-code.md +116 -0
  87. package/dist/docs/components/visual.md +249 -0
  88. package/dist/docs/components.md +203 -0
  89. package/dist/docs/foundations/accessibility.md +377 -0
  90. package/dist/docs/foundations/agents.md +150 -0
  91. package/dist/docs/foundations/color.md +522 -0
  92. package/dist/docs/foundations/content/tone.md +194 -0
  93. package/dist/docs/foundations/content/voice.md +194 -0
  94. package/dist/docs/foundations/content/writing-style.md +406 -0
  95. package/dist/docs/foundations/iconography.md +282 -0
  96. package/dist/docs/foundations/intent.md +360 -0
  97. package/dist/docs/foundations/layout.md +508 -0
  98. package/dist/docs/foundations/linter.md +296 -0
  99. package/dist/docs/foundations/motion.md +151 -0
  100. package/dist/docs/foundations/radius-and-padding.md +86 -0
  101. package/dist/docs/foundations/typography.md +266 -0
  102. package/dist/docs/index.md +137 -0
  103. package/dist/docs/introduction/faq.md +132 -0
  104. package/dist/docs/introduction/getting-started.md +377 -0
  105. package/dist/docs/patterns/blockchain-values.md +709 -0
  106. package/dist/docs/patterns/dashboards.md +638 -0
  107. package/dist/docs/patterns/destructive-actions.md +626 -0
  108. package/dist/docs/patterns/empty-states.md +612 -0
  109. package/dist/docs/patterns/errors-and-validation.md +808 -0
  110. package/dist/docs/patterns/feedback-and-status.md +518 -0
  111. package/dist/docs/patterns/forms.md +679 -0
  112. package/dist/docs/patterns/loading.md +630 -0
  113. package/dist/docs/patterns/navigation.md +397 -0
  114. package/dist/docs/patterns/payments.md +765 -0
  115. package/dist/docs/patterns/responsive-layout.md +997 -0
  116. package/dist/docs/patterns/tables-and-lists.md +964 -0
  117. package/dist/docs/products/tempo-console.md +671 -0
  118. package/dist/docs/products/tempo-performance.md +437 -0
  119. package/dist/docs/products/tempo-wallet.md +438 -0
  120. package/package.json +1 -1
@@ -0,0 +1,174 @@
1
+ # StatusRow
2
+
3
+ Follows the status of one payment or task while it runs.
4
+
5
+ [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/StatusRow.tsx)
6
+
7
+ Figma: [Messaging/Status Row](https://www.figma.com/design/yE96kcymnNR88PJp6G1sPs?node-id=5227-3981)
8
+
9
+ ## Overview
10
+
11
+ A status row renders a tinted row with a leading mark, a title over a description, and an optional trailing [StatusChip](/docs/components/status-chip). It announces a change of its text to screen readers, so it can update in place as the task moves on.
12
+
13
+ ## Examples
14
+
15
+ ### Basic
16
+
17
+ ```tsx
18
+ import { Spinner, StatusChip, StatusRow } from '@tempoxyz/ds'
19
+
20
+ export function Demo() {
21
+ return (
22
+ <StatusRow>
23
+ <StatusRow.Icon>
24
+ <Spinner />
25
+ </StatusRow.Icon>
26
+ <StatusRow.Content>
27
+ <StatusRow.Title>Waiting for $10.00</StatusRow.Title>
28
+ <StatusRow.Description>
29
+ Usually under a minute on Tempo. You can leave this page.
30
+ </StatusRow.Description>
31
+ </StatusRow.Content>
32
+ <StatusChip intent="warning" size="small">
33
+ Pending
34
+ </StatusChip>
35
+ </StatusRow>
36
+ )
37
+ }
38
+ ```
39
+
40
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/StatusRow/Basic.tsx)
41
+
42
+ ### Intent
43
+
44
+ Set `intent` to `neutral` (default) while the task runs, or `positive` once it is done.
45
+
46
+ ```tsx
47
+ import { StatusRow } from '@tempoxyz/ds'
48
+ import { CheckCircle } from '@tempoxyz/ds/icons'
49
+
50
+ export function Demo() {
51
+ return (
52
+ <StatusRow intent="positive">
53
+ <StatusRow.Icon>
54
+ <CheckCircle />
55
+ </StatusRow.Icon>
56
+ <StatusRow.Content>
57
+ <StatusRow.Title>Received $10.00</StatusRow.Title>
58
+ <StatusRow.Description>The funds are in your wallet.</StatusRow.Description>
59
+ </StatusRow.Content>
60
+ </StatusRow>
61
+ )
62
+ }
63
+ ```
64
+
65
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/StatusRow/Intent.tsx)
66
+
67
+ ## Anatomy
68
+
69
+ Import the component and assemble its parts.
70
+
71
+ ```tsx
72
+ import { StatusRow } from '@tempoxyz/ds'
73
+
74
+ <StatusRow>
75
+ <StatusRow.Icon />
76
+ <StatusRow.Content>
77
+ <StatusRow.Title />
78
+ <StatusRow.Description />
79
+ </StatusRow.Content>
80
+ </StatusRow>
81
+ ```
82
+
83
+ ## Guidelines
84
+
85
+ ### When to Use
86
+
87
+ * Follow a deposit, a payment, or an authorization that completes within minutes.
88
+ * Confirm in place that the task finished.
89
+
90
+ ### When Not to Use
91
+
92
+ * Use [Alert](/docs/components/alert) for guidance that is not tied to a running task.
93
+ * Use [Toast](/docs/components/toast) to confirm an action briefly and out of the flow.
94
+ * Use [ListGroup](/docs/components/list-group) for a list of finished payments.
95
+
96
+ ### Match the Mark to the State
97
+
98
+ * **Running (neutral):** A spinner, with a chip that names the step.
99
+ * **Done (positive):** A check in the positive color, without a chip.
100
+
101
+ ### State the Task and the Wait
102
+
103
+ **Do:** Name the amount in the title and the expected wait in the description.
104
+
105
+ ```tsx
106
+ import { Spinner, StatusRow } from '@tempoxyz/ds'
107
+
108
+ export function Demo() {
109
+ return (
110
+ <StatusRow>
111
+ <StatusRow.Icon>
112
+ <Spinner />
113
+ </StatusRow.Icon>
114
+ <StatusRow.Content>
115
+ <StatusRow.Title>Waiting for $10.00</StatusRow.Title>
116
+ <StatusRow.Description>Usually under a minute on Tempo.</StatusRow.Description>
117
+ </StatusRow.Content>
118
+ </StatusRow>
119
+ )
120
+ }
121
+ ```
122
+
123
+ **Don't:** Ask people to wait without saying for what or for how long.
124
+
125
+ ```tsx
126
+ import { Spinner, StatusRow } from '@tempoxyz/ds'
127
+
128
+ export function Demo() {
129
+ return (
130
+ <StatusRow>
131
+ <StatusRow.Icon>
132
+ <Spinner />
133
+ </StatusRow.Icon>
134
+ <StatusRow.Content>
135
+ <StatusRow.Title>Please wait</StatusRow.Title>
136
+ <StatusRow.Description>Something is happening.</StatusRow.Description>
137
+ </StatusRow.Content>
138
+ </StatusRow>
139
+ )
140
+ }
141
+ ```
142
+
143
+ ## Content
144
+
145
+ ### Write the Title and the Description
146
+
147
+ Start the title with the state and the amount, such as Waiting for $10.00. In the description, give the expected wait and whether people can leave the page.
148
+
149
+ ## Accessibility
150
+
151
+ A status row renders a `<div>` with the `status` role, so screen readers announce a change of its text politely. The leading mark is hidden.
152
+
153
+ ### Semantics
154
+
155
+ * **Root (status):** Screen readers announce a change of the text without moving focus.
156
+ * **Icon (aria-hidden):** The spinner and the check are hidden, so the title carries the state.
157
+
158
+ ### Your Responsibilities
159
+
160
+ * **Update the Row in Place (SC 4.1.3):** Change the text of the mounted row, so the status role announces it.
161
+
162
+ ## Related
163
+
164
+ [StatusChip](/docs/components/status-chip)
165
+
166
+ Use for the status at the end of the row.
167
+
168
+ [Spinner](/docs/components/spinner)
169
+
170
+ Use for the leading mark while the task runs.
171
+
172
+ [Alert](/docs/components/alert)
173
+
174
+ Use for guidance that is not tied to a running task.
@@ -0,0 +1,451 @@
1
+ # Stepper
2
+
3
+ Shows progress through a fixed sequence of steps.
4
+
5
+ [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/Stepper.tsx)
6
+
7
+ Figma: [Controls/Stepper](https://www.figma.com/design/yE96kcymnNR88PJp6G1sPs?node-id=5227-1489) (`Stepper.Root`)
8
+
9
+ ## Overview
10
+
11
+ A stepper renders the steps as a row of 24px segments, 4px apart. Pass `aria-label` to name the flow, such as Account setup.
12
+
13
+ ## Examples
14
+
15
+ ### Basic
16
+
17
+ ```tsx
18
+ import { Stepper, style } from '@tempoxyz/ds'
19
+
20
+ export const fill = true
21
+ export function Demo() {
22
+ return <Stepper.Root aria-label="Account setup" count={3} value={1} {...styles.stepper()} />
23
+ }
24
+
25
+ namespace styles {
26
+ export const stepper = style({ maxWidth: '24rem !custom' })
27
+ }
28
+ ```
29
+
30
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Stepper/Basic.tsx)
31
+
32
+ ### Value
33
+
34
+ Set `count` to the number of steps and `value` to the current step, from `1` to `count`.
35
+
36
+ ```tsx
37
+ import { Stepper, style } from '@tempoxyz/ds'
38
+
39
+ export const fill = true
40
+ export function Demo() {
41
+ return (
42
+ <div {...styles.stack()}>
43
+ {[1, 2, 3].map((value) => (
44
+ <Stepper.Root aria-label="Account setup" count={3} key={value} value={value} />
45
+ ))}
46
+ </div>
47
+ )
48
+ }
49
+
50
+ namespace styles {
51
+ export const stack = style({
52
+ display: 'flex',
53
+ flexDirection: 'column',
54
+ gap: '16',
55
+ maxWidth: '24rem !custom',
56
+ })
57
+ }
58
+ ```
59
+
60
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Stepper/Value.tsx)
61
+
62
+ ## Anatomy
63
+
64
+ Import the component and assemble its parts.
65
+
66
+ ```tsx
67
+ import { Stepper } from '@tempoxyz/ds'
68
+
69
+ <Stepper.Root />
70
+ ```
71
+
72
+ ## Guidelines
73
+
74
+ ### When to Use
75
+
76
+ * Show a multi-step flow with a fixed number of steps, such as onboarding (Create passkey, Back up, Add funds) or a send flow (Recipient, Amount, Review).
77
+ * Split one long setup form into short screens, such as business verification before API key access.
78
+
79
+ ### When Not to Use
80
+
81
+ * Use [Progress](/docs/components/progress) for measurable work, such as a file upload or a sync to the latest block.
82
+ * Use [Tabs](/docs/components/tabs) for sections in any order. A stepper is not interactive, and its segments don't link to steps.
83
+ * Use [Breadcrumbs](/docs/components/breadcrumbs) to show where a page sits in the hierarchy.
84
+ * Use one form, laid out with [Field](/docs/components/field) and [Fieldset](/docs/components/fieldset), when the task fits on one screen.
85
+
86
+ ### Keep the Step Count Fixed
87
+
88
+ Set `count` once for the whole flow, and aim for three to five steps. Merge short steps before you add segments. If an answer skips a step, keep its segment and move past it.
89
+
90
+ **Do:** Keep the same total on every step.
91
+
92
+ ```tsx
93
+ /** Do example for "Keep the Step Count Fixed" on the Stepper page: keep the same total on every step. @module */
94
+ import { Stepper, style } from '@tempoxyz/ds'
95
+
96
+ /** Renders the static preview, which the guideline card shows inert. */
97
+ export function Demo() {
98
+ return (
99
+ <div {...styles.flow()}>
100
+ <div {...styles.screen()}>
101
+ <Stepper.Root aria-label="Account setup" count={4} value={1} />
102
+ <span {...styles.step()}>Step 1 of 4</span>
103
+ </div>
104
+ <div {...styles.screen()}>
105
+ <Stepper.Root aria-label="Account setup" count={4} value={2} />
106
+ <span {...styles.step()}>Step 2 of 4</span>
107
+ </div>
108
+ </div>
109
+ )
110
+ }
111
+
112
+ namespace styles {
113
+ export const flow = style({
114
+ display: 'flex',
115
+ flexDirection: 'column',
116
+ rowGap: '24',
117
+ width: '100% !custom',
118
+ })
119
+
120
+ export const screen = style({ display: 'flex', flexDirection: 'column', rowGap: '8' })
121
+
122
+ export const step = style({ color: 'content.secondary', typography: 'body.b3' })
123
+ }
124
+ ```
125
+
126
+ **Don't:** Change the total partway, which makes the progress look wrong.
127
+
128
+ ```tsx
129
+ /**
130
+ * Don't example for "Keep the Step Count Fixed" on the Stepper page.
131
+ * Don't change the total partway, which makes the progress look wrong.
132
+ * @module
133
+ */
134
+ import { Stepper, style } from '@tempoxyz/ds'
135
+
136
+ /** Renders the static preview, which the guideline card shows inert. */
137
+ export function Demo() {
138
+ return (
139
+ <div {...styles.flow()}>
140
+ <div {...styles.screen()}>
141
+ <Stepper.Root aria-label="Account setup" count={3} value={1} />
142
+ <span {...styles.step()}>Step 1 of 3</span>
143
+ </div>
144
+ <div {...styles.screen()}>
145
+ <Stepper.Root aria-label="Account setup" count={5} value={2} />
146
+ <span {...styles.step()}>Step 2 of 5</span>
147
+ </div>
148
+ </div>
149
+ )
150
+ }
151
+
152
+ namespace styles {
153
+ export const flow = style({
154
+ display: 'flex',
155
+ flexDirection: 'column',
156
+ rowGap: '24',
157
+ width: '100% !custom',
158
+ })
159
+
160
+ export const screen = style({ display: 'flex', flexDirection: 'column', rowGap: '8' })
161
+
162
+ export const step = style({ color: 'content.secondary', typography: 'body.b3' })
163
+ }
164
+ ```
165
+
166
+ ### Label the Current Step in Text
167
+
168
+ The segments carry no text. Place a visible step number and a heading above the stepper, such as Step 2 of 3 above Enter amount.
169
+
170
+ **Do:** Pair the stepper with the step number and the step's title.
171
+
172
+ ```tsx
173
+ /**
174
+ * Do example for "Label the Current Step in Text" on the Stepper page.
175
+ * Pair the stepper with the step number and the step's title.
176
+ * @module
177
+ */
178
+ import { Stepper, style } from '@tempoxyz/ds'
179
+
180
+ /** Renders the static preview, which the guideline card shows inert. */
181
+ export function Demo() {
182
+ return (
183
+ <div {...styles.flow()}>
184
+ <Stepper.Root aria-label="Send payment" count={3} value={2} />
185
+ <span {...styles.step()}>Step 2 of 3</span>
186
+ <span {...styles.title()}>Enter amount</span>
187
+ </div>
188
+ )
189
+ }
190
+
191
+ namespace styles {
192
+ export const flow = style({
193
+ display: 'flex',
194
+ flexDirection: 'column',
195
+ rowGap: '8',
196
+ width: '100% !custom',
197
+ })
198
+
199
+ export const step = style({
200
+ color: 'content.secondary',
201
+ marginBlockStart: '8',
202
+ typography: 'body.b3',
203
+ })
204
+
205
+ export const title = style({ color: 'content.primary', typography: 'heading.h3' })
206
+ }
207
+ ```
208
+
209
+ **Don't:** Show the segments without any text.
210
+
211
+ ```tsx
212
+ /**
213
+ * Don't example for "Label the Current Step in Text" on the Stepper page.
214
+ * Don't show the segments without any text.
215
+ * @module
216
+ */
217
+ import { Stepper, style } from '@tempoxyz/ds'
218
+
219
+ /** Renders the static preview, which the guideline card shows inert. */
220
+ export function Demo() {
221
+ return (
222
+ <div {...styles.flow()}>
223
+ <Stepper.Root count={3} value={2} />
224
+ </div>
225
+ )
226
+ }
227
+
228
+ namespace styles {
229
+ export const flow = style({ width: '100% !custom' })
230
+ }
231
+ ```
232
+
233
+ ### Let People Go Back
234
+
235
+ Give every step after the first a Back button before the primary action, and keep the values already entered. Make the last step a review with a specific primary action, such as Confirm payment, and set `value` to `count` there.
236
+
237
+ **Do:** Offer Back before the primary action.
238
+
239
+ ```tsx
240
+ /** Do example for "Let People Go Back" on the Stepper page: offer Back before the primary action. @module */
241
+ import { Button, Stepper, style } from '@tempoxyz/ds'
242
+
243
+ /** Renders the static preview, which the guideline card shows inert. */
244
+ export function Demo() {
245
+ return (
246
+ <div {...styles.flow()}>
247
+ <Stepper.Root aria-label="Send payment" count={3} value={2} />
248
+ <span {...styles.step()}>Step 2 of 3</span>
249
+ <span {...styles.title()}>Enter amount</span>
250
+ <div {...styles.actions()}>
251
+ <Button variant="secondary">Back</Button>
252
+ <Button>Continue</Button>
253
+ </div>
254
+ </div>
255
+ )
256
+ }
257
+
258
+ namespace styles {
259
+ export const actions = style({
260
+ columnGap: '8',
261
+ display: 'flex',
262
+ justifyContent: 'flex-end',
263
+ marginBlockStart: '16',
264
+ })
265
+
266
+ export const flow = style({
267
+ display: 'flex',
268
+ flexDirection: 'column',
269
+ rowGap: '8',
270
+ width: '100% !custom',
271
+ })
272
+
273
+ export const step = style({
274
+ color: 'content.secondary',
275
+ marginBlockStart: '8',
276
+ typography: 'body.b3',
277
+ })
278
+
279
+ export const title = style({ color: 'content.primary', typography: 'heading.h3' })
280
+ }
281
+ ```
282
+
283
+ **Don't:** Leave a step with only a way forward.
284
+
285
+ ```tsx
286
+ /**
287
+ * Don't example for "Let People Go Back" on the Stepper page.
288
+ * Don't leave a step with only a way forward.
289
+ * @module
290
+ */
291
+ import { Button, Stepper, style } from '@tempoxyz/ds'
292
+
293
+ /** Renders the static preview, which the guideline card shows inert. */
294
+ export function Demo() {
295
+ return (
296
+ <div {...styles.flow()}>
297
+ <Stepper.Root aria-label="Send payment" count={3} value={2} />
298
+ <span {...styles.step()}>Step 2 of 3</span>
299
+ <span {...styles.title()}>Enter amount</span>
300
+ <div {...styles.actions()}>
301
+ <Button>Continue</Button>
302
+ </div>
303
+ </div>
304
+ )
305
+ }
306
+
307
+ namespace styles {
308
+ export const actions = style({
309
+ columnGap: '8',
310
+ display: 'flex',
311
+ justifyContent: 'flex-end',
312
+ marginBlockStart: '16',
313
+ })
314
+
315
+ export const flow = style({
316
+ display: 'flex',
317
+ flexDirection: 'column',
318
+ rowGap: '8',
319
+ width: '100% !custom',
320
+ })
321
+
322
+ export const step = style({
323
+ color: 'content.secondary',
324
+ marginBlockStart: '8',
325
+ typography: 'body.b3',
326
+ })
327
+
328
+ export const title = style({ color: 'content.primary', typography: 'heading.h3' })
329
+ }
330
+ ```
331
+
332
+ ### Keep It in One Place
333
+
334
+ Place the stepper in the same spot on every step. In a [Dialog](/docs/components/dialog) or a [Frame](/docs/components/frame), center it in the header, with the Back button on the left from the second step.
335
+
336
+ **Do:** Place the stepper at the top, above the step's heading.
337
+
338
+ ```tsx
339
+ /**
340
+ * Do example for "Label the Current Step in Text" on the Stepper page.
341
+ * Pair the stepper with the step number and the step's title.
342
+ * @module
343
+ */
344
+ import { Stepper, style } from '@tempoxyz/ds'
345
+
346
+ /** Renders the static preview, which the guideline card shows inert. */
347
+ export function Demo() {
348
+ return (
349
+ <div {...styles.flow()}>
350
+ <Stepper.Root aria-label="Send payment" count={3} value={2} />
351
+ <span {...styles.step()}>Step 2 of 3</span>
352
+ <span {...styles.title()}>Enter amount</span>
353
+ </div>
354
+ )
355
+ }
356
+
357
+ namespace styles {
358
+ export const flow = style({
359
+ display: 'flex',
360
+ flexDirection: 'column',
361
+ rowGap: '8',
362
+ width: '100% !custom',
363
+ })
364
+
365
+ export const step = style({
366
+ color: 'content.secondary',
367
+ marginBlockStart: '8',
368
+ typography: 'body.b3',
369
+ })
370
+
371
+ export const title = style({ color: 'content.primary', typography: 'heading.h3' })
372
+ }
373
+ ```
374
+
375
+ **Don't:** Place the stepper below the step's content.
376
+
377
+ ```tsx
378
+ /**
379
+ * Don't example for "Keep It in One Place" on the Stepper page.
380
+ * Don't place the stepper below the step's content.
381
+ * @module
382
+ */
383
+ import { Stepper, style } from '@tempoxyz/ds'
384
+
385
+ /** Renders the static preview, which the guideline card shows inert. */
386
+ export function Demo() {
387
+ return (
388
+ <div {...styles.flow()}>
389
+ <span {...styles.step()}>Step 2 of 3</span>
390
+ <span {...styles.title()}>Enter amount</span>
391
+ <Stepper.Root aria-label="Send payment" count={3} value={2} {...styles.stepper()} />
392
+ </div>
393
+ )
394
+ }
395
+
396
+ namespace styles {
397
+ export const flow = style({
398
+ display: 'flex',
399
+ flexDirection: 'column',
400
+ rowGap: '8',
401
+ width: '100% !custom',
402
+ })
403
+
404
+ export const step = style({ color: 'content.secondary', typography: 'body.b3' })
405
+
406
+ export const stepper = style({ marginBlockStart: '16' })
407
+
408
+ export const title = style({ color: 'content.primary', typography: 'heading.h3' })
409
+ }
410
+ ```
411
+
412
+ ## Content
413
+
414
+ * Write step titles as short tasks or nouns, such as Recipient, Amount, and Review.
415
+ * Match the visible step text to the announced value, Step 2 of 3.
416
+ * Before the first step, list what people need, such as an ID or a funded wallet.
417
+
418
+ ## Accessibility
419
+
420
+ A stepper renders a `progressbar` whose value is the current step. The segments are visual only.
421
+
422
+ ### Semantics
423
+
424
+ * **Root (progressbar):** Its value is the current step, 1 to `count`.
425
+ * **Value Text (aria-valuetext):** Reads as "Step 2 of 4".
426
+ * **Name (aria-label):** Named "Progress" by default.
427
+ * **No Focus Stop (not focusable):** Tab moves past it to the next control.
428
+
429
+ ### Your Responsibilities
430
+
431
+ * **Name the Flow (aria-label):** Name the flow, such as "Account setup". Don't repeat the step text, which is already read.
432
+ * **Label Each Step (SC 1.3.1):** Name the current step in visible text, so progress doesn't rely on color alone.
433
+ * **Move Focus on Advance:** When the step changes, move focus to the new step's heading, so screen readers announce the new step.
434
+
435
+ ## Related
436
+
437
+ [Progress](/docs/components/progress)
438
+
439
+ Use for measurable work.
440
+
441
+ [Dialog](/docs/components/dialog)
442
+
443
+ Use for flows that open over the page.
444
+
445
+ [Forms](/docs/patterns/forms)
446
+
447
+ Covers laying out each step.
448
+
449
+ [Payments](/docs/patterns/payments)
450
+
451
+ Covers send and review flows.