@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
|
@@ -360,18 +360,18 @@ namespace styles {
|
|
|
360
360
|
|
|
361
361
|
## Next Steps
|
|
362
362
|
|
|
363
|
-
[Build a Layout](
|
|
363
|
+
[Build a Layout](../components/app-shell.md)
|
|
364
364
|
|
|
365
365
|
Place a sticky sidebar beside the main content column.
|
|
366
366
|
|
|
367
|
-
[Trigger Actions](
|
|
367
|
+
[Trigger Actions](../components/button.md)
|
|
368
368
|
|
|
369
369
|
Submit forms, send payments, and run other actions.
|
|
370
370
|
|
|
371
|
-
[Collect TextInput](
|
|
371
|
+
[Collect TextInput](../components/field.md)
|
|
372
372
|
|
|
373
373
|
Link labels, descriptions, and errors to form controls.
|
|
374
374
|
|
|
375
|
-
[Show Feedback](
|
|
375
|
+
[Show Feedback](../components/toast.md)
|
|
376
376
|
|
|
377
377
|
Confirm results with brief notifications.
|
|
@@ -132,13 +132,13 @@ namespace styles {
|
|
|
132
132
|
|
|
133
133
|
## Addresses and Hashes
|
|
134
134
|
|
|
135
|
-
Use [Hex](
|
|
135
|
+
Use [Hex](../components/hex.md) for addresses and transaction hashes. Add `copy` wherever the reader may need the full value.
|
|
136
136
|
|
|
137
137
|
### Truncate in the Middle
|
|
138
138
|
|
|
139
|
-
[Hex](
|
|
139
|
+
[Hex](../components/hex.md) keeps the prefix and the checksum ending, and fits the value to its container. For plain strings, such as a [Toast](../components/toast.md) title, `formatHex` keeps four characters on each side of an ellipsis: 0xd8dA…6045.
|
|
140
140
|
|
|
141
|
-
**Do:** Truncate addresses in the middle with [Hex](
|
|
141
|
+
**Do:** Truncate addresses in the middle with [Hex](../components/hex.md).
|
|
142
142
|
|
|
143
143
|
```tsx
|
|
144
144
|
/**
|
|
@@ -191,14 +191,14 @@ namespace styles {
|
|
|
191
191
|
|
|
192
192
|
### Show the Full Value Where You Verify
|
|
193
193
|
|
|
194
|
-
Attackers create addresses that match the first and last characters of a known one. Where the reader chooses or confirms a recipient, show the full address, as the [review and receive steps](
|
|
194
|
+
Attackers create addresses that match the first and last characters of a known one. Where the reader chooses or confirms a recipient, show the full address, as the [review and receive steps](payments.md#review-before-confirming) of a payment do.
|
|
195
195
|
|
|
196
196
|
* **Short forms:** If only a short form fits but people compare it, keep more characters with the `min` option of `formatHex`, such as 0xd8dA6B…A96045.
|
|
197
197
|
* **Activity lists:** A short value with a contact name is enough. The reader opens the record to verify it.
|
|
198
198
|
|
|
199
199
|
### Pair Addresses With Names
|
|
200
200
|
|
|
201
|
-
Show the known contact or account name beside the address, with an [Identicon](
|
|
201
|
+
Show the known contact or account name beside the address, with an [Identicon](../components/identicon.md) before both. The [Identicon](../components/identicon.md) is a cue, never the identifier.
|
|
202
202
|
|
|
203
203
|
**Do:** Pair the name, identicon, and truncated address with a copy button.
|
|
204
204
|
|
|
@@ -218,19 +218,19 @@ Show the known contact or account name beside the address, with an [Identicon](/
|
|
|
218
218
|
<Identicon aria-hidden address="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" size="32" />
|
|
219
219
|
```
|
|
220
220
|
|
|
221
|
-
Keep the letter case of an address as received, since mixed case carries its checksum. Compare addresses without regard to case. [Identicon](
|
|
221
|
+
Keep the letter case of an address as received, since mixed case carries its checksum. Compare addresses without regard to case. [Identicon](../components/identicon.md) renders the same colors for any letter case.
|
|
222
222
|
|
|
223
223
|
## Copy Values
|
|
224
224
|
|
|
225
225
|
* **Name the Button (aria-label):** The default name is Copy and the value. If that reads poorly, compose `Hex.Copy` with a label such as Copy address.
|
|
226
|
-
* **Confirm Once (2 seconds):** The button shows Copied and announces it politely. Do not add a [Toast](
|
|
227
|
-
* **Your Own Layouts (CopyButton):** Use [CopyButton](
|
|
226
|
+
* **Confirm Once (2 seconds):** The button shows Copied and announces it politely. Do not add a [Toast](../components/toast.md).
|
|
227
|
+
* **Your Own Layouts (CopyButton):** Use [CopyButton](../components/copy-button.md) beside values you lay out yourself, named by what it copies.
|
|
228
228
|
|
|
229
229
|
## Link to the Explorer
|
|
230
230
|
|
|
231
231
|
Link transaction hashes, block numbers, and addresses to their page on [explore.tempo.xyz](https://explore.tempo.xyz). In a receipt, use a text link labelled View on explorer.
|
|
232
232
|
|
|
233
|
-
* **Icon Links (shape=icon):** Name an icon link by destination, and repeat the name in a [Tooltip](
|
|
233
|
+
* **Icon Links (shape=icon):** Name an icon link by destination, and repeat the name in a [Tooltip](../components/tooltip.md).
|
|
234
234
|
* **Separate Controls:** Keep copy and link as separate controls. One text never copies on one click and navigates on another.
|
|
235
235
|
|
|
236
236
|
## Amounts and Precision
|
|
@@ -367,7 +367,7 @@ namespace styles {
|
|
|
367
367
|
|
|
368
368
|
[View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Amount/Sign.tsx)
|
|
369
369
|
|
|
370
|
-
[Payments](
|
|
370
|
+
[Payments](payments.md#enter-the-amount) covers entering amounts with [AmountInput](../components/amount-input.md).
|
|
371
371
|
|
|
372
372
|
## Tokens
|
|
373
373
|
|
|
@@ -555,7 +555,7 @@ namespace styles {
|
|
|
555
555
|
|
|
556
556
|
[View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Patterns/BlockchainHiddenAmounts.tsx)
|
|
557
557
|
|
|
558
|
-
* **Toggle:** Use an icon [Button](
|
|
558
|
+
* **Toggle:** Use an icon [Button](../components/button.md) with the eye icons, named Hide amounts, that reports its pressed state.
|
|
559
559
|
* **Everywhere:** Hide every amount, including totals, activity, and charts.
|
|
560
560
|
* **Out of the page:** Render the mask in place of the value, not a blur, so the value is absent from the page. Expose the word Hidden to screen readers instead of the dots.
|
|
561
561
|
* **Remembered:** Keep the choice on the device, so amounts stay hidden on the next launch.
|
|
@@ -642,7 +642,7 @@ namespace styles {
|
|
|
642
642
|
|
|
643
643
|
## Secrets
|
|
644
644
|
|
|
645
|
-
Recovery phrases, private keys, API keys, and access keys grant control of funds. Show them with [SecretValue](
|
|
645
|
+
Recovery phrases, private keys, API keys, and access keys grant control of funds. Show them with [SecretValue](../components/secret-value.md), which starts masked and copies without revealing. Never show a secret with [Hex](../components/hex.md).
|
|
646
646
|
|
|
647
647
|
**Do:** Start masked, and copy without revealing.
|
|
648
648
|
|
|
@@ -676,34 +676,34 @@ Recovery phrases, private keys, API keys, and access keys grant control of funds
|
|
|
676
676
|
|
|
677
677
|
## Related
|
|
678
678
|
|
|
679
|
-
[Hex](
|
|
679
|
+
[Hex](../components/hex.md)
|
|
680
680
|
|
|
681
681
|
Use for addresses and hashes.
|
|
682
682
|
|
|
683
|
-
[CopyButton](
|
|
683
|
+
[CopyButton](../components/copy-button.md)
|
|
684
684
|
|
|
685
685
|
Use for copying values.
|
|
686
686
|
|
|
687
|
-
[Amount](
|
|
687
|
+
[Amount](../components/amount.md)
|
|
688
688
|
|
|
689
689
|
Use for formatting amounts.
|
|
690
690
|
|
|
691
|
-
[TokenLogo](
|
|
691
|
+
[TokenLogo](../components/token-logo.md)
|
|
692
692
|
|
|
693
693
|
Use for token icons.
|
|
694
694
|
|
|
695
|
-
[Identicon](
|
|
695
|
+
[Identicon](../components/identicon.md)
|
|
696
696
|
|
|
697
697
|
Use for address avatars.
|
|
698
698
|
|
|
699
|
-
[SecretValue](
|
|
699
|
+
[SecretValue](../components/secret-value.md)
|
|
700
700
|
|
|
701
701
|
Use for secrets.
|
|
702
702
|
|
|
703
|
-
[Payments](
|
|
703
|
+
[Payments](payments.md)
|
|
704
704
|
|
|
705
705
|
Covers send, receive, and deposit flows.
|
|
706
706
|
|
|
707
|
-
[Tables and Lists](
|
|
707
|
+
[Tables and Lists](tables-and-lists.md)
|
|
708
708
|
|
|
709
709
|
Covers columns of values.
|
|
@@ -4,7 +4,7 @@ Summarizes system metrics, such as throughput, in tiles, filters, and charts.
|
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
A dashboard addresses one question, such as how the latest benchmark run performed. [Tempo Performance](
|
|
7
|
+
A dashboard addresses one question, such as how the latest benchmark run performed. [Tempo Performance](../products/tempo-performance.md) uses the pattern: a run header, filters for the run and scenario, a row of metric tiles, and sections of charts.
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
10
|
> The library has no chart component. The examples are reference layouts with placeholder bars drawn with `style`. Render the plot with your charting library.
|
|
@@ -13,11 +13,11 @@ A dashboard addresses one question, such as how the latest benchmark run perform
|
|
|
13
13
|
|
|
14
14
|
Build the page in this order, from top to bottom.
|
|
15
15
|
|
|
16
|
-
* **Header (1):** The page title, the run's date, commit, and duration, and a [Badge](
|
|
16
|
+
* **Header (1):** The page title, the run's date, commit, and duration, and a [Badge](../components/badge.md) for its type, such as Nightly.
|
|
17
17
|
* **Filters (2):** One row of labelled controls that apply on change.
|
|
18
|
-
* **Metric Tiles (3):** Four to eight headline numbers in [Surface](
|
|
19
|
-
* **Chart Sections (4):** One [Surface](
|
|
20
|
-
* **Detail Tables (5):** A [Table](
|
|
18
|
+
* **Metric Tiles (3):** Four to eight headline numbers in [Surface](../components/surface.md) tiles, most important first.
|
|
19
|
+
* **Chart Sections (4):** One [Surface](../components/surface.md) per chart, under section headings such as Throughput.
|
|
20
|
+
* **Detail Tables (5):** A [Table](../components/table.md) of exact values, such as p50, p95, and p99 timings.
|
|
21
21
|
|
|
22
22
|
```tsx
|
|
23
23
|
import { Badge, Button, ChoiceGroup, Field, Grid, Popover, Select, Skeleton, Stack, style, Surface } from '@tempoxyz/ds'
|
|
@@ -325,7 +325,7 @@ namespace styles {
|
|
|
325
325
|
|
|
326
326
|
### Put Definitions in a Popover
|
|
327
327
|
|
|
328
|
-
A [Tooltip](
|
|
328
|
+
A [Tooltip](../components/tooltip.md) stays closed on touch input, and screen readers do not announce it. Put the definition in a [Popover](../components/popover.md), and set `openOnHover` on `Popover.Trigger`. Write it in one or two sentences, such as Median settled throughput across 142 measured blocks.
|
|
329
329
|
|
|
330
330
|
### Show Change With Text
|
|
331
331
|
|
|
@@ -337,7 +337,7 @@ If a tile compares against a baseline, state the direction and the baseline in t
|
|
|
337
337
|
* **Long List (Combobox):** One choice from a long, searchable list, such as 60 run IDs.
|
|
338
338
|
* **Few Short Options (ChoiceGroup):** Two to four short options that readers compare often, such as p50, p95, and p99.
|
|
339
339
|
|
|
340
|
-
**Do:** If a few short options fit, use a [ChoiceGroup](
|
|
340
|
+
**Do:** If a few short options fit, use a [ChoiceGroup](../components/choice-group.md).
|
|
341
341
|
|
|
342
342
|
```tsx
|
|
343
343
|
/**
|
|
@@ -359,7 +359,7 @@ export function Demo() {
|
|
|
359
359
|
}
|
|
360
360
|
```
|
|
361
361
|
|
|
362
|
-
**Don't:** Hide three short options behind a [Select](
|
|
362
|
+
**Don't:** Hide three short options behind a [Select](../components/select.md).
|
|
363
363
|
|
|
364
364
|
```tsx
|
|
365
365
|
/**
|
|
@@ -388,7 +388,7 @@ namespace styles {
|
|
|
388
388
|
}
|
|
389
389
|
```
|
|
390
390
|
|
|
391
|
-
* **Visible labels:** Label every filter. Name a [ChoiceGroup](
|
|
391
|
+
* **Visible labels:** Label every filter. Name a [ChoiceGroup](../components/choice-group.md) with `aria-labelledby`.
|
|
392
392
|
* **Apply on change:** Do not add an Apply button for single-choice controls.
|
|
393
393
|
* **State in the URL:** Keep filter state in the URL, so a shared link opens the same view.
|
|
394
394
|
* **Scope in titles:** Name the active scope in chart titles, such as Block validation (p95).
|
|
@@ -396,8 +396,8 @@ namespace styles {
|
|
|
396
396
|
|
|
397
397
|
## Values and Identifiers
|
|
398
398
|
|
|
399
|
-
* **Tabular figures:** Set metric values in tabular figures, so digits keep their width on update. [Amount](
|
|
400
|
-
* **Monospace identifiers:** Set commits and run IDs in monospace. [Hex](
|
|
399
|
+
* **Tabular figures:** Set metric values in tabular figures, so digits keep their width on update. [Amount](../components/amount.md) and `numeric` table cells apply them already.
|
|
400
|
+
* **Monospace identifiers:** Set commits and run IDs in monospace. [Hex](../components/hex.md) and `mono` table cells apply it already.
|
|
401
401
|
* **One precision:** Round to the precision readers act on, such as 1.38, not 1.3812. Keep it the same across tiles, charts, and runs.
|
|
402
402
|
* **Larger units:** Switch to a larger unit before values pass four digits, such as 1.38 Ggas.
|
|
403
403
|
|
|
@@ -405,11 +405,11 @@ namespace styles {
|
|
|
405
405
|
|
|
406
406
|
Frame every chart the same way, whatever library renders it.
|
|
407
407
|
|
|
408
|
-
* **Labelled Section (section):** Render each medium [Surface](
|
|
408
|
+
* **Labelled Section (section):** Render each medium [Surface](../components/surface.md) as a section, labelled by its title.
|
|
409
409
|
* **Fixed Height (12rem):** Keep the plot area at one height in every state and at every width.
|
|
410
410
|
* **Caption (Units and scope):** Place it below the plot, such as Milliseconds per block, p50.
|
|
411
411
|
* **Legend and Contrast (3:1):** Label series in a legend, and give each color 3:1 contrast. Teal falls short on light surfaces.
|
|
412
|
-
* **Text Alternative (role=img):** Summarize the plot in `aria-label`, such as its range. If readers need the values, add a [Table](
|
|
412
|
+
* **Text Alternative (role=img):** Summarize the plot in `aria-label`, such as its range. If readers need the values, add a [Table](../components/table.md).
|
|
413
413
|
|
|
414
414
|
```tsx
|
|
415
415
|
import { Alert, ChoiceGroup, Empty, Skeleton, Stack, style, Surface } from '@tempoxyz/ds'
|
|
@@ -516,16 +516,16 @@ namespace styles {
|
|
|
516
516
|
|
|
517
517
|
## Grid Reflow
|
|
518
518
|
|
|
519
|
-
Lay out tiles in a [Grid](
|
|
519
|
+
Lay out tiles in a [Grid](../components/grid.md) with `fit="small"` and charts with `fit="large"`, which keeps each chart at least 20rem wide. Neither needs a media query. On narrow screens, stack charts instead of shrinking them. [Responsive Layout](responsive-layout.md#app-shell-with-content) covers the full-width shell.
|
|
520
520
|
|
|
521
521
|
## States
|
|
522
522
|
|
|
523
523
|
* **Empty (Empty):** Inside the plot area, state why and what to try next, such as No blocks in this range.
|
|
524
|
-
* **Error (negative):** Place an [Alert](
|
|
524
|
+
* **Error (negative):** Place an [Alert](../components/alert.md) with a Retry action inside the failed chart. Other charts keep working.
|
|
525
525
|
* **Partial Data:** Name what is missing, such as Loading validator telemetry, instead of hiding the section.
|
|
526
526
|
* **Updating:** Show when data last changed, such as Updated 30 s ago. Update values in place without layout shift.
|
|
527
527
|
|
|
528
|
-
**Do:** Show titles at once, and hold the plot height with a [Skeleton](
|
|
528
|
+
**Do:** Show titles at once, and hold the plot height with a [Skeleton](../components/skeleton.md) while
|
|
529
529
|
data loads.
|
|
530
530
|
|
|
531
531
|
```tsx
|
|
@@ -558,7 +558,7 @@ namespace styles {
|
|
|
558
558
|
}
|
|
559
559
|
```
|
|
560
560
|
|
|
561
|
-
**Don't:** Collapse the chart to a [Spinner](
|
|
561
|
+
**Don't:** Collapse the chart to a [Spinner](../components/spinner.md), which shifts every section
|
|
562
562
|
below it.
|
|
563
563
|
|
|
564
564
|
```tsx
|
|
@@ -593,46 +593,46 @@ namespace styles {
|
|
|
593
593
|
|
|
594
594
|
* **Description Lists (dl):** Screen readers pair each value with its label, and read the unit with the value.
|
|
595
595
|
* **Info Buttons (About Block time):** Name each by its metric. Give it more room on touch screens.
|
|
596
|
-
* **Announce Once (status):** Announce loading and errors once, through a status region or a [Alert](
|
|
596
|
+
* **Announce Once (status):** Announce loading and errors once, through a status region or a [Alert](../components/alert.md). Do not announce every live update.
|
|
597
597
|
|
|
598
598
|
## Related
|
|
599
599
|
|
|
600
|
-
[Surface](
|
|
600
|
+
[Surface](../components/surface.md)
|
|
601
601
|
|
|
602
602
|
Use for tiles and chart containers.
|
|
603
603
|
|
|
604
|
-
[Grid](
|
|
604
|
+
[Grid](../components/grid.md)
|
|
605
605
|
|
|
606
606
|
Use for reflowing tiles and charts.
|
|
607
607
|
|
|
608
|
-
[ChoiceGroup](
|
|
608
|
+
[ChoiceGroup](../components/choice-group.md)
|
|
609
609
|
|
|
610
610
|
Use for a few short filter options.
|
|
611
611
|
|
|
612
|
-
[Select](
|
|
612
|
+
[Select](../components/select.md)
|
|
613
613
|
|
|
614
614
|
Use for filters with a medium list.
|
|
615
615
|
|
|
616
|
-
[Combobox](
|
|
616
|
+
[Combobox](../components/combobox.md)
|
|
617
617
|
|
|
618
618
|
Use for filters with a long list.
|
|
619
619
|
|
|
620
|
-
[Popover](
|
|
620
|
+
[Popover](../components/popover.md)
|
|
621
621
|
|
|
622
622
|
Use for metric definitions.
|
|
623
623
|
|
|
624
|
-
[Skeleton](
|
|
624
|
+
[Skeleton](../components/skeleton.md)
|
|
625
625
|
|
|
626
626
|
Use for loading plots.
|
|
627
627
|
|
|
628
|
-
[Responsive Layout](
|
|
628
|
+
[Responsive Layout](responsive-layout.md)
|
|
629
629
|
|
|
630
630
|
Covers the shared breakpoints.
|
|
631
631
|
|
|
632
|
-
[Tables and Lists](
|
|
632
|
+
[Tables and Lists](tables-and-lists.md)
|
|
633
633
|
|
|
634
634
|
Covers exact values.
|
|
635
635
|
|
|
636
|
-
[Tempo Performance](
|
|
636
|
+
[Tempo Performance](../products/tempo-performance.md)
|
|
637
637
|
|
|
638
638
|
Covers the benchmark dashboard.
|
|
@@ -13,10 +13,10 @@ Add friction in proportion to the risk. Too few safeguards lose data. Too many t
|
|
|
13
13
|
|
|
14
14
|
## Structure
|
|
15
15
|
|
|
16
|
-
1. **Trigger:** Names the action, such as Delete webhook, after the safe actions or at the end of a [Menu](
|
|
16
|
+
1. **Trigger:** Names the action, such as Delete webhook, after the safe actions or at the end of a [Menu](../components/menu.md).
|
|
17
17
|
2. **Safeguard:** Undo, a confirmation, or a typed confirmation, chosen by risk.
|
|
18
|
-
3. **Confirmation:** An [AlertDialog](
|
|
19
|
-
4. **Result:** The item disappears, a [Toast](
|
|
18
|
+
3. **Confirmation:** An [AlertDialog](../components/alert-dialog.md) names the object, states the consequence, and repeats the verb on its button.
|
|
19
|
+
4. **Result:** The item disappears, a [Toast](../components/toast.md) confirms it, and focus moves to the list.
|
|
20
20
|
|
|
21
21
|
```tsx
|
|
22
22
|
import { AlertDialog, Button, ButtonGroup } from '@tempoxyz/ds'
|
|
@@ -47,7 +47,7 @@ export function Demo() {
|
|
|
47
47
|
|
|
48
48
|
[View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Patterns/DeleteWebhook.tsx)
|
|
49
49
|
|
|
50
|
-
This reference layout uses [AlertDialog](
|
|
50
|
+
This reference layout uses [AlertDialog](../components/alert-dialog.md) and [Button](../components/button.md). Cancel comes first in the markup, so it takes focus when the dialog opens.
|
|
51
51
|
|
|
52
52
|
## Guidelines
|
|
53
53
|
|
|
@@ -60,13 +60,13 @@ Prefer Undo to confirmation wherever you can build it.
|
|
|
60
60
|
* **Irreversible (AlertDialog):** Always confirm, and state that the action cannot be undone.
|
|
61
61
|
* **Irreversible and Wide-Reaching (Type to confirm):** Ask the reader to type the object's name or authenticate again.
|
|
62
62
|
|
|
63
|
-
Actions that move funds, such as a payment or a swap, use the review step as the confirmation (see [Payments](
|
|
63
|
+
Actions that move funds, such as a payment or a swap, use the review step as the confirmation (see [Payments](payments.md)). Do not add an [AlertDialog](../components/alert-dialog.md) after a payment review, since a second prompt trains readers to dismiss prompts.
|
|
64
64
|
|
|
65
65
|
### Name the Action and Its Consequence
|
|
66
66
|
|
|
67
67
|
* **Title (Question):** Name the verb and the object, such as Revoke the Production key?
|
|
68
68
|
* **Description (1 to 2 sentences):** State the consequence, including whether it is reversible. Do not soften it.
|
|
69
|
-
* **Actions (secondary + primary):** Repeat the title's verb on the confirm button, in the [action order](
|
|
69
|
+
* **Actions (secondary + primary):** Repeat the title's verb on the confirm button, in the [action order](forms.md#order-actions).
|
|
70
70
|
|
|
71
71
|
**Do:** Name the object and the consequence, and repeat the verb on the button.
|
|
72
72
|
|
|
@@ -488,14 +488,14 @@ namespace styles {
|
|
|
488
488
|
|
|
489
489
|
[View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Patterns/RemoveContact.tsx)
|
|
490
490
|
|
|
491
|
-
Undo in the [Toast](
|
|
491
|
+
Undo in the [Toast](../components/toast.md) restores the contact in place.
|
|
492
492
|
|
|
493
493
|
* **Skip the Confirmation (action):** If an action is easy to reverse, run it at once and offer Undo in a toast.
|
|
494
494
|
* **Keep Another Way Back:** A toast dismisses itself, so keep another way back, such as adding the contact again.
|
|
495
495
|
|
|
496
496
|
### Save the Filled Button for the Decision
|
|
497
497
|
|
|
498
|
-
Give a reversible removal in a list a `tertiary` button, and keep the `primary` button for the confirm step. In a [Menu](
|
|
498
|
+
Give a reversible removal in a list a `tertiary` button, and keep the `primary` button for the confirm step. In a [Menu](../components/menu.md), give destructive items `intent="negative"` and place them last, after a `Menu.Separator`.
|
|
499
499
|
|
|
500
500
|
**Do:** Use `tertiary` buttons for a reversible removal, and keep `primary` for the confirm step.
|
|
501
501
|
|
|
@@ -559,7 +559,7 @@ namespace styles {
|
|
|
559
559
|
|
|
560
560
|
### Warn Before the Action
|
|
561
561
|
|
|
562
|
-
If the consequence is not obvious, state it in an [Alert](
|
|
562
|
+
If the consequence is not obvious, state it in an [Alert](../components/alert.md) beside the button. Readers who skim past dialogs still read it.
|
|
563
563
|
|
|
564
564
|
**Do:** State the specific consequence next to the action.
|
|
565
565
|
|
|
@@ -589,7 +589,7 @@ If the consequence is not obvious, state it in an [Alert](/docs/components/alert
|
|
|
589
589
|
|
|
590
590
|
* **Loading (loading):** Confirm shows progress, Cancel is disabled, and the dialog stays open until the request ends.
|
|
591
591
|
* **Error:** Keep the dialog open and state the failure in it, so the reader can try again.
|
|
592
|
-
* **Empty:** After the last item goes, the list shows its first use [empty state](
|
|
592
|
+
* **Empty:** After the last item goes, the list shows its first use [empty state](empty-states.md).
|
|
593
593
|
* **Disabled:** If the reader lacks permission, state who can act instead of a silent disabled button.
|
|
594
594
|
|
|
595
595
|
## Accessibility
|
|
@@ -601,26 +601,26 @@ If the consequence is not obvious, state it in an [Alert](/docs/components/alert
|
|
|
601
601
|
|
|
602
602
|
## Related
|
|
603
603
|
|
|
604
|
-
[AlertDialog](
|
|
604
|
+
[AlertDialog](../components/alert-dialog.md)
|
|
605
605
|
|
|
606
606
|
Use for confirmations.
|
|
607
607
|
|
|
608
|
-
[Button](
|
|
608
|
+
[Button](../components/button.md)
|
|
609
609
|
|
|
610
610
|
Use for the confirm and cancel actions.
|
|
611
611
|
|
|
612
|
-
[Toast](
|
|
612
|
+
[Toast](../components/toast.md)
|
|
613
613
|
|
|
614
614
|
Use for Undo.
|
|
615
615
|
|
|
616
|
-
[Menu](
|
|
616
|
+
[Menu](../components/menu.md)
|
|
617
617
|
|
|
618
618
|
Use for destructive items in a menu.
|
|
619
619
|
|
|
620
|
-
[Forms](
|
|
620
|
+
[Forms](forms.md)
|
|
621
621
|
|
|
622
622
|
Covers typed input and action order.
|
|
623
623
|
|
|
624
|
-
[Payments](
|
|
624
|
+
[Payments](payments.md)
|
|
625
625
|
|
|
626
626
|
Covers reviewing transfers.
|
|
@@ -4,7 +4,7 @@ Explain why a region has nothing to show, and offer the next step that fills it.
|
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
An empty region can mean missing data, a filter with no matches, finished work, or a failed request. Each cause takes different words and actions. [Empty](
|
|
7
|
+
An empty region can mean missing data, a filter with no matches, finished work, or a failed request. Each cause takes different words and actions. [Empty](../components/empty.md) composes the parts, and every empty state covers three points:
|
|
8
8
|
|
|
9
9
|
* **What Is This Place? (Empty.Title):** Names the content that would appear.
|
|
10
10
|
* **Why Is It Empty? (Empty.Description):** Explains the cause in one sentence.
|
|
@@ -12,7 +12,7 @@ An empty region can mean missing data, a filter with no matches, finished work,
|
|
|
12
12
|
|
|
13
13
|
## Variants
|
|
14
14
|
|
|
15
|
-
The cause decides the text and the action. These are reference layouts built from [Surface](
|
|
15
|
+
The cause decides the text and the action. These are reference layouts built from [Surface](../components/surface.md), [Empty](../components/empty.md), and [Button](../components/button.md), not shipped components.
|
|
16
16
|
|
|
17
17
|
### First Use
|
|
18
18
|
|
|
@@ -382,7 +382,7 @@ namespace styles {
|
|
|
382
382
|
|
|
383
383
|
[View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Patterns/EmptyError.tsx)
|
|
384
384
|
|
|
385
|
-
If the request fails, write Couldn't load followed by the content, and offer Try again. Set `loading` on the [Button](
|
|
385
|
+
If the request fails, write Couldn't load followed by the content, and offer Try again. Set `loading` on the [Button](../components/button.md) while the retry runs.
|
|
386
386
|
|
|
387
387
|
## Guidelines
|
|
388
388
|
|
|
@@ -563,19 +563,19 @@ export function Demo() {
|
|
|
563
563
|
### Fit the State to the Region
|
|
564
564
|
|
|
565
565
|
* **Pages and Cards:** Use the full empty state with an icon that hints at the content.
|
|
566
|
-
* **Small Regions:** In a small region, such as a [Popover](
|
|
567
|
-
* **Comboboxes (Combobox.Empty):** Render it in a [Combobox](
|
|
568
|
-
* **Keep the Frame:** Keep the heading and filters. In a [Table](
|
|
566
|
+
* **Small Regions:** In a small region, such as a [Popover](../components/popover.md), use a short line of text and no icon.
|
|
567
|
+
* **Comboboxes (Combobox.Empty):** Render it in a [Combobox](../components/combobox.md), so an empty result is announced instead of an empty popup.
|
|
568
|
+
* **Keep the Frame:** Keep the heading and filters. In a [Table](../components/table.md), put the empty state below the header row.
|
|
569
569
|
|
|
570
570
|
### Don't Show an Empty State While Loading
|
|
571
571
|
|
|
572
|
-
* **Load First (Skeleton):** Show a [Skeleton](
|
|
573
|
-
* **Then Decide:** After the request settles, choose content, an empty state, or an error (see [Loading](
|
|
572
|
+
* **Load First (Skeleton):** Show a [Skeleton](../components/skeleton.md) until the request settles. An empty state that flashes first reads as a missing balance.
|
|
573
|
+
* **Then Decide:** After the request settles, choose content, an empty state, or an error (see [Loading](loading.md)).
|
|
574
574
|
|
|
575
575
|
## States
|
|
576
576
|
|
|
577
577
|
* **Disabled:** If the reader lacks permission for the action, leave it out and state who can act.
|
|
578
|
-
* **Success (Toast):** The new item replaces the empty state, and a [Toast](
|
|
578
|
+
* **Success (Toast):** The new item replaces the empty state, and a [Toast](../components/toast.md) confirms it.
|
|
579
579
|
|
|
580
580
|
## Content
|
|
581
581
|
|
|
@@ -591,22 +591,22 @@ export function Demo() {
|
|
|
591
591
|
|
|
592
592
|
## Related
|
|
593
593
|
|
|
594
|
-
[Empty](
|
|
594
|
+
[Empty](../components/empty.md)
|
|
595
595
|
|
|
596
596
|
Use for the component parts.
|
|
597
597
|
|
|
598
|
-
[Combobox](
|
|
598
|
+
[Combobox](../components/combobox.md)
|
|
599
599
|
|
|
600
600
|
Use for empty popups.
|
|
601
601
|
|
|
602
|
-
[Loading](
|
|
602
|
+
[Loading](loading.md)
|
|
603
603
|
|
|
604
604
|
Covers what shows before content.
|
|
605
605
|
|
|
606
|
-
[Feedback and Status](
|
|
606
|
+
[Feedback and Status](feedback-and-status.md)
|
|
607
607
|
|
|
608
608
|
Covers the Couldn't load state.
|
|
609
609
|
|
|
610
|
-
[Tables and Lists](
|
|
610
|
+
[Tables and Lists](tables-and-lists.md)
|
|
611
611
|
|
|
612
612
|
Covers empty tables.
|