@tempoxyz/ds 0.3.11 → 0.3.13
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.
- package/README.md +7 -6
- package/dist/docs/AGENTS.md +8 -5
- package/dist/docs/index.md +143 -135
- package/dist/docs/marketing/introduction/getting-started.md +241 -0
- package/dist/docs/{components → product/components}/accordion.md +8 -8
- package/dist/docs/{components → product/components}/address-card.md +5 -5
- package/dist/docs/{components → product/components}/agent-logo.md +5 -5
- package/dist/docs/{components → product/components}/alert-dialog.md +11 -11
- package/dist/docs/{components → product/components}/alert.md +11 -11
- package/dist/docs/{components → product/components}/amount-input.md +13 -13
- package/dist/docs/{components → product/components}/amount.md +8 -8
- package/dist/docs/{components → product/components}/app-shell.md +13 -13
- package/dist/docs/{components → product/components}/asset-chip.md +11 -11
- package/dist/docs/{components → product/components}/autocomplete.md +10 -9
- package/dist/docs/{components → product/components}/avatar.md +8 -8
- package/dist/docs/{components → product/components}/badge.md +9 -9
- package/dist/docs/{components → product/components}/badged-logo.md +6 -6
- package/dist/docs/{components → product/components}/banner.md +8 -8
- package/dist/docs/{components → product/components}/bar-chart.md +7 -7
- package/dist/docs/{components → product/components}/breadcrumbs.md +8 -8
- package/dist/docs/{components → product/components}/button-group.md +8 -8
- package/dist/docs/{components → product/components}/button.md +17 -17
- package/dist/docs/{components → product/components}/calendar.md +8 -8
- package/dist/docs/{components → product/components}/callout.md +5 -5
- package/dist/docs/{components → product/components}/checkbox-group.md +13 -13
- package/dist/docs/{components → product/components}/checkbox.md +12 -12
- package/dist/docs/{components → product/components}/choice-group.md +14 -14
- package/dist/docs/{components → product/components}/choicebox.md +9 -9
- package/dist/docs/{components → product/components}/code.md +5 -5
- package/dist/docs/{components → product/components}/combobox.md +9 -9
- package/dist/docs/{components → product/components}/container.md +7 -7
- package/dist/docs/{components → product/components}/copy-button.md +13 -13
- package/dist/docs/{components → product/components}/date-picker.md +11 -11
- package/dist/docs/{components → product/components}/dialog.md +17 -17
- package/dist/docs/{components → product/components}/drawer.md +11 -11
- package/dist/docs/{components → product/components}/empty.md +9 -9
- package/dist/docs/{components → product/components}/field.md +14 -14
- package/dist/docs/{components → product/components}/fieldset.md +6 -6
- package/dist/docs/{components → product/components}/frame.md +9 -9
- package/dist/docs/{components → product/components}/gauge.md +7 -7
- package/dist/docs/{components → product/components}/get-started-visual.md +4 -4
- package/dist/docs/{components → product/components}/grid.md +7 -7
- package/dist/docs/{components → product/components}/hero-visual.md +4 -4
- package/dist/docs/{components → product/components}/hex.md +9 -9
- package/dist/docs/{components → product/components}/icon-tile.md +8 -8
- package/dist/docs/{components → product/components}/identicon.md +7 -7
- package/dist/docs/{components → product/components}/inline.md +7 -7
- package/dist/docs/{components → product/components}/inset.md +8 -8
- package/dist/docs/{components → product/components}/kbd.md +8 -8
- package/dist/docs/{components → product/components}/list-group.md +24 -24
- package/dist/docs/{components → product/components}/loading-dots.md +8 -8
- package/dist/docs/{components → product/components}/menu.md +14 -14
- package/dist/docs/{components → product/components}/native-select.md +7 -7
- package/dist/docs/{components → product/components}/network-logo.md +7 -7
- package/dist/docs/{components → product/components}/number-field.md +8 -8
- package/dist/docs/{components → product/components}/otp-field.md +9 -9
- package/dist/docs/{components → product/components}/pagination.md +8 -8
- package/dist/docs/{components → product/components}/popover.md +11 -11
- package/dist/docs/{components → product/components}/progress.md +10 -10
- package/dist/docs/{components → product/components}/qr.md +8 -8
- package/dist/docs/{components → product/components}/radio-group.md +10 -10
- package/dist/docs/{components → product/components}/secret-value.md +8 -8
- package/dist/docs/{components → product/components}/select.md +13 -13
- package/dist/docs/{components → product/components}/separator.md +7 -7
- package/dist/docs/{components → product/components}/sidebar-menu.md +11 -11
- package/dist/docs/{components → product/components}/skeleton.md +9 -9
- package/dist/docs/{components → product/components}/slider.md +8 -8
- package/dist/docs/{components → product/components}/snippet.md +10 -10
- package/dist/docs/{components → product/components}/spinner.md +12 -12
- package/dist/docs/{components → product/components}/split-bar.md +5 -5
- package/dist/docs/{components → product/components}/split-button.md +11 -11
- package/dist/docs/{components → product/components}/stack.md +8 -8
- package/dist/docs/{components → product/components}/status-chip.md +7 -7
- package/dist/docs/{components → product/components}/status-indicator.md +6 -6
- package/dist/docs/{components → product/components}/status-row.md +7 -7
- package/dist/docs/{components → product/components}/stepper.md +9 -9
- package/dist/docs/{components → product/components}/success-hero.md +5 -5
- package/dist/docs/{components → product/components}/surface.md +11 -11
- package/dist/docs/{components → product/components}/switch.md +11 -11
- package/dist/docs/{components → product/components}/table.md +16 -16
- package/dist/docs/{components → product/components}/tabs.md +11 -11
- package/dist/docs/{components → product/components}/tempo-logo.md +4 -4
- package/dist/docs/{components → product/components}/text-input.md +14 -14
- package/dist/docs/{components → product/components}/textarea.md +7 -7
- package/dist/docs/{components → product/components}/toast.md +11 -11
- package/dist/docs/{components → product/components}/token-logo.md +16 -16
- package/dist/docs/{components → product/components}/token.md +10 -10
- package/dist/docs/{components → product/components}/tooltip.md +11 -11
- package/dist/docs/{components → product/components}/verification-code.md +4 -4
- package/dist/docs/{components → product/components}/visual.md +5 -5
- package/dist/docs/product/components.md +203 -0
- package/dist/docs/{foundations → product/foundations}/accessibility.md +16 -16
- package/dist/docs/{foundations → product/foundations}/agents.md +17 -17
- package/dist/docs/{foundations → product/foundations}/color.md +7 -7
- package/dist/docs/{foundations → product/foundations}/content/tone.md +7 -7
- package/dist/docs/{foundations → product/foundations}/content/voice.md +2 -2
- package/dist/docs/{foundations → product/foundations}/content/writing-style.md +8 -8
- package/dist/docs/{foundations → product/foundations}/iconography.md +11 -11
- package/dist/docs/{foundations → product/foundations}/intent.md +28 -28
- package/dist/docs/{foundations → product/foundations}/layout.md +22 -22
- package/dist/docs/product/foundations/linter.md +496 -0
- package/dist/docs/{foundations → product/foundations}/motion.md +7 -7
- package/dist/docs/{foundations → product/foundations}/radius-and-padding.md +3 -3
- package/dist/docs/{foundations → product/foundations}/typography.md +4 -4
- package/dist/docs/{introduction → product/introduction}/faq.md +22 -21
- package/dist/docs/{introduction → product/introduction}/getting-started.md +4 -4
- package/dist/docs/{patterns → product/patterns}/blockchain-values.md +20 -20
- package/dist/docs/{patterns → product/patterns}/dashboards.md +28 -28
- package/dist/docs/{patterns → product/patterns}/destructive-actions.md +16 -16
- package/dist/docs/{patterns → product/patterns}/empty-states.md +14 -14
- package/dist/docs/{patterns → product/patterns}/errors-and-validation.md +23 -23
- package/dist/docs/{patterns → product/patterns}/feedback-and-status.md +31 -31
- package/dist/docs/{patterns → product/patterns}/forms.md +24 -24
- package/dist/docs/{patterns → product/patterns}/loading.md +19 -19
- package/dist/docs/{patterns → product/patterns}/navigation.md +23 -23
- package/dist/docs/{patterns → product/patterns}/payments.md +20 -20
- package/dist/docs/{patterns → product/patterns}/responsive-layout.md +23 -23
- package/dist/docs/{patterns → product/patterns}/tables-and-lists.md +19 -19
- package/dist/docs/{products → product/products}/tempo-console.md +12 -12
- package/dist/docs/{products → product/products}/tempo-performance.md +11 -11
- package/dist/docs/{products → product/products}/tempo-wallet.md +12 -12
- package/dist/marketing/index.d.ts +4 -0
- package/dist/marketing/index.d.ts.map +1 -0
- package/dist/marketing/index.js +4 -0
- package/dist/marketing/index.js.map +1 -0
- package/dist/marketing/index.js.zyzz.json +1 -0
- package/dist/marketing/vars.d.ts +907 -0
- package/dist/marketing/vars.d.ts.map +1 -0
- package/dist/marketing/vars.js +15 -0
- package/dist/marketing/vars.js.map +1 -0
- package/dist/marketing/vars.js.zyzz.json +1 -0
- package/dist/marketing/zyzz.config.d.ts +4512 -0
- package/dist/marketing/zyzz.config.d.ts.map +1 -0
- package/dist/marketing/zyzz.config.js +63 -0
- package/dist/marketing/zyzz.config.js.map +1 -0
- package/dist/marketing/zyzz.config.js.zyzz.json +1 -0
- package/dist/oxlint/index.d.ts +12 -1
- package/dist/oxlint/index.d.ts.map +1 -1
- package/dist/oxlint/index.js +39 -1
- package/dist/oxlint/index.js.map +1 -1
- package/dist/oxlint/internal/Docs.d.ts +9 -0
- package/dist/oxlint/internal/Docs.d.ts.map +1 -0
- package/dist/oxlint/internal/Docs.js +15 -0
- package/dist/oxlint/internal/Docs.js.map +1 -0
- package/dist/oxlint/internal/Imports.d.ts +1 -1
- package/dist/oxlint/internal/Imports.d.ts.map +1 -1
- package/dist/oxlint/internal/Imports.js +2 -0
- package/dist/oxlint/internal/Imports.js.map +1 -1
- package/dist/oxlint/internal/Styles.d.ts +40 -0
- package/dist/oxlint/internal/Styles.d.ts.map +1 -0
- package/dist/oxlint/internal/Styles.js +194 -0
- package/dist/oxlint/internal/Styles.js.map +1 -0
- package/dist/oxlint/internal/Tokens.d.ts +16 -0
- package/dist/oxlint/internal/Tokens.d.ts.map +1 -0
- package/dist/oxlint/internal/Tokens.js +39 -0
- package/dist/oxlint/internal/Tokens.js.map +1 -0
- package/dist/oxlint/rules/NoCrossSurface.d.ts +2 -2
- package/dist/oxlint/rules/NoCrossSurface.js +3 -3
- package/dist/oxlint/rules/NoCrossSurface.js.map +1 -1
- package/dist/oxlint/rules/NoCustomValues.d.ts +11 -0
- package/dist/oxlint/rules/NoCustomValues.d.ts.map +1 -0
- package/dist/oxlint/rules/NoCustomValues.js +150 -0
- package/dist/oxlint/rules/NoCustomValues.js.map +1 -0
- package/dist/oxlint/rules/NoSingleKeyShortcuts.d.ts +11 -0
- package/dist/oxlint/rules/NoSingleKeyShortcuts.d.ts.map +1 -0
- package/dist/oxlint/rules/NoSingleKeyShortcuts.js +158 -0
- package/dist/oxlint/rules/NoSingleKeyShortcuts.js.map +1 -0
- package/dist/oxlint/rules/PreferComponent.d.ts +3 -2
- package/dist/oxlint/rules/PreferComponent.d.ts.map +1 -1
- package/dist/oxlint/rules/PreferComponent.js +11 -4
- package/dist/oxlint/rules/PreferComponent.js.map +1 -1
- package/dist/oxlint/rules/PreferLayout.d.ts +9 -0
- package/dist/oxlint/rules/PreferLayout.d.ts.map +1 -0
- package/dist/oxlint/rules/PreferLayout.js +90 -0
- package/dist/oxlint/rules/PreferLayout.js.map +1 -0
- package/dist/oxlint/rules/PreferProgress.d.ts +9 -0
- package/dist/oxlint/rules/PreferProgress.d.ts.map +1 -0
- package/dist/oxlint/rules/PreferProgress.js +43 -0
- package/dist/oxlint/rules/PreferProgress.js.map +1 -0
- package/dist/oxlint/rules/PreferSurface.d.ts +9 -0
- package/dist/oxlint/rules/PreferSurface.d.ts.map +1 -0
- package/dist/oxlint/rules/PreferSurface.js +55 -0
- package/dist/oxlint/rules/PreferSurface.js.map +1 -0
- package/dist/oxlint/rules/RequireAccessibleName.d.ts.map +1 -1
- package/dist/oxlint/rules/RequireAccessibleName.js +3 -1
- package/dist/oxlint/rules/RequireAccessibleName.js.map +1 -1
- package/dist/oxlint/rules/RequireScrollRegion.d.ts +11 -0
- package/dist/oxlint/rules/RequireScrollRegion.d.ts.map +1 -0
- package/dist/oxlint/rules/RequireScrollRegion.js +71 -0
- package/dist/oxlint/rules/RequireScrollRegion.js.map +1 -0
- package/dist/web/icons/index.js.zyzz.json +1 -0
- package/package.json +6 -1
- package/src/marketing/README.md +21 -0
- package/src/marketing/index.ts +3 -0
- package/src/marketing/vars.ts +751 -0
- package/src/marketing/zyzz.config.ts +376 -0
- package/src/oxlint/index.ts +40 -1
- package/src/oxlint/internal/Docs.ts +18 -0
- package/src/oxlint/internal/Imports.ts +2 -1
- package/src/oxlint/internal/Styles.ts +240 -0
- package/src/oxlint/internal/Tokens.ts +43 -0
- package/src/oxlint/rules/NoCrossSurface.ts +3 -3
- package/src/oxlint/rules/NoCustomValues.ts +170 -0
- package/src/oxlint/rules/NoSingleKeyShortcuts.ts +190 -0
- package/src/oxlint/rules/PreferComponent.ts +11 -4
- package/src/oxlint/rules/PreferLayout.ts +96 -0
- package/src/oxlint/rules/PreferProgress.ts +49 -0
- package/src/oxlint/rules/PreferSurface.ts +70 -0
- package/src/oxlint/rules/RequireAccessibleName.ts +3 -1
- package/src/oxlint/rules/RequireScrollRegion.ts +92 -0
- package/dist/docs/components.md +0 -203
- package/dist/docs/foundations/linter.md +0 -296
|
@@ -154,12 +154,12 @@ import { TokenLogo } from '@tempoxyz/ds'
|
|
|
154
154
|
|
|
155
155
|
### When Not to Use
|
|
156
156
|
|
|
157
|
-
* Use [Token](
|
|
158
|
-
* Use [Identicon](
|
|
159
|
-
* Use [Avatar](
|
|
160
|
-
* Use [IconTile](
|
|
161
|
-
* Use [NetworkLogo](
|
|
162
|
-
* Use [AssetChip](
|
|
157
|
+
* Use [Token](token.md) to show which token an amount is in, and to let a person change it.
|
|
158
|
+
* Use [Identicon](identicon.md) for an account address.
|
|
159
|
+
* Use [Avatar](avatar.md) for people and organizations.
|
|
160
|
+
* Use [IconTile](icon-tile.md) for a feature or category icon.
|
|
161
|
+
* Use [NetworkLogo](network-logo.md) for the chain a token lives on.
|
|
162
|
+
* Use [AssetChip](asset-chip.md) to list the assets a row supports.
|
|
163
163
|
|
|
164
164
|
### Pair the Icon With the Symbol
|
|
165
165
|
|
|
@@ -252,7 +252,7 @@ Pass `resolveSrc` or `resolveAddress` to `TokenLogo.Provider` to load icons or a
|
|
|
252
252
|
|
|
253
253
|
A gray circle renders while an icon loads or after it fails.
|
|
254
254
|
|
|
255
|
-
**Do:** Show the address in a [Hex](
|
|
255
|
+
**Do:** Show the address in a [Hex](hex.md) beside the symbol of a token that isn't on the
|
|
256
256
|
list.
|
|
257
257
|
|
|
258
258
|
```tsx
|
|
@@ -319,7 +319,7 @@ namespace styles {
|
|
|
319
319
|
### Match Size to the Context
|
|
320
320
|
|
|
321
321
|
* **Small (16px):** Inline beside an amount.
|
|
322
|
-
* **Medium (20px):** The default, and the logo in a [Token](
|
|
322
|
+
* **Medium (20px):** The default, and the logo in a [Token](token.md).
|
|
323
323
|
* **Large (32px):** In asset rows and token pickers.
|
|
324
324
|
|
|
325
325
|
## Accessibility
|
|
@@ -338,34 +338,34 @@ A token logo renders a native `<img>`, decorative by default. It is not interact
|
|
|
338
338
|
|
|
339
339
|
## Related
|
|
340
340
|
|
|
341
|
-
[Amount](
|
|
341
|
+
[Amount](amount.md)
|
|
342
342
|
|
|
343
343
|
Use for token amounts.
|
|
344
344
|
|
|
345
|
-
[Token](
|
|
345
|
+
[Token](token.md)
|
|
346
346
|
|
|
347
347
|
Use for a token pill that labels or picks a token.
|
|
348
348
|
|
|
349
|
-
[AssetChip](
|
|
349
|
+
[AssetChip](asset-chip.md)
|
|
350
350
|
|
|
351
351
|
Use for listing the assets a row supports.
|
|
352
352
|
|
|
353
|
-
[NetworkLogo](
|
|
353
|
+
[NetworkLogo](network-logo.md)
|
|
354
354
|
|
|
355
355
|
Use for the chain a token lives on.
|
|
356
356
|
|
|
357
|
-
[Identicon](
|
|
357
|
+
[Identicon](identicon.md)
|
|
358
358
|
|
|
359
359
|
Use for account addresses.
|
|
360
360
|
|
|
361
|
-
[Avatar](
|
|
361
|
+
[Avatar](avatar.md)
|
|
362
362
|
|
|
363
363
|
Use for people and organizations.
|
|
364
364
|
|
|
365
|
-
[Select](
|
|
365
|
+
[Select](select.md)
|
|
366
366
|
|
|
367
367
|
Use for token selectors.
|
|
368
368
|
|
|
369
|
-
[Blockchain Values](
|
|
369
|
+
[Blockchain Values](../patterns/blockchain-values.md)
|
|
370
370
|
|
|
371
371
|
Covers tokens and addresses.
|
|
@@ -8,7 +8,7 @@ Figma: [Elements/Token](https://www.figma.com/design/yE96kcymnNR88PJp6G1sPs?node
|
|
|
8
8
|
|
|
9
9
|
## Overview
|
|
10
10
|
|
|
11
|
-
A token renders a pill with a [TokenLogo](
|
|
11
|
+
A token renders a pill with a [TokenLogo](token-logo.md) and the token's symbol. By default it is a button with a chevron that opens a token picker. Set `readOnly` for a static pill.
|
|
12
12
|
|
|
13
13
|
## Examples
|
|
14
14
|
|
|
@@ -48,7 +48,7 @@ export function Demo() {
|
|
|
48
48
|
|
|
49
49
|
### Picker
|
|
50
50
|
|
|
51
|
-
Pass the token to a trigger's `render`, such as a [Dialog](
|
|
51
|
+
Pass the token to a trigger's `render`, such as a [Dialog](dialog.md) trigger, to open a token picker.
|
|
52
52
|
|
|
53
53
|
```tsx
|
|
54
54
|
import { Dialog, style, Token, TokenLogo } from '@tempoxyz/ds'
|
|
@@ -127,14 +127,14 @@ import { Token } from '@tempoxyz/ds'
|
|
|
127
127
|
|
|
128
128
|
### When to Use
|
|
129
129
|
|
|
130
|
-
* Name the token after the digits in an [AmountInput](
|
|
130
|
+
* Name the token after the digits in an [AmountInput](amount-input.md), and let a person change it.
|
|
131
131
|
* Name a fixed token in a review or a receipt with `readOnly`.
|
|
132
132
|
|
|
133
133
|
### When Not to Use
|
|
134
134
|
|
|
135
|
-
* Use [TokenLogo](
|
|
136
|
-
* Use [AssetChip](
|
|
137
|
-
* Use [Select](
|
|
135
|
+
* Use [TokenLogo](token-logo.md) for a logo beside a symbol in a list row.
|
|
136
|
+
* Use [AssetChip](asset-chip.md) to list the assets a row supports.
|
|
137
|
+
* Use [Select](select.md) to choose a token in a form field with a label.
|
|
138
138
|
|
|
139
139
|
### Show the Chevron Only on a Picker
|
|
140
140
|
|
|
@@ -230,18 +230,18 @@ A token renders a native `<button>` built on Base UI Button, or a `<span>` when
|
|
|
230
230
|
|
|
231
231
|
## Related
|
|
232
232
|
|
|
233
|
-
[TokenLogo](
|
|
233
|
+
[TokenLogo](token-logo.md)
|
|
234
234
|
|
|
235
235
|
Use for token logos.
|
|
236
236
|
|
|
237
|
-
[AmountInput](
|
|
237
|
+
[AmountInput](amount-input.md)
|
|
238
238
|
|
|
239
239
|
Use for entering an amount beside a token.
|
|
240
240
|
|
|
241
|
-
[AssetChip](
|
|
241
|
+
[AssetChip](asset-chip.md)
|
|
242
242
|
|
|
243
243
|
Use for listing the assets a row supports.
|
|
244
244
|
|
|
245
|
-
[Dialog](
|
|
245
|
+
[Dialog](dialog.md)
|
|
246
246
|
|
|
247
247
|
Use for a token picker.
|
|
@@ -107,11 +107,11 @@ import { Tooltip } from '@tempoxyz/ds'
|
|
|
107
107
|
|
|
108
108
|
### When Not to Use
|
|
109
109
|
|
|
110
|
-
* Use a [Popover](
|
|
111
|
-
* Use visible text, such as a `Field.Description` from [Field](
|
|
112
|
-
* Use an [Alert](
|
|
113
|
-
* Write the reason for a disabled [Button](
|
|
114
|
-
* Don't add a tooltip to a [Button](
|
|
110
|
+
* Use a [Popover](popover.md) with `openOnHover` on `Popover.Trigger` for info icons, such as the explanation beside a dashboard metric.
|
|
111
|
+
* Use visible text, such as a `Field.Description` from [Field](field.md), for fees, limits, requirements, and errors.
|
|
112
|
+
* Use an [Alert](alert.md) for warnings.
|
|
113
|
+
* Write the reason for a disabled [Button](button.md) in nearby text, not in a tooltip.
|
|
114
|
+
* Don't add a tooltip to a [Button](button.md) with a visible label. It repeats the label and covers nearby content.
|
|
115
115
|
|
|
116
116
|
### Use Tooltips as Labels Only
|
|
117
117
|
|
|
@@ -160,7 +160,7 @@ namespace styles {
|
|
|
160
160
|
```
|
|
161
161
|
|
|
162
162
|
**Don't:** Put links, buttons, or other controls in a tooltip. Use a
|
|
163
|
-
[Popover](
|
|
163
|
+
[Popover](popover.md).
|
|
164
164
|
|
|
165
165
|
```tsx
|
|
166
166
|
/**
|
|
@@ -469,22 +469,22 @@ A tooltip is visual only, so the trigger needs its own accessible name.
|
|
|
469
469
|
|
|
470
470
|
## Related
|
|
471
471
|
|
|
472
|
-
[Popover](
|
|
472
|
+
[Popover](popover.md)
|
|
473
473
|
|
|
474
474
|
Use for info icons and interactive content.
|
|
475
475
|
|
|
476
|
-
[Button](
|
|
476
|
+
[Button](button.md)
|
|
477
477
|
|
|
478
478
|
Use for icon-only buttons.
|
|
479
479
|
|
|
480
|
-
[CopyButton](
|
|
480
|
+
[CopyButton](copy-button.md)
|
|
481
481
|
|
|
482
482
|
Use for a copy action that names itself.
|
|
483
483
|
|
|
484
|
-
[Field](
|
|
484
|
+
[Field](field.md)
|
|
485
485
|
|
|
486
486
|
Use for descriptions that stay visible.
|
|
487
487
|
|
|
488
|
-
[Dashboards](
|
|
488
|
+
[Dashboards](../patterns/dashboards.md)
|
|
489
489
|
|
|
490
490
|
Covers metric explanations.
|
|
@@ -51,8 +51,8 @@ import { VerificationCode } from '@tempoxyz/ds'
|
|
|
51
51
|
|
|
52
52
|
### When Not to Use
|
|
53
53
|
|
|
54
|
-
* Use [OtpField](
|
|
55
|
-
* Use [Snippet](
|
|
54
|
+
* Use [OtpField](otp-field.md) when the person types a code.
|
|
55
|
+
* Use [Snippet](snippet.md) for a command or a value to copy.
|
|
56
56
|
|
|
57
57
|
### Match the Other Device
|
|
58
58
|
|
|
@@ -107,10 +107,10 @@ A verification code renders a `<div>` with the label in a `<p>` and the code in
|
|
|
107
107
|
|
|
108
108
|
## Related
|
|
109
109
|
|
|
110
|
-
[OtpField](
|
|
110
|
+
[OtpField](otp-field.md)
|
|
111
111
|
|
|
112
112
|
Use for a code that a person types.
|
|
113
113
|
|
|
114
|
-
[Snippet](
|
|
114
|
+
[Snippet](snippet.md)
|
|
115
115
|
|
|
116
116
|
Use for a command or a value to copy.
|
|
@@ -78,8 +78,8 @@ import { Visual } from '@tempoxyz/ds'
|
|
|
78
78
|
|
|
79
79
|
### When Not to Use
|
|
80
80
|
|
|
81
|
-
* Use [IconTile](
|
|
82
|
-
* Use a [Dialog](
|
|
81
|
+
* Use [IconTile](icon-tile.md) for acknowledgment, success, and destructive confirmation modals.
|
|
82
|
+
* Use a [Dialog](dialog.md) without a visual for form and review modals.
|
|
83
83
|
|
|
84
84
|
### Use One Visual Above the Title
|
|
85
85
|
|
|
@@ -125,7 +125,7 @@ namespace styles {
|
|
|
125
125
|
}
|
|
126
126
|
```
|
|
127
127
|
|
|
128
|
-
**Don't:** Stack a visual and an [IconTile](
|
|
128
|
+
**Don't:** Stack a visual and an [IconTile](icon-tile.md).
|
|
129
129
|
|
|
130
130
|
```tsx
|
|
131
131
|
/**
|
|
@@ -240,10 +240,10 @@ A visual renders a `<div>` with no role and takes no focus. Screen readers skip
|
|
|
240
240
|
|
|
241
241
|
## Related
|
|
242
242
|
|
|
243
|
-
[IconTile](
|
|
243
|
+
[IconTile](icon-tile.md)
|
|
244
244
|
|
|
245
245
|
Use for icons at the top of other centered modals.
|
|
246
246
|
|
|
247
|
-
[Dialog](
|
|
247
|
+
[Dialog](dialog.md)
|
|
248
248
|
|
|
249
249
|
Use for the modal that holds the visual.
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
# Overview
|
|
2
|
+
|
|
3
|
+
Components for building Tempo products, grouped by the job each one does.
|
|
4
|
+
|
|
5
|
+
## Principles
|
|
6
|
+
|
|
7
|
+
* **Native First:** Components render native elements such as `<button>`, `<input>`, and `<table>`, and accept their attributes, refs, classes, and styles.
|
|
8
|
+
* **Accessible Behavior:** Components that coordinate focus, keyboard, or popups build on Base UI primitives, which supply keyboard support and ARIA wiring.
|
|
9
|
+
* **Composable Parts:** Larger components split into named parts, such as `Dialog.Root` and `Dialog.Title`, so you control the markup between them.
|
|
10
|
+
* **Shared Tokens:** Every component reads Tempo variables for color, spacing, type, and motion. A variable scope on a wrapper restyles everything inside it.
|
|
11
|
+
|
|
12
|
+
## Actions
|
|
13
|
+
|
|
14
|
+
Controls that start an action or copy a value.
|
|
15
|
+
|
|
16
|
+
- [Button](components/button.md): Triggers an action, such as submitting a form or sending a payment.
|
|
17
|
+
- [ButtonGroup](components/button-group.md): Lays out the actions at the foot of a dialog or focused flow.
|
|
18
|
+
- [CopyButton](components/copy-button.md): Copies a value to the clipboard and confirms the copy.
|
|
19
|
+
- [SplitButton](components/split-button.md): Pairs a primary action with a menu of alternatives.
|
|
20
|
+
|
|
21
|
+
## Forms and Inputs
|
|
22
|
+
|
|
23
|
+
Controls that collect values, and the parts that label and group them. Wrap each control in a [Field](components/field.md) to link its label, description, and error.
|
|
24
|
+
|
|
25
|
+
- [AmountInput](components/amount-input.md): Accepts a decimal amount, such as a payment or transfer value.
|
|
26
|
+
- [Autocomplete](components/autocomplete.md): A text input that suggests values while people type.
|
|
27
|
+
- [Calendar](components/calendar.md): A month grid for picking one date or a date range.
|
|
28
|
+
- [Checkbox](components/checkbox.md): Turns a single independent option on or off.
|
|
29
|
+
- [CheckboxGroup](components/checkbox-group.md): Shares one value array across a group of checkboxes.
|
|
30
|
+
- [Choicebox](components/choicebox.md): A selectable tile with an optional icon, title, and description.
|
|
31
|
+
- [ChoiceGroup](components/choice-group.md): A segmented control for a few mutually exclusive options.
|
|
32
|
+
- [Combobox](components/combobox.md): A text input that filters a list of fixed options while people type.
|
|
33
|
+
- [DatePicker](components/date-picker.md): Shows the selected date and opens a calendar in a popup.
|
|
34
|
+
- [Field](components/field.md): Links a label, description, and error message to a control.
|
|
35
|
+
- [Fieldset](components/fieldset.md): Groups related fields under a shared legend.
|
|
36
|
+
- [NativeSelect](components/native-select.md): A native select styled as a field, which opens the browser's own picker.
|
|
37
|
+
- [NumberField](components/number-field.md): A numeric input with increment and decrement buttons.
|
|
38
|
+
- [OtpField](components/otp-field.md): Accepts a one-time passcode, one character per slot.
|
|
39
|
+
- [RadioGroup](components/radio-group.md): Lets you pick a single option from a short list.
|
|
40
|
+
- [Select](components/select.md): Opens a list of options for choosing one value.
|
|
41
|
+
- [Slider](components/slider.md): Picks a single value or a range by dragging.
|
|
42
|
+
- [Switch](components/switch.md): Toggles a setting that applies immediately.
|
|
43
|
+
- [Textarea](components/textarea.md): A multi-line text field.
|
|
44
|
+
- [TextInput](components/text-input.md): A text field with optional prefix, suffix, and clear button.
|
|
45
|
+
|
|
46
|
+
## Feedback and Status
|
|
47
|
+
|
|
48
|
+
Components that report progress, results, and system state.
|
|
49
|
+
|
|
50
|
+
- [Alert](components/alert.md): Shows an inline message tied to nearby content.
|
|
51
|
+
- [Banner](components/banner.md): Shows a full-width message about the system or page.
|
|
52
|
+
- [Callout](components/callout.md): Sets a short passage of body text apart in a subtle box.
|
|
53
|
+
- [Empty](components/empty.md): Fills a region that has nothing to show yet.
|
|
54
|
+
- [Gauge](components/gauge.md): Shows a measurement within a range as a ring.
|
|
55
|
+
- [LoadingDots](components/loading-dots.md): Shows three pulsing dots for inline loading.
|
|
56
|
+
- [Progress](components/progress.md): Shows how far a task has advanced.
|
|
57
|
+
- [Skeleton](components/skeleton.md): Holds the place of content while it loads.
|
|
58
|
+
- [Spinner](components/spinner.md): Shows that something is loading.
|
|
59
|
+
- [StatusChip](components/status-chip.md): Names the status of a payment, an authorization, or a network.
|
|
60
|
+
- [StatusIndicator](components/status-indicator.md): Names the status of a system or a service with a dot and a label.
|
|
61
|
+
- [StatusRow](components/status-row.md): Follows the status of one payment or task while it runs.
|
|
62
|
+
- [Toast](components/toast.md): Shows a brief notification that dismisses itself.
|
|
63
|
+
|
|
64
|
+
## Overlays
|
|
65
|
+
|
|
66
|
+
Popups that open above the page from a trigger.
|
|
67
|
+
|
|
68
|
+
- [AlertDialog](components/alert-dialog.md): Asks you to confirm a critical action before it happens.
|
|
69
|
+
- [Dialog](components/dialog.md): Opens a modal popup over the page.
|
|
70
|
+
- [Drawer](components/drawer.md): Slides a modal panel in from an edge of the viewport.
|
|
71
|
+
- [Menu](components/menu.md): Opens a list of actions from a button.
|
|
72
|
+
- [Popover](components/popover.md): Opens a non-modal popup anchored to a trigger.
|
|
73
|
+
- [Tooltip](components/tooltip.md): Shows a short label for a control on hover or focus.
|
|
74
|
+
|
|
75
|
+
## Navigation
|
|
76
|
+
|
|
77
|
+
Components that move between pages, views, and steps.
|
|
78
|
+
|
|
79
|
+
- [Breadcrumbs](components/breadcrumbs.md): Shows where the current page sits in the site hierarchy.
|
|
80
|
+
- [Pagination](components/pagination.md): Moves between pages of a long list.
|
|
81
|
+
- [SidebarMenu](components/sidebar-menu.md): Vertical navigation for sidebars and drawers.
|
|
82
|
+
- [Stepper](components/stepper.md): Shows progress through a fixed sequence of steps.
|
|
83
|
+
- [Tabs](components/tabs.md): Switches between related views.
|
|
84
|
+
|
|
85
|
+
## Layout
|
|
86
|
+
|
|
87
|
+
Primitives that size, space, and arrange content. They carry no meaning, so pair them with semantic elements where structure matters.
|
|
88
|
+
|
|
89
|
+
- [AppShell](components/app-shell.md): Places a sticky sidebar beside the main content column.
|
|
90
|
+
- [Container](components/container.md): Centers content at a maximum width.
|
|
91
|
+
- [Frame](components/frame.md): Lays out a header, body, and footer in a column.
|
|
92
|
+
- [Grid](components/grid.md): Lays out children on a responsive grid.
|
|
93
|
+
- [Inline](components/inline.md): Lays out children in a horizontal row.
|
|
94
|
+
- [Inset](components/inset.md): Pads content with spacing tokens.
|
|
95
|
+
- [Separator](components/separator.md): Draws a rule between groups of content.
|
|
96
|
+
- [Stack](components/stack.md): Lays out children in a vertical column.
|
|
97
|
+
- [Surface](components/surface.md): A card container for grouping related content.
|
|
98
|
+
|
|
99
|
+
## Data Display
|
|
100
|
+
|
|
101
|
+
Components that present content and records.
|
|
102
|
+
|
|
103
|
+
- [Accordion](components/accordion.md): Stacks collapsible sections that each reveal a labelled panel.
|
|
104
|
+
- [AgentLogo](components/agent-logo.md): Shows the logo of an AI agent that works with a wallet.
|
|
105
|
+
- [Avatar](components/avatar.md): Represents a person, contact, or wallet with an image, initials, or an icon.
|
|
106
|
+
- [Badge](components/badge.md): Labels a status or category in a compact chip.
|
|
107
|
+
- [BarChart](components/bar-chart.md): Shows values over time as stacked bars, such as the daily spend of each agent.
|
|
108
|
+
- [Code](components/code.md): Sets a command, identifier, or value apart inside a sentence.
|
|
109
|
+
- [GetStartedVisual](components/get-started-visual.md): Illustrates one step of a get started flow at the top of its card.
|
|
110
|
+
- [HeroVisual](components/hero-visual.md): Shows animated streaks and a title beside the steps of a setup flow.
|
|
111
|
+
- [IconTile](components/icon-tile.md): Anchors a centered modal with one icon in a rounded square.
|
|
112
|
+
- [Kbd](components/kbd.md): Shows a keyboard key or shortcut.
|
|
113
|
+
- [ListGroup](components/list-group.md): Stacks rows for details, pickers, checklists, and settings.
|
|
114
|
+
- [Snippet](components/snippet.md): Shows a command or value with a copy button.
|
|
115
|
+
- [SplitBar](components/split-bar.md): Splits one total between two parts, with a legend under the bar.
|
|
116
|
+
- [SuccessHero](components/success-hero.md): Confirms that a setup flow finished, on a dark card of animated streaks.
|
|
117
|
+
- [Table](components/table.md): Displays tabular data in rows and columns.
|
|
118
|
+
- [TempoLogo](components/tempo-logo.md): Shows the Tempo brand logo.
|
|
119
|
+
- [VerificationCode](components/verification-code.md): Shows a code that a person compares with the one another app shows.
|
|
120
|
+
- [Visual](components/visual.md): Illustrates the top of an onboarding or feature modal.
|
|
121
|
+
|
|
122
|
+
## Blockchain
|
|
123
|
+
|
|
124
|
+
Components for onchain values such as addresses, amounts, and tokens.
|
|
125
|
+
|
|
126
|
+
- [AddressCard](components/address-card.md): Shows a wallet address to receive funds, with its QR code and networks.
|
|
127
|
+
- [Amount](components/amount.md): Formats a number as money or a token amount.
|
|
128
|
+
- [AssetChip](components/asset-chip.md): Labels a supported asset or network in a small chip, which can also pick one.
|
|
129
|
+
- [BadgedLogo](components/badged-logo.md): Marks a token or an app with a small badge on the corner of its logo.
|
|
130
|
+
- [Hex](components/hex.md): Shows a hex string, such as an address, truncated to fit.
|
|
131
|
+
- [Identicon](components/identicon.md): Shows a unique gradient avatar derived from an address.
|
|
132
|
+
- [NetworkLogo](components/network-logo.md): Shows the logo of the network a token lives on.
|
|
133
|
+
- [Qr](components/qr.md): Renders a value as a QR code.
|
|
134
|
+
- [SecretValue](components/secret-value.md): Masks a secret and adds reveal and copy buttons.
|
|
135
|
+
- [Token](components/token.md): Shows which token an amount is in, and opens a picker to change it.
|
|
136
|
+
- [TokenLogo](components/token-logo.md): Shows a token logo by contract address or symbol.
|
|
137
|
+
|
|
138
|
+
## Choosing a Component
|
|
139
|
+
|
|
140
|
+
### Choosing One Option
|
|
141
|
+
|
|
142
|
+
* **[RadioGroup](components/radio-group.md):** Two to five options, all visible at once.
|
|
143
|
+
* **[ChoiceGroup](components/choice-group.md):** Two to four short options that switch a view or mode.
|
|
144
|
+
* **[Choicebox](components/choicebox.md):** A few options that each need an icon or description.
|
|
145
|
+
* **[Select](components/select.md):** Many options, or limited space.
|
|
146
|
+
* **[Combobox](components/combobox.md):** A long list to filter by typing.
|
|
147
|
+
* **[Autocomplete](components/autocomplete.md):** Free text with suggested values.
|
|
148
|
+
|
|
149
|
+
### On and Off
|
|
150
|
+
|
|
151
|
+
* **[Switch](components/switch.md):** A setting that applies the moment you flip it.
|
|
152
|
+
* **[Checkbox](components/checkbox.md):** A choice that applies on form submit, or agreement to terms.
|
|
153
|
+
|
|
154
|
+
### Messages
|
|
155
|
+
|
|
156
|
+
* **[Banner](components/banner.md):** A message about the whole product or page, such as an outage.
|
|
157
|
+
* **[Alert](components/alert.md):** A message about a specific section or field.
|
|
158
|
+
* **[Toast](components/toast.md):** Confirms that an action finished.
|
|
159
|
+
* **[AlertDialog](components/alert-dialog.md):** An action that needs a decision before it continues.
|
|
160
|
+
|
|
161
|
+
### Loading
|
|
162
|
+
|
|
163
|
+
* **[Skeleton](components/skeleton.md):** Content with a known shape.
|
|
164
|
+
* **[Progress](components/progress.md):** A task with a measurable amount of work.
|
|
165
|
+
* **[Spinner](components/spinner.md):** A region or control that is busy for an unknown time.
|
|
166
|
+
* **[LoadingDots](components/loading-dots.md):** A short wait inside a line of text.
|
|
167
|
+
|
|
168
|
+
### Popups
|
|
169
|
+
|
|
170
|
+
* **[Dialog](components/dialog.md):** A focused task that blocks the page.
|
|
171
|
+
* **[Drawer](components/drawer.md):** A long form or details panel that keeps page context visible.
|
|
172
|
+
* **[Menu](components/menu.md):** A list of actions.
|
|
173
|
+
* **[Popover](components/popover.md):** Interactive content anchored to a trigger, without a block on the page.
|
|
174
|
+
* **[Tooltip](components/tooltip.md):** A label for an icon button.
|
|
175
|
+
|
|
176
|
+
### Showing a Status
|
|
177
|
+
|
|
178
|
+
* **[Table](components/table.md) cell `status`:** A status in a table row, as a colored word such as Failed.
|
|
179
|
+
* **[StatusChip](components/status-chip.md):** The status of a payment, an authorization, or a network, at the end of a row or beside a title.
|
|
180
|
+
* **[StatusIndicator](components/status-indicator.md):** The live state of a system, a service, or a connection, such as Degraded.
|
|
181
|
+
* **[StatusRow](components/status-row.md):** One running task that a person follows until it finishes.
|
|
182
|
+
* **[Badge](components/badge.md):** A category or an attribute, such as Testnet or Nightly.
|
|
183
|
+
|
|
184
|
+
### Lists of Records
|
|
185
|
+
|
|
186
|
+
* **[Table](components/table.md):** Many records with the same fields, such as payouts or team members, to compare by column.
|
|
187
|
+
* **[ListGroup](components/list-group.md):** The fields of one record, a short list to pick from or open, or table rows below 640px.
|
|
188
|
+
* **[Surface](components/surface.md) in a [Grid](components/grid.md):** A few similar items that each stand alone, such as metric tiles. Don't make a card per record.
|
|
189
|
+
|
|
190
|
+
### Identifiers
|
|
191
|
+
|
|
192
|
+
* **[Hex](components/hex.md):** An address or a hash in a row, a card, or a details view. It truncates in the middle to fit its container, down to the prefix and one character on each side, and overflows a narrower one.
|
|
193
|
+
* **[Table](components/table.md) cell `mono`:** An address or a hash in a table column, shortened with `formatHex` to `0x4f2a…91c3`. Link the row to a details view with a Hex.
|
|
194
|
+
* **[Snippet](components/snippet.md):** A URL, a command, or another value that isn't hex.
|
|
195
|
+
* **[SecretValue](components/secret-value.md):** A private key or another secret, hidden until a reveal.
|
|
196
|
+
|
|
197
|
+
Set `copy` on a Hex wherever people need the full value. [Building From Intent](foundations/intent.md) shows how to choose by the job of the content.
|
|
198
|
+
|
|
199
|
+
### Copying Values
|
|
200
|
+
|
|
201
|
+
* **[Snippet](components/snippet.md):** A command or value with its own copy button.
|
|
202
|
+
* **[CopyButton](components/copy-button.md):** Copy beside content that you lay out yourself.
|
|
203
|
+
* **[SecretValue](components/secret-value.md):** A value that stays hidden until a reveal.
|
|
@@ -10,7 +10,7 @@ Components render native elements, follow the [WAI-ARIA Authoring Practices](htt
|
|
|
10
10
|
|
|
11
11
|
## Color and Contrast
|
|
12
12
|
|
|
13
|
-
Every foreground and background pair meets these ratios in both schemes, and [Color](
|
|
13
|
+
Every foreground and background pair meets these ratios in both schemes, and [Color](color.md#contrast) lists the pairs that pass.
|
|
14
14
|
|
|
15
15
|
* **Body Text (4.5:1):** For readable text, such as `content.primary` or `content.secondary` ([SC 1.4.3](https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum.html)).
|
|
16
16
|
* **Large Text (3:1):** For large text, at least 24px in regular weight or 18.66px in bold.
|
|
@@ -19,7 +19,7 @@ Every foreground and background pair meets these ratios in both schemes, and [Co
|
|
|
19
19
|
|
|
20
20
|
### Never Use Color Alone
|
|
21
21
|
|
|
22
|
-
Pair color with text, an icon, or a shape ([SC 1.4.1](https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html)), as [Color](
|
|
22
|
+
Pair color with text, an icon, or a shape ([SC 1.4.1](https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html)), as [Color](color.md#never-use-color-alone) shows.
|
|
23
23
|
|
|
24
24
|
* **Statuses:** Pair each status color with an icon and a label.
|
|
25
25
|
* **Errors:** Pair the invalid fill with an error message.
|
|
@@ -53,7 +53,7 @@ Components use the keys the Authoring Practices define for each widget.
|
|
|
53
53
|
|
|
54
54
|
* **Reserved Keys:** Don't take over keys that browsers or assistive technology use.
|
|
55
55
|
* **Single-Key Shortcuts:** Let the reader turn off or remap them, or limit them to a focused control ([SC 2.1.4](https://www.w3.org/WAI/WCAG22/Understanding/character-key-shortcuts.html)).
|
|
56
|
-
* **Show Shortcuts (Kbd):** Show them with [Kbd](
|
|
56
|
+
* **Show Shortcuts (Kbd):** Show them with [Kbd](../components/kbd.md), which reads modifiers by name, such as Command K.
|
|
57
57
|
|
|
58
58
|
### Visible Focus
|
|
59
59
|
|
|
@@ -116,13 +116,13 @@ Never let sticky bars, banners, or toasts fully hide a focused control ([SC 2.4.
|
|
|
116
116
|
|
|
117
117
|
### Overlays
|
|
118
118
|
|
|
119
|
-
Modal overlays, such as [Dialog](
|
|
119
|
+
Modal overlays, such as [Dialog](../components/dialog.md), [AlertDialog](../components/alert-dialog.md), and [Drawer](../components/drawer.md), manage focus from open to close. Anchored popups, such as [Popover](../components/popover.md), [Menu](../components/menu.md), and [Tooltip](../components/tooltip.md), follow their own rules.
|
|
120
120
|
|
|
121
121
|
* **On Open:** Focus moves into the overlay, so the reader starts inside it.
|
|
122
122
|
* **While Open (Tab and Shift+Tab):** Focus cycles within the overlay. The page behind is inert and locked. Escape closes it.
|
|
123
123
|
* **On Close:** Focus returns to the control that opened it, so the reader keeps their place.
|
|
124
124
|
* **Popover:** Moves focus inside without a trap, and the page behind stays interactive.
|
|
125
|
-
* **Menu:** Returns focus to the trigger on Escape or an outside press, as [Popover](
|
|
125
|
+
* **Menu:** Returns focus to the trigger on Escape or an outside press, as [Popover](../components/popover.md) does.
|
|
126
126
|
* **Tooltip:** Never moves focus. It opens on hover and keyboard focus, and Escape dismisses it.
|
|
127
127
|
* **Removed Trigger:** If the trigger is gone on close, such as a deleted row, move focus to a logical place.
|
|
128
128
|
|
|
@@ -150,10 +150,10 @@ Screen reader users navigate by headings and landmarks ([SC 1.3.1](https://www.w
|
|
|
150
150
|
|
|
151
151
|
* **Title and H1 (h1):** Use one main heading per page, and a unique title that names it ([SC 2.4.2](https://www.w3.org/WAI/WCAG22/Understanding/page-titled.html)).
|
|
152
152
|
* **Heading Levels:** Use headings in order, without skipping levels, and pick each level for the outline.
|
|
153
|
-
* **Landmarks (main):** [AppShell](
|
|
153
|
+
* **Landmarks (main):** [AppShell](../components/app-shell.md) and [SidebarMenu](../components/sidebar-menu.md) render them. Layout primitives take one through `render`.
|
|
154
154
|
* **Named Regions (aria-label):** Name tab lists and the sidebar, and give each landmark a distinct label.
|
|
155
155
|
* **Skip Link:** If the sidebar holds many links, add a skip link to the main content.
|
|
156
|
-
* **Lists and Tables (list):** Mark up lists as lists and tabular data as a [Table](
|
|
156
|
+
* **Lists and Tables (list):** Mark up lists as lists and tabular data as a [Table](../components/table.md), not as styled divs.
|
|
157
157
|
|
|
158
158
|
### Status Messages
|
|
159
159
|
|
|
@@ -228,10 +228,10 @@ namespace styles {
|
|
|
228
228
|
}
|
|
229
229
|
```
|
|
230
230
|
|
|
231
|
-
* **Linked Label (Field.Label):** [Field](
|
|
231
|
+
* **Linked Label (Field.Label):** [Field](../components/field.md) links the label to its control, which takes it as its name.
|
|
232
232
|
* **Hints and Errors (aria-describedby):** `Field.Description` and a shown `Field.Error` read after the control's name.
|
|
233
233
|
* **Required and Optional:** Mark required or optional fields in text, not by color or an asterisk alone.
|
|
234
|
-
* **Group Related Controls (legend):** Group radios in a [Fieldset](
|
|
234
|
+
* **Group Related Controls (legend):** Group radios in a [Fieldset](../components/fieldset.md) whose legend asks one question.
|
|
235
235
|
* **Autocomplete (autocomplete):** Set it on fields that collect personal data, such as email or name ([SC 1.3.5](https://www.w3.org/WAI/WCAG22/Understanding/identify-input-purpose.html)).
|
|
236
236
|
|
|
237
237
|
### Errors
|
|
@@ -319,7 +319,7 @@ Content must survive these spacing overrides at once, without clipping or overla
|
|
|
319
319
|
|
|
320
320
|
## Motion
|
|
321
321
|
|
|
322
|
-
[Motion](
|
|
322
|
+
[Motion](motion.md#reduced-motion) shows how to apply the reduced-motion preference to your own styles.
|
|
323
323
|
|
|
324
324
|
* **Reduced Motion (prefers-reduced-motion):** Components remove movement and scaling, but keep color changes and brief fades.
|
|
325
325
|
* **Moving Content (5 seconds):** Let the reader pause, stop, or hide anything that moves on its own for longer ([SC 2.2.2](https://www.w3.org/WAI/WCAG22/Understanding/pause-stop-hide.html)).
|
|
@@ -327,7 +327,7 @@ Content must survive these spacing overrides at once, without clipping or overla
|
|
|
327
327
|
|
|
328
328
|
## Content
|
|
329
329
|
|
|
330
|
-
* **Link Text:** Describe the destination, even out of context ([SC 2.4.4](https://www.w3.org/WAI/WCAG22/Understanding/link-purpose-in-context.html)). See [Writing Style](
|
|
330
|
+
* **Link Text:** Describe the destination, even out of context ([SC 2.4.4](https://www.w3.org/WAI/WCAG22/Understanding/link-purpose-in-context.html)). See [Writing Style](content/writing-style.md#links).
|
|
331
331
|
* **Alt Text (alt):** Describe meaningful images, and leave it empty on decorative ones ([SC 1.1.1](https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html)).
|
|
332
332
|
* **Time Limits:** Announce a time limit before it starts, and let the reader extend it ([SC 2.2.1](https://www.w3.org/WAI/WCAG22/Understanding/timing-adjustable.html)).
|
|
333
333
|
* **Toast Actions (timeout: 0):** Offer a toast's action elsewhere too, or keep the toast open until dismissed.
|
|
@@ -356,22 +356,22 @@ Before you ship a screen, confirm each item.
|
|
|
356
356
|
|
|
357
357
|
## Related
|
|
358
358
|
|
|
359
|
-
[Color](
|
|
359
|
+
[Color](color.md)
|
|
360
360
|
|
|
361
361
|
Covers contrast and color use.
|
|
362
362
|
|
|
363
|
-
[Motion](
|
|
363
|
+
[Motion](motion.md)
|
|
364
364
|
|
|
365
365
|
Covers reduced motion.
|
|
366
366
|
|
|
367
|
-
[Forms](
|
|
367
|
+
[Forms](../patterns/forms.md)
|
|
368
368
|
|
|
369
369
|
Covers labels and grouping.
|
|
370
370
|
|
|
371
|
-
[Errors and Validation](
|
|
371
|
+
[Errors and Validation](../patterns/errors-and-validation.md)
|
|
372
372
|
|
|
373
373
|
Covers writing and announcing errors.
|
|
374
374
|
|
|
375
|
-
[Button](
|
|
375
|
+
[Button](../components/button.md)
|
|
376
376
|
|
|
377
377
|
Use for icon buttons and loading states.
|