@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
|
@@ -8,7 +8,7 @@ Figma: [Messaging/Status Row](https://www.figma.com/design/yE96kcymnNR88PJp6G1sP
|
|
|
8
8
|
|
|
9
9
|
## Overview
|
|
10
10
|
|
|
11
|
-
A status row renders a tinted row with a leading mark, a title over a description, and an optional trailing [StatusChip](
|
|
11
|
+
A status row renders a tinted row with a leading mark, a title over a description, and an optional trailing [StatusChip](status-chip.md). It announces a change of its text to screen readers, so it can update in place as the task moves on.
|
|
12
12
|
|
|
13
13
|
## Examples
|
|
14
14
|
|
|
@@ -89,9 +89,9 @@ import { StatusRow } from '@tempoxyz/ds'
|
|
|
89
89
|
|
|
90
90
|
### When Not to Use
|
|
91
91
|
|
|
92
|
-
* Use [Alert](
|
|
93
|
-
* Use [Toast](
|
|
94
|
-
* Use [ListGroup](
|
|
92
|
+
* Use [Alert](alert.md) for guidance that is not tied to a running task.
|
|
93
|
+
* Use [Toast](toast.md) to confirm an action briefly and out of the flow.
|
|
94
|
+
* Use [ListGroup](list-group.md) for a list of finished payments.
|
|
95
95
|
|
|
96
96
|
### Match the Mark to the State
|
|
97
97
|
|
|
@@ -161,14 +161,14 @@ A status row renders a `<div>` with the `status` role, so screen readers announc
|
|
|
161
161
|
|
|
162
162
|
## Related
|
|
163
163
|
|
|
164
|
-
[StatusChip](
|
|
164
|
+
[StatusChip](status-chip.md)
|
|
165
165
|
|
|
166
166
|
Use for the status at the end of the row.
|
|
167
167
|
|
|
168
|
-
[Spinner](
|
|
168
|
+
[Spinner](spinner.md)
|
|
169
169
|
|
|
170
170
|
Use for the leading mark while the task runs.
|
|
171
171
|
|
|
172
|
-
[Alert](
|
|
172
|
+
[Alert](alert.md)
|
|
173
173
|
|
|
174
174
|
Use for guidance that is not tied to a running task.
|
|
@@ -78,10 +78,10 @@ import { Stepper } from '@tempoxyz/ds'
|
|
|
78
78
|
|
|
79
79
|
### When Not to Use
|
|
80
80
|
|
|
81
|
-
* Use [Progress](
|
|
82
|
-
* Use [Tabs](
|
|
83
|
-
* Use [Breadcrumbs](
|
|
84
|
-
* Use one form, laid out with [Field](
|
|
81
|
+
* Use [Progress](progress.md) for measurable work, such as a file upload or a sync to the latest block.
|
|
82
|
+
* Use [Tabs](tabs.md) for sections in any order. A stepper is not interactive, and its segments don't link to steps.
|
|
83
|
+
* Use [Breadcrumbs](breadcrumbs.md) to show where a page sits in the hierarchy.
|
|
84
|
+
* Use one form, laid out with [Field](field.md) and [Fieldset](fieldset.md), when the task fits on one screen.
|
|
85
85
|
|
|
86
86
|
### Keep the Step Count Fixed
|
|
87
87
|
|
|
@@ -331,7 +331,7 @@ namespace styles {
|
|
|
331
331
|
|
|
332
332
|
### Keep It in One Place
|
|
333
333
|
|
|
334
|
-
Place the stepper in the same spot on every step. In a [Dialog](
|
|
334
|
+
Place the stepper in the same spot on every step. In a [Dialog](dialog.md) or a [Frame](frame.md), center it in the header, with the Back button on the left from the second step.
|
|
335
335
|
|
|
336
336
|
**Do:** Place the stepper at the top, above the step's heading.
|
|
337
337
|
|
|
@@ -434,18 +434,18 @@ A stepper renders a `progressbar` whose value is the current step. The segments
|
|
|
434
434
|
|
|
435
435
|
## Related
|
|
436
436
|
|
|
437
|
-
[Progress](
|
|
437
|
+
[Progress](progress.md)
|
|
438
438
|
|
|
439
439
|
Use for measurable work.
|
|
440
440
|
|
|
441
|
-
[Dialog](
|
|
441
|
+
[Dialog](dialog.md)
|
|
442
442
|
|
|
443
443
|
Use for flows that open over the page.
|
|
444
444
|
|
|
445
|
-
[Forms](
|
|
445
|
+
[Forms](../patterns/forms.md)
|
|
446
446
|
|
|
447
447
|
Covers laying out each step.
|
|
448
448
|
|
|
449
|
-
[Payments](
|
|
449
|
+
[Payments](../patterns/payments.md)
|
|
450
450
|
|
|
451
451
|
Covers send and review flows.
|
|
@@ -14,7 +14,7 @@ A success hero renders a dark 520px card. Streaks slide in behind a bottom row t
|
|
|
14
14
|
|
|
15
15
|
### Basic
|
|
16
16
|
|
|
17
|
-
Compose `SuccessHero.Body` and an action. A default [Button](
|
|
17
|
+
Compose `SuccessHero.Body` and an action. A default [Button](button.md) fills light on the dark card.
|
|
18
18
|
|
|
19
19
|
```tsx
|
|
20
20
|
/** Demonstrates SuccessHero in the documentation. @module */
|
|
@@ -98,8 +98,8 @@ import { SuccessHero } from '@tempoxyz/ds'
|
|
|
98
98
|
|
|
99
99
|
### When Not to Use
|
|
100
100
|
|
|
101
|
-
* Use [HeroVisual](
|
|
102
|
-
* Use [Toast](
|
|
101
|
+
* Use [HeroVisual](hero-visual.md) beside the steps while the flow runs.
|
|
102
|
+
* Use [Toast](toast.md) to confirm a small action.
|
|
103
103
|
|
|
104
104
|
### Offer One Action
|
|
105
105
|
|
|
@@ -148,10 +148,10 @@ The card renders a `<div>` with no role. Screen readers skip the artwork and rea
|
|
|
148
148
|
|
|
149
149
|
## Related
|
|
150
150
|
|
|
151
|
-
[HeroVisual](
|
|
151
|
+
[HeroVisual](hero-visual.md)
|
|
152
152
|
|
|
153
153
|
Use for the hero card while the flow runs.
|
|
154
154
|
|
|
155
|
-
[Button](
|
|
155
|
+
[Button](button.md)
|
|
156
156
|
|
|
157
157
|
Use for the action of the card.
|
|
@@ -113,7 +113,7 @@ namespace styles {
|
|
|
113
113
|
|
|
114
114
|
### List
|
|
115
115
|
|
|
116
|
-
A [ListGroup](
|
|
116
|
+
A [ListGroup](list-group.md) inside a surface bleeds into its padding, so a row's hover fill reaches the edges of the surface. Each row is 44px, and a [Select](select.md) in a row hugs its value at the end of the row.
|
|
117
117
|
|
|
118
118
|
```tsx
|
|
119
119
|
/** Renders a small surface whose list holds a network picker and a row of token logos, for the Surface docs. @module */
|
|
@@ -320,14 +320,14 @@ import { Surface } from '@tempoxyz/ds'
|
|
|
320
320
|
|
|
321
321
|
### When Not to Use
|
|
322
322
|
|
|
323
|
-
* Use [Alert](
|
|
324
|
-
* Use [Dialog](
|
|
325
|
-
* Use [Stack](
|
|
326
|
-
* Use [Frame](
|
|
323
|
+
* Use [Alert](alert.md) for a message about a section, and [Banner](banner.md) for one about the page.
|
|
324
|
+
* Use [Dialog](dialog.md) or [Popover](popover.md) for content that opens over the page.
|
|
325
|
+
* Use [Stack](stack.md) or [Inset](inset.md) to space content without a visible container.
|
|
326
|
+
* Use [Frame](frame.md) inside a surface for a card with a footer of actions.
|
|
327
327
|
|
|
328
328
|
### Name Each Card
|
|
329
329
|
|
|
330
|
-
Start a card with a `Surface.Header` that holds a `Surface.Title`. Put a card-level action at the end of the header, such as a `small` `tertiary` [Button](
|
|
330
|
+
Start a card with a `Surface.Header` that holds a `Surface.Title`. Put a card-level action at the end of the header, such as a `small` `tertiary` [Button](button.md).
|
|
331
331
|
|
|
332
332
|
**Do:** Name the card with a `Surface.Title`, and put its action at the end of the header.
|
|
333
333
|
|
|
@@ -504,7 +504,7 @@ namespace styles {
|
|
|
504
504
|
|
|
505
505
|
### Don't Nest Surfaces
|
|
506
506
|
|
|
507
|
-
Divide the content of one surface with [ListGroup](
|
|
507
|
+
Divide the content of one surface with [ListGroup](list-group.md), a [Table](table.md), or a [Separator](separator.md). A table placed directly inside a surface bleeds 12px into its padding, so its rows end 12px inside the edges of a large surface and its text stays on the content edge. The surface draws no border around it.
|
|
508
508
|
|
|
509
509
|
**Do:** Divide one surface with ListGroup.
|
|
510
510
|
|
|
@@ -622,18 +622,18 @@ For a pressable surface rendered as a button or link:
|
|
|
622
622
|
|
|
623
623
|
## Related
|
|
624
624
|
|
|
625
|
-
[Frame](
|
|
625
|
+
[Frame](frame.md)
|
|
626
626
|
|
|
627
627
|
Use for a header, body, and footer inside a card.
|
|
628
628
|
|
|
629
|
-
[ListGroup](
|
|
629
|
+
[ListGroup](list-group.md)
|
|
630
630
|
|
|
631
631
|
Use for divided content in a card.
|
|
632
632
|
|
|
633
|
-
[Grid](
|
|
633
|
+
[Grid](grid.md)
|
|
634
634
|
|
|
635
635
|
Use for laying out several cards.
|
|
636
636
|
|
|
637
|
-
[Dashboards](
|
|
637
|
+
[Dashboards](../patterns/dashboards.md)
|
|
638
638
|
|
|
639
639
|
Covers metric tiles.
|
|
@@ -26,7 +26,7 @@ export function Demo() {
|
|
|
26
26
|
|
|
27
27
|
### Size
|
|
28
28
|
|
|
29
|
-
Set `size` to `small`, `medium`, or `large`. It defaults to `medium`, or `small` inside [ListGroup](
|
|
29
|
+
Set `size` to `small`, `medium`, or `large`. It defaults to `medium`, or `small` inside [ListGroup](list-group.md).
|
|
30
30
|
|
|
31
31
|
```tsx
|
|
32
32
|
import { style, Switch } from '@tempoxyz/ds'
|
|
@@ -147,9 +147,9 @@ import { Switch } from '@tempoxyz/ds'
|
|
|
147
147
|
|
|
148
148
|
### When Not to Use
|
|
149
149
|
|
|
150
|
-
* Use a [Checkbox](
|
|
151
|
-
* Use a [RadioGroup](
|
|
152
|
-
* Use a [Button](
|
|
150
|
+
* Use a [Checkbox](checkbox.md) for a choice that applies on form submit, or for agreeing to terms.
|
|
151
|
+
* Use a [RadioGroup](radio-group.md) or [ChoiceGroup](choice-group.md) when the two states aren't on and off, such as Daily and Weekly.
|
|
152
|
+
* Use a [Button](button.md) for a one-time action, such as Revoke key.
|
|
153
153
|
|
|
154
154
|
### Apply the Change Immediately
|
|
155
155
|
|
|
@@ -188,7 +188,7 @@ namespace styles {
|
|
|
188
188
|
}
|
|
189
189
|
```
|
|
190
190
|
|
|
191
|
-
**Don't:** Add a Save button to a group of switches. Use a [Checkbox](
|
|
191
|
+
**Don't:** Add a Save button to a group of switches. Use a [Checkbox](checkbox.md) in a
|
|
192
192
|
form instead.
|
|
193
193
|
|
|
194
194
|
```tsx
|
|
@@ -234,8 +234,8 @@ namespace styles {
|
|
|
234
234
|
}
|
|
235
235
|
```
|
|
236
236
|
|
|
237
|
-
* **Failed saves:** Update `checked` optimistically. If the save fails, flip it back and explain why in a [Toast](
|
|
238
|
-
* **Risky changes:** If a change needs confirmation, costs money, or can't be undone, use a [Button](
|
|
237
|
+
* **Failed saves:** Update `checked` optimistically. If the save fails, flip it back and explain why in a [Toast](toast.md).
|
|
238
|
+
* **Risky changes:** If a change needs confirmation, costs money, or can't be undone, use a [Button](button.md) and an [AlertDialog](alert-dialog.md).
|
|
239
239
|
* **Delayed changes:** If a change takes a few seconds to apply, state it in the description, such as Applies to new payments.
|
|
240
240
|
|
|
241
241
|
### Name the Setting, Not the State
|
|
@@ -455,18 +455,18 @@ A switch follows the [WAI-ARIA switch pattern](https://www.w3.org/WAI/ARIA/apg/p
|
|
|
455
455
|
|
|
456
456
|
## Related
|
|
457
457
|
|
|
458
|
-
[Checkbox](
|
|
458
|
+
[Checkbox](checkbox.md)
|
|
459
459
|
|
|
460
460
|
Use for choices submitted with a form.
|
|
461
461
|
|
|
462
|
-
[Field](
|
|
462
|
+
[Field](field.md)
|
|
463
463
|
|
|
464
464
|
Use for the label and description.
|
|
465
465
|
|
|
466
|
-
[Fieldset](
|
|
466
|
+
[Fieldset](fieldset.md)
|
|
467
467
|
|
|
468
468
|
Use for grouping settings rows.
|
|
469
469
|
|
|
470
|
-
[Toast](
|
|
470
|
+
[Toast](toast.md)
|
|
471
471
|
|
|
472
472
|
Use for reporting a failed save.
|
|
@@ -73,7 +73,7 @@ namespace styles {
|
|
|
73
73
|
|
|
74
74
|
### Two Lines
|
|
75
75
|
|
|
76
|
-
Set a second line in `Table.Subtitle`, lead the first cell with a `Table.LeadTile` or a [TokenLogo](
|
|
76
|
+
Set a second line in `Table.Subtitle`, lead the first cell with a `Table.LeadTile` or a [TokenLogo](token-logo.md), and set `muted` on a value that matters less, such as a zero amount.
|
|
77
77
|
|
|
78
78
|
```tsx
|
|
79
79
|
import { Inline, StatusChip, style, Surface, Table } from '@tempoxyz/ds'
|
|
@@ -538,10 +538,10 @@ import { Table } from '@tempoxyz/ds'
|
|
|
538
538
|
|
|
539
539
|
### When Not to Use
|
|
540
540
|
|
|
541
|
-
* Use [ListGroup](
|
|
542
|
-
* Use [ListGroup](
|
|
543
|
-
* Use [Grid](
|
|
544
|
-
* Use a [Surface](
|
|
541
|
+
* Use [ListGroup](list-group.md) with `ListGroup.Label` for the fields of one record, such as a transaction's network, fee, and status.
|
|
542
|
+
* Use [ListGroup](list-group.md) with `action="navigation"` for a short list of pages or settings to open.
|
|
543
|
+
* Use [Grid](grid.md) or [Stack](stack.md) to arrange content.
|
|
544
|
+
* Use a [Surface](surface.md) with a large [Amount](amount.md) for one headline number, such as a balance or the current TPS.
|
|
545
545
|
|
|
546
546
|
### Align Numbers to the End
|
|
547
547
|
|
|
@@ -633,11 +633,11 @@ export function Demo() {
|
|
|
633
633
|
}
|
|
634
634
|
```
|
|
635
635
|
|
|
636
|
-
An [Amount](
|
|
636
|
+
An [Amount](amount.md) in a cell renders as a block and sets its own alignment. Give it `align="right"` in an end-aligned column.
|
|
637
637
|
|
|
638
638
|
### Truncate Hashes in the Middle
|
|
639
639
|
|
|
640
|
-
Set `mono` on cells with hashes, addresses, and commit IDs, and shorten them with `formatHex`. Link the row to a details view that shows the full value in a [Hex](
|
|
640
|
+
Set `mono` on cells with hashes, addresses, and commit IDs, and shorten them with `formatHex`. Link the row to a details view that shows the full value in a [Hex](hex.md) with `copy`.
|
|
641
641
|
|
|
642
642
|
**Do:** Keep the `0x` prefix and four characters on each side, such as `0x4f2a…91c3`.
|
|
643
643
|
|
|
@@ -717,7 +717,7 @@ export function Demo() {
|
|
|
717
717
|
|
|
718
718
|
### Pair Status Color With Words
|
|
719
719
|
|
|
720
|
-
`status` colors a cell's text `positive`, `negative`, or `warning`. If the status needs more weight, use a [Badge](
|
|
720
|
+
`status` colors a cell's text `positive`, `negative`, or `warning`. If the status needs more weight, use a [Badge](badge.md) in the cell.
|
|
721
721
|
|
|
722
722
|
**Do:** Keep a word with each color, such as Failed.
|
|
723
723
|
|
|
@@ -890,7 +890,7 @@ export function Demo() {
|
|
|
890
890
|
### Keep Long Tables Readable
|
|
891
891
|
|
|
892
892
|
* **Sticky headers:** Set `sticky` on `Table.Head`, and place the table in a scrolling container with a fixed height.
|
|
893
|
-
* **Long histories:** Split them with [Pagination](
|
|
893
|
+
* **Long histories:** Split them with [Pagination](pagination.md).
|
|
894
894
|
|
|
895
895
|
### Match Density to the Data
|
|
896
896
|
|
|
@@ -938,30 +938,30 @@ With `interactive`, a focused body row shows an outline inside its edges. A focu
|
|
|
938
938
|
|
|
939
939
|
## Related
|
|
940
940
|
|
|
941
|
-
[ListGroup](
|
|
941
|
+
[ListGroup](list-group.md)
|
|
942
942
|
|
|
943
943
|
Use for the details of one record.
|
|
944
944
|
|
|
945
|
-
[Amount](
|
|
945
|
+
[Amount](amount.md)
|
|
946
946
|
|
|
947
947
|
Use for money and token amounts in cells.
|
|
948
948
|
|
|
949
|
-
[Hex](
|
|
949
|
+
[Hex](hex.md)
|
|
950
950
|
|
|
951
951
|
Use for addresses and hashes.
|
|
952
952
|
|
|
953
|
-
[Badge](
|
|
953
|
+
[Badge](badge.md)
|
|
954
954
|
|
|
955
955
|
Use for statuses.
|
|
956
956
|
|
|
957
|
-
[Pagination](
|
|
957
|
+
[Pagination](pagination.md)
|
|
958
958
|
|
|
959
959
|
Use for long histories.
|
|
960
960
|
|
|
961
|
-
[Tables and Lists](
|
|
961
|
+
[Tables and Lists](../patterns/tables-and-lists.md)
|
|
962
962
|
|
|
963
963
|
Covers choosing a layout.
|
|
964
964
|
|
|
965
|
-
[Dashboards](
|
|
965
|
+
[Dashboards](../patterns/dashboards.md)
|
|
966
966
|
|
|
967
967
|
Covers benchmark and metric views.
|
|
@@ -219,10 +219,10 @@ import { Tabs } from '@tempoxyz/ds'
|
|
|
219
219
|
|
|
220
220
|
### When Not to Use
|
|
221
221
|
|
|
222
|
-
* Use [ChoiceGroup](
|
|
223
|
-
* Use [SidebarMenu](
|
|
224
|
-
* Use [Stepper](
|
|
225
|
-
* Use [Accordion](
|
|
222
|
+
* Use [ChoiceGroup](choice-group.md) to pick a value that changes the current view, such as a chart's 1D, 1W, or 1M range.
|
|
223
|
+
* Use [SidebarMenu](sidebar-menu.md) or links to move between pages with their own URLs.
|
|
224
|
+
* Use [Stepper](stepper.md) for steps completed in order.
|
|
225
|
+
* Use [Accordion](accordion.md) to open several sections at once, or to compare them.
|
|
226
226
|
|
|
227
227
|
### Keep Tabs Few and Short
|
|
228
228
|
|
|
@@ -334,7 +334,7 @@ export function Demo() {
|
|
|
334
334
|
|
|
335
335
|
### Keep Panels Independent
|
|
336
336
|
|
|
337
|
-
Make each panel complete on its own. A Save button in one panel can't show errors in another, so use a [Stepper](
|
|
337
|
+
Make each panel complete on its own. A Save button in one panel can't show errors in another, so use a [Stepper](stepper.md) flow or one longer form.
|
|
338
338
|
|
|
339
339
|
**Do:** Keep the fields of one form together.
|
|
340
340
|
|
|
@@ -503,7 +503,7 @@ namespace styles {
|
|
|
503
503
|
|
|
504
504
|
### Expand Tabs in Narrow Containers
|
|
505
505
|
|
|
506
|
-
Set `expand` in a narrow container, such as a [Surface](
|
|
506
|
+
Set `expand` in a narrow container, such as a [Surface](surface.md) or a phone-width column. Leave it off across a wide page, where stretched tabs drift apart.
|
|
507
507
|
|
|
508
508
|
**Do:** Stretch the tabs across a narrow card with `expand`.
|
|
509
509
|
|
|
@@ -606,22 +606,22 @@ Set `activateOnFocus` on `Tabs.List` to activate a tab on focus. Use it only if
|
|
|
606
606
|
|
|
607
607
|
## Related
|
|
608
608
|
|
|
609
|
-
[ChoiceGroup](
|
|
609
|
+
[ChoiceGroup](choice-group.md)
|
|
610
610
|
|
|
611
611
|
Use for one value that changes a view.
|
|
612
612
|
|
|
613
|
-
[SidebarMenu](
|
|
613
|
+
[SidebarMenu](sidebar-menu.md)
|
|
614
614
|
|
|
615
615
|
Use for navigating between pages.
|
|
616
616
|
|
|
617
|
-
[Accordion](
|
|
617
|
+
[Accordion](accordion.md)
|
|
618
618
|
|
|
619
619
|
Use for sections you open together.
|
|
620
620
|
|
|
621
|
-
[Snippet](
|
|
621
|
+
[Snippet](snippet.md)
|
|
622
622
|
|
|
623
623
|
Use for a command with a tab per tool.
|
|
624
624
|
|
|
625
|
-
[Navigation](
|
|
625
|
+
[Navigation](../patterns/navigation.md)
|
|
626
626
|
|
|
627
627
|
Covers choosing between navigation components.
|
|
@@ -115,8 +115,8 @@ import { TempoLogo } from '@tempoxyz/ds'
|
|
|
115
115
|
|
|
116
116
|
### When Not to Use
|
|
117
117
|
|
|
118
|
-
* Use [NetworkLogo](
|
|
119
|
-
* Use [TokenLogo](
|
|
118
|
+
* Use [NetworkLogo](network-logo.md) for the Tempo network beside a token or an address.
|
|
119
|
+
* Use [TokenLogo](token-logo.md) for a token.
|
|
120
120
|
|
|
121
121
|
### Match the Type to the Space
|
|
122
122
|
|
|
@@ -176,10 +176,10 @@ A Tempo logo renders an `<svg>` that is hidden from screen readers by default. I
|
|
|
176
176
|
|
|
177
177
|
## Related
|
|
178
178
|
|
|
179
|
-
[NetworkLogo](
|
|
179
|
+
[NetworkLogo](network-logo.md)
|
|
180
180
|
|
|
181
181
|
Use for network logos.
|
|
182
182
|
|
|
183
|
-
[SidebarMenu](
|
|
183
|
+
[SidebarMenu](sidebar-menu.md)
|
|
184
184
|
|
|
185
185
|
Use for the app sidebar that holds the logo.
|
|
@@ -73,7 +73,7 @@ namespace styles {
|
|
|
73
73
|
|
|
74
74
|
### Search
|
|
75
75
|
|
|
76
|
-
Add a `Search` icon in `TextInput.Prefix` and a `TextInput.Clear`. The clear button shows once the field has a value, and Escape empties the field before it closes an enclosing [Dialog](
|
|
76
|
+
Add a `Search` icon in `TextInput.Prefix` and a `TextInput.Clear`. The clear button shows once the field has a value, and Escape empties the field before it closes an enclosing [Dialog](dialog.md).
|
|
77
77
|
|
|
78
78
|
```tsx
|
|
79
79
|
import { Field, style, TextInput } from '@tempoxyz/ds'
|
|
@@ -338,11 +338,11 @@ import { TextInput } from '@tempoxyz/ds'
|
|
|
338
338
|
|
|
339
339
|
### When Not to Use
|
|
340
340
|
|
|
341
|
-
* Use [AmountInput](
|
|
342
|
-
* Use [NumberField](
|
|
343
|
-
* Use [Textarea](
|
|
344
|
-
* Use [OtpField](
|
|
345
|
-
* Use [Select](
|
|
341
|
+
* Use [AmountInput](amount-input.md) for token and fiat amounts. It rejects non-decimals and adds a Max action.
|
|
342
|
+
* Use [NumberField](number-field.md) for quantities that step up and down.
|
|
343
|
+
* Use [Textarea](textarea.md) for text over one line.
|
|
344
|
+
* Use [OtpField](otp-field.md) for one-time passcodes.
|
|
345
|
+
* Use [Select](select.md) or [Combobox](combobox.md) if the value must come from a list, and [Autocomplete](autocomplete.md) if a list only suggests values.
|
|
346
346
|
|
|
347
347
|
### Always Show a Label
|
|
348
348
|
|
|
@@ -563,11 +563,11 @@ Set `type`, `inputMode`, and `autoComplete` on `TextInput.Control` to select the
|
|
|
563
563
|
|
|
564
564
|
Avoid `type="number"` for amounts and identifiers. It drops leading zeros, accepts `e`, and some browsers change the value on scroll.
|
|
565
565
|
|
|
566
|
-
For labels, descriptions, errors, and validation timing, see [Field](
|
|
566
|
+
For labels, descriptions, errors, and validation timing, see [Field](field.md).
|
|
567
567
|
|
|
568
568
|
## Accessibility
|
|
569
569
|
|
|
570
|
-
An input renders a native `<input>` inside a styled group. Inside a `Field.Root`, it links to the label, description, and error. See [Accessibility](
|
|
570
|
+
An input renders a native `<input>` inside a styled group. Inside a `Field.Root`, it links to the label, description, and error. See [Accessibility](../foundations/accessibility.md) for the baseline.
|
|
571
571
|
|
|
572
572
|
### Semantics
|
|
573
573
|
|
|
@@ -599,26 +599,26 @@ All other keys follow the native input.
|
|
|
599
599
|
|
|
600
600
|
## Related
|
|
601
601
|
|
|
602
|
-
[Field](
|
|
602
|
+
[Field](field.md)
|
|
603
603
|
|
|
604
604
|
Use for labels, descriptions, and errors.
|
|
605
605
|
|
|
606
|
-
[AmountInput](
|
|
606
|
+
[AmountInput](amount-input.md)
|
|
607
607
|
|
|
608
608
|
Use for token and fiat amounts.
|
|
609
609
|
|
|
610
|
-
[Textarea](
|
|
610
|
+
[Textarea](textarea.md)
|
|
611
611
|
|
|
612
612
|
Use for multi-line text.
|
|
613
613
|
|
|
614
|
-
[Combobox](
|
|
614
|
+
[Combobox](combobox.md)
|
|
615
615
|
|
|
616
616
|
Use for picking from a long list by typing.
|
|
617
617
|
|
|
618
|
-
[Forms](
|
|
618
|
+
[Forms](../patterns/forms.md)
|
|
619
619
|
|
|
620
620
|
Covers laying out fields and actions.
|
|
621
621
|
|
|
622
|
-
[Errors and Validation](
|
|
622
|
+
[Errors and Validation](../patterns/errors-and-validation.md)
|
|
623
623
|
|
|
624
624
|
Covers when and where to show errors.
|
|
@@ -186,9 +186,9 @@ import { Textarea } from '@tempoxyz/ds'
|
|
|
186
186
|
|
|
187
187
|
### When Not to Use
|
|
188
188
|
|
|
189
|
-
* Use [TextInput](
|
|
190
|
-
* Use [Snippet](
|
|
191
|
-
* Use [Select](
|
|
189
|
+
* Use [TextInput](text-input.md) for single-line values, even long ones such as a 0x address or a webhook URL.
|
|
190
|
+
* Use [Snippet](snippet.md) for a command or JSON payload to copy, not edit.
|
|
191
|
+
* Use [Select](select.md), [RadioGroup](radio-group.md), or [Checkbox](checkbox.md) when the answer fits a known set of options.
|
|
192
192
|
|
|
193
193
|
### Set Rows to the Expected Length
|
|
194
194
|
|
|
@@ -335,18 +335,18 @@ All other keys follow the native textarea.
|
|
|
335
335
|
|
|
336
336
|
## Related
|
|
337
337
|
|
|
338
|
-
[TextInput](
|
|
338
|
+
[TextInput](text-input.md)
|
|
339
339
|
|
|
340
340
|
Use for single-line text.
|
|
341
341
|
|
|
342
|
-
[Field](
|
|
342
|
+
[Field](field.md)
|
|
343
343
|
|
|
344
344
|
Use for labels, descriptions, and errors.
|
|
345
345
|
|
|
346
|
-
[Snippet](
|
|
346
|
+
[Snippet](snippet.md)
|
|
347
347
|
|
|
348
348
|
Use for read-only code and values.
|
|
349
349
|
|
|
350
|
-
[Forms](
|
|
350
|
+
[Forms](../patterns/forms.md)
|
|
351
351
|
|
|
352
352
|
Covers laying out fields and actions.
|
|
@@ -190,15 +190,15 @@ import { Toast } from '@tempoxyz/ds'
|
|
|
190
190
|
|
|
191
191
|
### When Not to Use
|
|
192
192
|
|
|
193
|
-
* Use an [Alert](
|
|
194
|
-
* Use a [Banner](
|
|
195
|
-
* Use an [AlertDialog](
|
|
196
|
-
* Use `Field.Error` from [Field](
|
|
197
|
-
* Use `loading` on a [Button](
|
|
193
|
+
* Use an [Alert](alert.md) for an error or warning that must stay beside its content, such as a failed payment.
|
|
194
|
+
* Use a [Banner](banner.md) for a condition that affects the whole product, such as an outage.
|
|
195
|
+
* Use an [AlertDialog](alert-dialog.md) for a decision before an action continues.
|
|
196
|
+
* Use `Field.Error` from [Field](field.md) for validation messages on an input.
|
|
197
|
+
* Use `loading` on a [Button](button.md), or [Progress](progress.md), for work that still runs.
|
|
198
198
|
|
|
199
199
|
### Keep Required Actions Out of Toasts
|
|
200
200
|
|
|
201
|
-
A toast dismisses itself, and keyboard users must press F6 to reach it. Put required steps in the page or in an [AlertDialog](
|
|
201
|
+
A toast dismisses itself, and keyboard users must press F6 to reach it. Put required steps in the page or in an [AlertDialog](alert-dialog.md).
|
|
202
202
|
|
|
203
203
|
**Do:** Confirm a finished action and include the detail that identifies it.
|
|
204
204
|
|
|
@@ -513,23 +513,23 @@ Toasts never take focus on their own. Don't move focus to a new toast yourself.
|
|
|
513
513
|
|
|
514
514
|
### Your Responsibilities
|
|
515
515
|
|
|
516
|
-
* **Reserve High Priority (priority: 'high'):** Use it only for urgent messages. Show critical errors inline or in a [Dialog](
|
|
516
|
+
* **Reserve High Priority (priority: 'high'):** Use it only for urgent messages. Show critical errors inline or in a [Dialog](dialog.md).
|
|
517
517
|
* **Render One Viewport (F6):** Render one viewport per app, so the shortcut always reaches it.
|
|
518
518
|
|
|
519
519
|
## Related
|
|
520
520
|
|
|
521
|
-
[Alert](
|
|
521
|
+
[Alert](alert.md)
|
|
522
522
|
|
|
523
523
|
Use for messages that stay beside their content.
|
|
524
524
|
|
|
525
|
-
[Banner](
|
|
525
|
+
[Banner](banner.md)
|
|
526
526
|
|
|
527
527
|
Use for messages about the whole product.
|
|
528
528
|
|
|
529
|
-
[AlertDialog](
|
|
529
|
+
[AlertDialog](alert-dialog.md)
|
|
530
530
|
|
|
531
531
|
Use for decisions before an action continues.
|
|
532
532
|
|
|
533
|
-
[Feedback and Status](
|
|
533
|
+
[Feedback and Status](../patterns/feedback-and-status.md)
|
|
534
534
|
|
|
535
535
|
Covers choosing a message component.
|