@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,406 +0,0 @@
1
- # SecretValue
2
-
3
- Masks a secret and adds reveal and copy buttons.
4
-
5
- [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/SecretValue.tsx)
6
-
7
- ## Overview
8
-
9
- SecretValue masks a secret behind 16 dots and adds reveal and copy buttons. A click anywhere on the block copies the value without revealing it.
10
-
11
- ## Examples
12
-
13
- ### Basic
14
-
15
- ```tsx
16
- import { SecretValue, style } from '@tempoxyz/ds'
17
-
18
- export const fill = true
19
- export function Demo() {
20
- return (
21
- <SecretValue label="API key" value="sk_demo_4eC39HqLyjWDarjtT1zdp7dc" {...styles.value()} />
22
- )
23
- }
24
-
25
- namespace styles {
26
- export const value = style({ maxWidth: '28rem !custom' })
27
- }
28
- ```
29
-
30
- [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/SecretValue/Basic.tsx)
31
-
32
- ### Size
33
-
34
- Set `size` to `small`, `medium` (default), or `large`.
35
-
36
- ```tsx
37
- import { SecretValue, style } from '@tempoxyz/ds'
38
-
39
- export function Demo() {
40
- return (
41
- <div {...styles.column()}>
42
- {(['small', 'medium', 'large'] as const).map((size) => (
43
- <SecretValue
44
- key={size}
45
- label="API key"
46
- size={size}
47
- value="sk_demo_4eC39HqLyjWDarjtT1zdp7dc"
48
- />
49
- ))}
50
- </div>
51
- )
52
- }
53
-
54
- namespace styles {
55
- export const column = style({
56
- display: 'grid',
57
- gap: '12',
58
- gridTemplateColumns: 'minmax(0, 28rem) !custom',
59
- })
60
- }
61
- ```
62
-
63
- [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/SecretValue/Size.tsx)
64
-
65
- ### DefaultRevealed
66
-
67
- Set `defaultRevealed` to start with the value shown.
68
-
69
- ```tsx
70
- import { SecretValue, style } from '@tempoxyz/ds'
71
-
72
- export const fill = true
73
- export function Demo() {
74
- return (
75
- <SecretValue
76
- defaultRevealed
77
- label="API key"
78
- value="sk_demo_4eC39HqLyjWDarjtT1zdp7dc"
79
- {...styles.value()}
80
- />
81
- )
82
- }
83
-
84
- namespace styles {
85
- export const value = style({ maxWidth: '28rem !custom' })
86
- }
87
- ```
88
-
89
- [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/SecretValue/DefaultRevealed.tsx)
90
-
91
- ## Anatomy
92
-
93
- Import the component and assemble its parts.
94
-
95
- ```tsx
96
- import { SecretValue } from '@tempoxyz/ds'
97
-
98
- <SecretValue />
99
- ```
100
-
101
- ## Guidelines
102
-
103
- ### When to Use
104
-
105
- * Show an API key, webhook signing secret, or access key that people copy into another system.
106
- * Show a recovery key that people must store, behind an explicit reveal.
107
-
108
- ### When Not to Use
109
-
110
- * Use [Snippet](snippet.md) for commands and values that are not secret, such as a webhook URL.
111
- * Use [Hex](hex.md) with `copy` for public addresses and transaction hashes.
112
- * Use [TextInput](text-input.md) with `type="password"` when people enter a secret.
113
-
114
- ### Start Masked
115
-
116
- Keep the value hidden until someone presses Reveal. Copy works without a reveal, and anyone near the screen or in a screen share can read a revealed value.
117
-
118
- * **`defaultRevealed`:** Set it only on a screen that exists to show the value, such as a key creation confirmation.
119
- * **Mask again:** Control `revealed` with `onRevealedChange` to mask the value again, such as when the tab is hidden or after a minute.
120
-
121
- **Do:** Show the secret masked, with its name above it.
122
-
123
- ```tsx
124
- /** Do example for "Start Masked" on the SecretValue page: show the secret masked, with its name above it. @module */
125
- import { SecretValue, style } from '@tempoxyz/ds'
126
-
127
- /** Renders the static preview, which the guideline card shows inert. */
128
- export function Demo() {
129
- return (
130
- <div {...styles.field()}>
131
- <span {...styles.label()}>Production API key</span>
132
- <SecretValue label="Production API key" value="tk_live_9fA2c81bE07d4c55a3e6" />
133
- </div>
134
- )
135
- }
136
-
137
- namespace styles {
138
- export const field = style({ display: 'grid', gap: '8', width: '100% !custom' })
139
-
140
- export const label = style({ color: 'content.primary', typography: 'body.b2Strong' })
141
- }
142
- ```
143
-
144
- **Don't:** Reveal a secret by default on a page people return to, such as a key list.
145
-
146
- ```tsx
147
- /**
148
- * Don't example for "Start Masked" on the SecretValue page.
149
- * Don't reveal a secret by default on a page people return to, such as a key list.
150
- * @module
151
- */
152
- import { SecretValue, style } from '@tempoxyz/ds'
153
-
154
- /** Renders the static preview, which the guideline card shows inert. */
155
- export function Demo() {
156
- return (
157
- <div {...styles.field()}>
158
- <span {...styles.label()}>Production API key</span>
159
- <SecretValue
160
- defaultRevealed
161
- label="Production API key"
162
- value="tk_live_9fA2c81bE07d4c55a3e6"
163
- />
164
- </div>
165
- )
166
- }
167
-
168
- namespace styles {
169
- export const field = style({ display: 'grid', gap: '8', width: '100% !custom' })
170
-
171
- export const label = style({ color: 'content.primary', typography: 'body.b2Strong' })
172
- }
173
- ```
174
-
175
- ### Name Every Secret
176
-
177
- `label` sets the group's `aria-label`, which gives each button context. It is not visible. The mask is always 16 dots, so it can't tell keys apart either.
178
-
179
- **Do:** Show what each key unlocks above it, with a creation or last used date.
180
-
181
- ```tsx
182
- /**
183
- * Do example for "Name Every Secret" on the SecretValue page.
184
- * Show what each key unlocks above it, with a creation or last used date.
185
- * @module
186
- */
187
- import { SecretValue, style } from '@tempoxyz/ds'
188
-
189
- /** Renders the static preview, which the guideline card shows inert. */
190
- export function Demo() {
191
- return (
192
- <div {...styles.list()}>
193
- <div {...styles.field()}>
194
- <div {...styles.header()}>
195
- <span {...styles.label()}>Production API key</span>
196
- <span {...styles.meta()}>Last used 2 hours ago</span>
197
- </div>
198
- <SecretValue label="Production API key" size="small" value="tk_live_9fA2c81bE07d4c55a3e6" />
199
- </div>
200
- <div {...styles.field()}>
201
- <div {...styles.header()}>
202
- <span {...styles.label()}>Staging API key</span>
203
- <span {...styles.meta()}>Created Oct 2</span>
204
- </div>
205
- <SecretValue label="Staging API key" size="small" value="tk_test_41bD7e0aC93f2d18b6c5" />
206
- </div>
207
- </div>
208
- )
209
- }
210
-
211
- namespace styles {
212
- export const field = style({ display: 'grid', gap: '8' })
213
-
214
- export const header = style({
215
- alignItems: 'baseline',
216
- display: 'flex',
217
- gap: '12',
218
- justifyContent: 'space-between',
219
- })
220
-
221
- export const label = style({ color: 'content.primary', typography: 'body.b2Strong' })
222
-
223
- export const list = style({ display: 'grid', gap: '16', width: '100% !custom' })
224
-
225
- export const meta = style({ color: 'content.secondary', typography: 'body.b3' })
226
- }
227
- ```
228
-
229
- **Don't:** Leave people to tell keys apart by revealing them.
230
-
231
- ```tsx
232
- /**
233
- * Don't example for "Name Every Secret" on the SecretValue page.
234
- * Don't leave people to tell keys apart by revealing them.
235
- * @module
236
- */
237
- import { SecretValue, style } from '@tempoxyz/ds'
238
-
239
- /** Renders the static preview, which the guideline card shows inert. */
240
- export function Demo() {
241
- return (
242
- <div {...styles.list()}>
243
- <SecretValue label="Production API key" size="small" value="tk_live_9fA2c81bE07d4c55a3e6" />
244
- <SecretValue label="Staging API key" size="small" value="tk_test_41bD7e0aC93f2d18b6c5" />
245
- </div>
246
- )
247
- }
248
-
249
- namespace styles {
250
- export const list = style({ display: 'grid', gap: '16', width: '100% !custom' })
251
- }
252
- ```
253
-
254
- ### Keep Each Secret on One Line
255
-
256
- The value does not wrap, and a long revealed value scrolls horizontally.
257
-
258
- **Do:** Give a recovery phrase of 12 or 24 words its own numbered layout, behind the same explicit
259
- reveal.
260
-
261
- ```tsx
262
- /**
263
- * Do example for "Keep Each Secret on One Line" on the SecretValue page.
264
- * Give a recovery phrase of 12 or 24 words its own numbered layout, behind the same explicit reveal.
265
- * @module
266
- */
267
- import { style } from '@tempoxyz/ds'
268
-
269
- const words = [
270
- 'orbit',
271
- 'maple',
272
- 'ledger',
273
- 'canyon',
274
- 'velvet',
275
- 'harbor',
276
- 'quartz',
277
- 'ember',
278
- 'signal',
279
- 'meadow',
280
- 'falcon',
281
- 'summit',
282
- ] as const
283
-
284
- /** Renders the static preview, which the guideline card shows inert. */
285
- export function Demo() {
286
- return (
287
- <div {...styles.field()}>
288
- <span {...styles.label()}>Recovery phrase</span>
289
- <ol {...styles.grid()}>
290
- {words.map((word, index) => (
291
- <li key={word} {...styles.word()}>
292
- <span {...styles.index()}>{index + 1}</span>
293
- {word}
294
- </li>
295
- ))}
296
- </ol>
297
- </div>
298
- )
299
- }
300
-
301
- namespace styles {
302
- export const field = style({ display: 'grid', gap: '8', width: '100% !custom' })
303
-
304
- export const grid = style({
305
- display: 'grid',
306
- gap: '8',
307
- gridTemplateColumns: 'repeat(3, 1fr) !custom',
308
- listStyle: 'none',
309
- margin: '0',
310
- padding: '0',
311
- })
312
-
313
- export const index = style({ color: 'content.secondary', minWidth: '1.25rem !custom' })
314
-
315
- export const label = style({ color: 'content.primary', typography: 'body.b2Strong' })
316
-
317
- export const word = style({
318
- backgroundColor: 'container.regular',
319
- borderRadius: '2xs',
320
- color: 'content.primary',
321
- display: 'flex',
322
- gap: '4',
323
- padding: '8',
324
- typography: 'mono.m1',
325
- })
326
- }
327
- ```
328
-
329
- **Don't:** Put a recovery phrase in one scrolling line.
330
-
331
- ```tsx
332
- /**
333
- * Don't example for "Keep Each Secret on One Line" on the SecretValue page.
334
- * Don't put a recovery phrase in one scrolling line.
335
- * @module
336
- */
337
- import { SecretValue, style } from '@tempoxyz/ds'
338
-
339
- /** Renders the static preview, which the guideline card shows inert. */
340
- export function Demo() {
341
- return (
342
- <div {...styles.field()}>
343
- <span {...styles.label()}>Recovery phrase</span>
344
- <SecretValue
345
- defaultRevealed
346
- label="Recovery phrase"
347
- value="orbit maple ledger canyon velvet harbor quartz ember signal meadow falcon summit"
348
- />
349
- </div>
350
- )
351
- }
352
-
353
- namespace styles {
354
- export const field = style({ display: 'grid', gap: '8', width: '100% !custom' })
355
-
356
- export const label = style({ color: 'content.primary', typography: 'body.b2Strong' })
357
- }
358
- ```
359
-
360
- ## Content
361
-
362
- * **Visibility:** If a key is shown once, write Store this key now. You can't view it again.
363
- * **Leaks:** Link to the replacement action, such as Rotate key.
364
-
365
- ## Accessibility
366
-
367
- SecretValue renders a named `group` with a masked `<code>` value, a reveal toggle, and a copy button. Both buttons follow the [WAI-ARIA Authoring Practices button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/button/).
368
-
369
- ### Semantics
370
-
371
- * **Root (group):** Takes its name from the `label` prop.
372
- * **Value (16 dots):** Screen readers read the dots, never the secret. The mask hides the length and blocks selection.
373
- * **Reveal Button (aria-pressed):** A native button named "Reveal" that reports whether the secret is shown.
374
- * **Copy Button (button):** A native button named "Copy". It reads "Copied" for two seconds, and a polite status region announces each copy.
375
- * **Pointer Shortcut (click):** A click on the block copies without a reveal. Keyboard users use the copy button.
376
-
377
- ### Keyboard
378
-
379
- * **Move Between Buttons (Tab):** Moves focus to the reveal button, then to the copy button. The value takes no focus.
380
- * **Reveal or Copy (Enter or Space):** The reveal button shows or hides the secret. The copy button copies it. Focus stays on the pressed button.
381
-
382
- ### Your Responsibilities
383
-
384
- * **Allow Paste (SC 3.3.8):** Do not block paste where people use the secret. [Accessible authentication](https://www.w3.org/WAI/WCAG22/Understanding/accessible-authentication-minimum.html) relies on it.
385
-
386
- ## Related
387
-
388
- [Snippet](snippet.md)
389
-
390
- Use for values that aren't secret.
391
-
392
- [CopyButton](copy-button.md)
393
-
394
- Use for copying beside your own layout.
395
-
396
- [TextInput](text-input.md)
397
-
398
- Use for entering a secret.
399
-
400
- [Destructive Actions](../patterns/destructive-actions.md)
401
-
402
- Covers revoking and rotating keys.
403
-
404
- [Tempo Console](../products/tempo-console.md)
405
-
406
- Covers API key screens.