@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,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.