@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,299 +0,0 @@
1
- # Stack
2
-
3
- Lays out children in a vertical column.
4
-
5
- [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/Stack.tsx)
6
-
7
- ## Overview
8
-
9
- Stack applies a spacing token `gap` between its children and stretches them to its width by default.
10
-
11
- ## Examples
12
-
13
- ### Basic
14
-
15
- ```tsx
16
- import { Stack } from '@tempoxyz/ds'
17
-
18
- export function Demo() {
19
- return (
20
- <Stack gap="12">
21
- <span>Card content</span>
22
- <span>Second line</span>
23
- </Stack>
24
- )
25
- }
26
- ```
27
-
28
- [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Stack/Basic.tsx)
29
-
30
- ### Gap
31
-
32
- Set `gap` to a spacing token. It defaults to `16`.
33
-
34
- ```tsx
35
- import { Inline, Stack, style } from '@tempoxyz/ds'
36
-
37
- export function Demo() {
38
- return (
39
- <Inline align="start" gap="32" wrap>
40
- {(['4', '12', '24'] as const).map((gap) => (
41
- <Stack gap={gap} key={gap}>
42
- {[1, 2, 3].map((n) => (
43
- <span key={n} {...styles.chip()}>
44
- gap {gap}
45
- </span>
46
- ))}
47
- </Stack>
48
- ))}
49
- </Inline>
50
- )
51
- }
52
-
53
- namespace styles {
54
- export const chip = style({
55
- backgroundColor: 'container.regular',
56
- borderRadius: 'full',
57
- cornerShape: 'round',
58
- paddingBlock: '4',
59
- paddingInline: '12',
60
- })
61
- }
62
- ```
63
-
64
- [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Stack/Gap.tsx)
65
-
66
- ### Align
67
-
68
- Set `align` to `start`, `center`, `end`, or `stretch` (default).
69
-
70
- ```tsx
71
- import { Inline, Stack, style } from '@tempoxyz/ds'
72
-
73
- export function Demo() {
74
- return (
75
- <Inline align="start" gap="32" wrap>
76
- {(['start', 'center', 'end', 'stretch'] as const).map((align) => (
77
- <Stack align={align} gap="8" key={align} {...styles.column()}>
78
- <span {...styles.chip()}>{align}</span>
79
- <span {...styles.chip()}>Second line</span>
80
- </Stack>
81
- ))}
82
- </Inline>
83
- )
84
- }
85
-
86
- namespace styles {
87
- export const chip = style({
88
- backgroundColor: 'container.regular',
89
- borderRadius: 'full',
90
- cornerShape: 'round',
91
- paddingBlock: '4',
92
- paddingInline: '12',
93
- })
94
-
95
- export const column = style({ width: '10rem !custom' })
96
- }
97
- ```
98
-
99
- [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Stack/Align.tsx)
100
-
101
- ## Anatomy
102
-
103
- Import the component and assemble its parts.
104
-
105
- ```tsx
106
- import { Stack } from '@tempoxyz/ds'
107
-
108
- <Stack />
109
- ```
110
-
111
- ## Guidelines
112
-
113
- ### When to Use
114
-
115
- * Space siblings vertically, such as form fields, settings sections, or cards in a column.
116
- * Place a label above its value, such as Recipient over a 0x address.
117
-
118
- ### When Not to Use
119
-
120
- * Use [Inline](inline.md) for a horizontal row.
121
- * Use [Grid](grid.md) for collections in columns.
122
- * Use [ListGroup](list-group.md) for a divided list of settings or details.
123
-
124
- ### Use Gap Instead of Margins
125
-
126
- Space siblings with `gap`, not child margins. See [Layout](../foundations/layout.md).
127
-
128
- **Do:** Set one `gap` on the Stack.
129
-
130
- ```tsx
131
- /** Do example for "Use Gap Instead of Margins" on the Stack page: set one `gap` on the Stack. @module */
132
- import { Stack, style, Surface } from '@tempoxyz/ds'
133
-
134
- /** Renders the static preview, which the guideline card shows inert. */
135
- export function Demo() {
136
- return (
137
- <Stack gap="12" {...styles.canvas()}>
138
- <Surface size="small">Balance</Surface>
139
- <Surface size="small">Activity</Surface>
140
- <Surface size="small">Access keys</Surface>
141
- </Stack>
142
- )
143
- }
144
-
145
- namespace styles {
146
- export const canvas = style({
147
- backgroundColor: 'background.primary',
148
- borderRadius: 'sm',
149
- boxSizing: 'border-box',
150
- padding: '12',
151
- width: '100% !custom',
152
- })
153
- }
154
- ```
155
-
156
- **Don't:** Set margins on each child, which drift apart and leave space after the last one.
157
-
158
- ```tsx
159
- /**
160
- * Don't example for "Use Gap Instead of Margins" on the Stack page.
161
- * Don't set margins on each child, which drift apart and leave space after the last one.
162
- * @module
163
- */
164
- import { style, Surface } from '@tempoxyz/ds'
165
-
166
- /** Renders the static preview, which the guideline card shows inert. */
167
- export function Demo() {
168
- return (
169
- <div {...styles.canvas()}>
170
- <Surface size="small" {...styles.first()}>
171
- Balance
172
- </Surface>
173
- <Surface size="small" {...styles.second()}>
174
- Activity
175
- </Surface>
176
- <Surface size="small" {...styles.third()}>
177
- Access keys
178
- </Surface>
179
- </div>
180
- )
181
- }
182
-
183
- namespace styles {
184
- export const canvas = style({
185
- backgroundColor: 'background.primary',
186
- borderRadius: 'sm',
187
- boxSizing: 'border-box',
188
- padding: '12',
189
- width: '100% !custom',
190
- })
191
-
192
- export const first = style({ marginBlockEnd: '4' })
193
-
194
- export const second = style({ marginBlockEnd: '24' })
195
-
196
- export const third = style({ marginBlockEnd: '16' })
197
- }
198
- ```
199
-
200
- ### Choose Gap by Relationship
201
-
202
- Nest stacks so the space inside a group is smaller than the space between groups, such as `4` between a label and its value and `24` between pairs.
203
-
204
- **Do:** Nest stacks so each label sits closer to its own value.
205
-
206
- ```tsx
207
- /**
208
- * Do example for "Choose Gap by Relationship" on the Stack page.
209
- * Nest stacks so each label sits closer to its own value.
210
- * @module
211
- */
212
- import { Stack, style } from '@tempoxyz/ds'
213
-
214
- /** Renders the static preview, which the guideline card shows inert. */
215
- export function Demo() {
216
- return (
217
- <Stack gap="24" {...styles.column()}>
218
- <Stack gap="4">
219
- <span {...styles.label()}>Recipient</span>
220
- <span {...styles.value()}>0x71C7…976F</span>
221
- </Stack>
222
- <Stack gap="4">
223
- <span {...styles.label()}>Amount</span>
224
- <span {...styles.value()}>250.00 USDC</span>
225
- </Stack>
226
- </Stack>
227
- )
228
- }
229
-
230
- namespace styles {
231
- export const column = style({ width: '100% !custom' })
232
-
233
- export const label = style({ color: 'content.secondary', typography: 'body.b3' })
234
-
235
- export const value = style({ color: 'content.primary', typography: 'body.b1Strong' })
236
- }
237
- ```
238
-
239
- **Don't:** Space every item the same, which hides the groups.
240
-
241
- ```tsx
242
- /**
243
- * Don't example for "Choose Gap by Relationship" on the Stack page.
244
- * Don't space every item the same, which hides the groups.
245
- * @module
246
- */
247
- import { Stack, style } from '@tempoxyz/ds'
248
-
249
- /** Renders the static preview, which the guideline card shows inert. */
250
- export function Demo() {
251
- return (
252
- <Stack gap="16" {...styles.column()}>
253
- <span {...styles.label()}>Recipient</span>
254
- <span {...styles.value()}>0x71C7…976F</span>
255
- <span {...styles.label()}>Amount</span>
256
- <span {...styles.value()}>250.00 USDC</span>
257
- </Stack>
258
- )
259
- }
260
-
261
- namespace styles {
262
- export const column = style({ width: '100% !custom' })
263
-
264
- export const label = style({ color: 'content.secondary', typography: 'body.b3' })
265
-
266
- export const value = style({ color: 'content.primary', typography: 'body.b1Strong' })
267
- }
268
- ```
269
-
270
- ## Accessibility
271
-
272
- Stack adds no role, name, or keyboard behavior.
273
-
274
- ### Semantics
275
-
276
- * **Element (div):** Carries no role by default.
277
- * **Render (render):** Swaps in a semantic element, such as a nav for links, or a list so screen readers announce the count.
278
-
279
- ### Your Responsibilities
280
-
281
- * **Match DOM and Visual Order (SC 1.3.2, SC 2.4.3):** Don't reorder children with CSS. [Reading](https://www.w3.org/WAI/WCAG22/Understanding/meaningful-sequence.html) and [focus](https://www.w3.org/WAI/WCAG22/Understanding/focus-order.html) order follow the DOM.
282
-
283
- ## Related
284
-
285
- [Inline](inline.md)
286
-
287
- Use for horizontal rows.
288
-
289
- [Grid](grid.md)
290
-
291
- Use for columns of items.
292
-
293
- [Separator](separator.md)
294
-
295
- Use for a rule between groups.
296
-
297
- [Layout](../foundations/layout.md)
298
-
299
- Covers the spacing scale.
@@ -1,226 +0,0 @@
1
- # StatusChip
2
-
3
- Names the status of a payment, an authorization, or a network.
4
-
5
- [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/StatusChip.tsx)
6
-
7
- Figma: [Elements/Network Chip](https://www.figma.com/design/yE96kcymnNR88PJp6G1sPs?node-id=5227-3090), [Messaging/Status Chip](https://www.figma.com/design/yE96kcymnNR88PJp6G1sPs?node-id=5227-3776)
8
-
9
- ## Overview
10
-
11
- A status chip renders a short label in a tinted pill, led by a dot in the color of its `intent`. A loading chip replaces the dot with a spinner, for a status that is still in progress. A network chip names a network at a fixed minimum width.
12
-
13
- ## Examples
14
-
15
- ### Basic
16
-
17
- ```tsx
18
- import { StatusChip } from '@tempoxyz/ds'
19
-
20
- export function Demo() {
21
- return <StatusChip intent="warning">Pending</StatusChip>
22
- }
23
- ```
24
-
25
- [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/StatusChip/Basic.tsx)
26
-
27
- ### Intent
28
-
29
- Set `intent` to `neutral` (default), `positive`, `warning`, or `negative`.
30
-
31
- ```tsx
32
- import { StatusChip, style } from '@tempoxyz/ds'
33
-
34
- export function Demo() {
35
- return (
36
- <div {...styles.row()}>
37
- <StatusChip intent="positive">Authorized</StatusChip>
38
- <StatusChip intent="warning">Needs approval</StatusChip>
39
- <StatusChip intent="negative">Failed</StatusChip>
40
- <StatusChip intent="neutral">Expired</StatusChip>
41
- </div>
42
- )
43
- }
44
-
45
- namespace styles {
46
- export const row = style({ alignItems: 'center', display: 'flex', flexWrap: 'wrap', gap: '8' })
47
- }
48
- ```
49
-
50
- [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/StatusChip/Intent.tsx)
51
-
52
- ### Size
53
-
54
- Set `size` to `medium` (28px, default) or `small` (24px).
55
-
56
- ```tsx
57
- import { StatusChip, style } from '@tempoxyz/ds'
58
-
59
- export function Demo() {
60
- return (
61
- <div {...styles.row()}>
62
- <StatusChip intent="positive">Live</StatusChip>
63
- <StatusChip intent="positive" size="small">
64
- Live
65
- </StatusChip>
66
- </div>
67
- )
68
- }
69
-
70
- namespace styles {
71
- export const row = style({ alignItems: 'center', display: 'flex', gap: '8' })
72
- }
73
- ```
74
-
75
- [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/StatusChip/Size.tsx)
76
-
77
- ### Loading
78
-
79
- Set `loading` for a status in progress, such as Processing.
80
-
81
- ```tsx
82
- import { StatusChip } from '@tempoxyz/ds'
83
-
84
- export function Demo() {
85
- return <StatusChip loading>Processing</StatusChip>
86
- }
87
- ```
88
-
89
- [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/StatusChip/Loading.tsx)
90
-
91
- ### Network
92
-
93
- Set `network` for a chip that names a network, such as Mainnet or Testnet. It keeps an 80px minimum width, with the dot closer to the label.
94
-
95
- ```tsx
96
- import { StatusChip, style } from '@tempoxyz/ds'
97
-
98
- export function Demo() {
99
- return (
100
- <div {...styles.row()}>
101
- <StatusChip intent="positive" network>
102
- Mainnet
103
- </StatusChip>
104
- <StatusChip intent="warning" network>
105
- Testnet
106
- </StatusChip>
107
- </div>
108
- )
109
- }
110
-
111
- namespace styles {
112
- export const row = style({ alignItems: 'center', display: 'flex', gap: '8' })
113
- }
114
- ```
115
-
116
- [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/StatusChip/Network.tsx)
117
-
118
- ## Anatomy
119
-
120
- Import the component and assemble its parts.
121
-
122
- ```tsx
123
- import { StatusChip } from '@tempoxyz/ds'
124
-
125
- <StatusChip />
126
- ```
127
-
128
- ## Guidelines
129
-
130
- ### When to Use
131
-
132
- * Show where a payment, a deposit, or an authorization stands, such as Pending or Authorized.
133
- * Show whether a network is live or a testnet, with `network`.
134
-
135
- ### When Not to Use
136
-
137
- * Use [Badge](badge.md) for a category or an attribute that is not a status.
138
- * Use [Alert](alert.md) to explain a status and what to do next.
139
- * Use [AssetChip](asset-chip.md) for the assets a row supports.
140
-
141
- ### Pick the Intent From the Outcome
142
-
143
- * **Positive:** The action is done, or the item is live.
144
- * **Warning:** The item waits on a person or a later step.
145
- * **Negative:** The action failed and needs attention.
146
- * **Neutral:** The item ended without an outcome.
147
-
148
- ### Name Only Statuses
149
-
150
- **Do:** Place the chip at the end of the row whose status it names.
151
-
152
- ```tsx
153
- import { ListGroup, StatusChip } from '@tempoxyz/ds'
154
-
155
- export function Demo() {
156
- return (
157
- <ListGroup variant="boxed">
158
- <ListGroup.Row>
159
- <ListGroup.Info>
160
- <ListGroup.Title>Claude</ListGroup.Title>
161
- <ListGroup.Description>$10.00 a month</ListGroup.Description>
162
- </ListGroup.Info>
163
- <StatusChip intent="positive" size="small">
164
- Authorized
165
- </StatusChip>
166
- </ListGroup.Row>
167
- </ListGroup>
168
- )
169
- }
170
- ```
171
-
172
- **Don't:** Use a status chip for a category. Use a [Badge](badge.md).
173
-
174
- ```tsx
175
- import { ListGroup, StatusChip } from '@tempoxyz/ds'
176
-
177
- export function Demo() {
178
- return (
179
- <ListGroup variant="boxed">
180
- <ListGroup.Row>
181
- <ListGroup.Info>
182
- <ListGroup.Title>Claude</ListGroup.Title>
183
- <ListGroup.Description>$10.00 a month</ListGroup.Description>
184
- </ListGroup.Info>
185
- <StatusChip intent="positive" size="small">
186
- Agent
187
- </StatusChip>
188
- </ListGroup.Row>
189
- </ListGroup>
190
- )
191
- }
192
- ```
193
-
194
- ## Content
195
-
196
- ### Write the Status
197
-
198
- Write one or two words that name the state, such as Pending, Live, or Needs approval. Use sentence case, and leave out words such as Status.
199
-
200
- ## Accessibility
201
-
202
- A status chip renders a `<span>` that screen readers read as text in place. The dot and the spinner are hidden, so the label alone carries the status.
203
-
204
- ### Semantics
205
-
206
- * **Root (span):** Screen readers read the label in place, without the dot.
207
- * **Loading (aria-hidden):** The spinner is hidden, so screen readers read the label once.
208
-
209
- ### Your Responsibilities
210
-
211
- * **Name the Status in Text (SC 1.4.1):** The intent color is decorative, so the label must name the status.
212
- * **Announce a Change (aria-live):** Wrap a chip that changes in place in a polite live region.
213
-
214
- ## Related
215
-
216
- [Badge](badge.md)
217
-
218
- Use for categories and attributes.
219
-
220
- [Alert](alert.md)
221
-
222
- Use for a status that needs an explanation.
223
-
224
- [StatusRow](status-row.md)
225
-
226
- Use for a status that follows a payment in a row.
@@ -1,119 +0,0 @@
1
- # StatusIndicator
2
-
3
- Names the status of a system or a service with a dot and a label.
4
-
5
- [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/StatusIndicator.tsx)
6
-
7
- Figma: [Status indicator](https://www.figma.com/design/yE96kcymnNR88PJp6G1sPs?node-id=3065-474)
8
-
9
- ## Overview
10
-
11
- A status indicator renders a short secondary label, led by an 8px dot in the color of its `intent`. It has no fill, so it sits quietly beside a title or in a list of services.
12
-
13
- ## Examples
14
-
15
- ### Basic
16
-
17
- ```tsx
18
- import { StatusIndicator } from '@tempoxyz/ds'
19
-
20
- export function Demo() {
21
- return <StatusIndicator intent="positive">Operational</StatusIndicator>
22
- }
23
- ```
24
-
25
- [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/StatusIndicator/Basic.tsx)
26
-
27
- ### Intent
28
-
29
- Set `intent` to `neutral` (default), `positive`, `warning`, or `negative`. Each colors the dot.
30
-
31
- ```tsx
32
- import { StatusIndicator, style } from '@tempoxyz/ds'
33
-
34
- export function Demo() {
35
- return (
36
- <div {...styles.row()}>
37
- <StatusIndicator intent="neutral">Idle</StatusIndicator>
38
- <StatusIndicator intent="positive">Operational</StatusIndicator>
39
- <StatusIndicator intent="warning">Degraded</StatusIndicator>
40
- <StatusIndicator intent="negative">Down</StatusIndicator>
41
- </div>
42
- )
43
- }
44
-
45
- namespace styles {
46
- export const row = style({ alignItems: 'center', display: 'flex', flexWrap: 'wrap', gap: '16' })
47
- }
48
- ```
49
-
50
- [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/StatusIndicator/Intent.tsx)
51
-
52
- ## Anatomy
53
-
54
- Import the component and assemble its parts.
55
-
56
- ```tsx
57
- import { StatusIndicator } from '@tempoxyz/ds'
58
-
59
- <StatusIndicator />
60
- ```
61
-
62
- ## Guidelines
63
-
64
- ### When to Use
65
-
66
- * Show the live status of a system, a service, or a connection, such as Operational or Degraded.
67
-
68
- ### When Not to Use
69
-
70
- * Use a [StatusChip](status-chip.md) for the status of a payment or an authorization.
71
- * Use a [Badge](badge.md) for a category or an attribute.
72
- * Use an [Alert](alert.md) for a status that needs an explanation.
73
-
74
- ### Match the Intent to the Status
75
-
76
- * **Healthy (positive):** A service that works as expected, such as an online validator.
77
- * **Degraded (warning):** A service that works with delays or reduced capacity right now.
78
- * **Down (negative):** A service that fails or can't be reached, such as an offline node.
79
- * **Idle (neutral):** A service that is paused, idle, or in a state that isn't known yet.
80
-
81
- ### Name the Status in the Label
82
-
83
- **Do:** Name the status in a word, so it doesn't depend on the dot color.
84
-
85
- ```tsx
86
- <StatusIndicator intent="negative">Down</StatusIndicator>
87
- ```
88
-
89
- **Don't:** Label the dot with the name of the service alone.
90
-
91
- ```tsx
92
- <StatusIndicator intent="negative">API</StatusIndicator>
93
- ```
94
-
95
- ## Content
96
-
97
- * Keep the label to one or two words in sentence case, such as Operational or Partial outage.
98
- * Use one word for one status across a product.
99
-
100
- ## Accessibility
101
-
102
- A status indicator renders a `<span>` with no role. The dot is hidden, so screen readers read the label alone.
103
-
104
- * **Dot (aria-hidden):** Hides the dot from screen readers, so the label carries the status.
105
- * **Live Updates (role):** If the status changes in place, set `role="status"` so the change is announced.
106
-
107
- ## Related
108
-
109
- [StatusChip](status-chip.md)
110
-
111
- Use for the status of a payment or an authorization.
112
-
113
- [Badge](badge.md)
114
-
115
- Use for categories and attributes.
116
-
117
- [Alert](alert.md)
118
-
119
- Use for a status that needs an explanation.