@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
|
@@ -107,9 +107,9 @@ import { SecretValue } from '@tempoxyz/ds'
|
|
|
107
107
|
|
|
108
108
|
### When Not to Use
|
|
109
109
|
|
|
110
|
-
* Use [Snippet](
|
|
111
|
-
* Use [Hex](
|
|
112
|
-
* Use [TextInput](
|
|
110
|
+
* Use [Snippet](snippet.md) for commands and values that are not secret, such as a webhook URL.
|
|
111
|
+
* Use [Hex](hex.md) with `copy` for public addresses and transaction hashes.
|
|
112
|
+
* Use [TextInput](text-input.md) with `type="password"` when people enter a secret.
|
|
113
113
|
|
|
114
114
|
### Start Masked
|
|
115
115
|
|
|
@@ -385,22 +385,22 @@ SecretValue renders a named `group` with a masked `<code>` value, a reveal toggl
|
|
|
385
385
|
|
|
386
386
|
## Related
|
|
387
387
|
|
|
388
|
-
[Snippet](
|
|
388
|
+
[Snippet](snippet.md)
|
|
389
389
|
|
|
390
390
|
Use for values that aren't secret.
|
|
391
391
|
|
|
392
|
-
[CopyButton](
|
|
392
|
+
[CopyButton](copy-button.md)
|
|
393
393
|
|
|
394
394
|
Use for copying beside your own layout.
|
|
395
395
|
|
|
396
|
-
[TextInput](
|
|
396
|
+
[TextInput](text-input.md)
|
|
397
397
|
|
|
398
398
|
Use for entering a secret.
|
|
399
399
|
|
|
400
|
-
[Destructive Actions](
|
|
400
|
+
[Destructive Actions](../patterns/destructive-actions.md)
|
|
401
401
|
|
|
402
402
|
Covers revoking and rotating keys.
|
|
403
403
|
|
|
404
|
-
[Tempo Console](
|
|
404
|
+
[Tempo Console](../products/tempo-console.md)
|
|
405
405
|
|
|
406
406
|
Covers API key screens.
|
|
@@ -8,7 +8,7 @@ Figma: [Inputs/Select](https://www.figma.com/design/yE96kcymnNR88PJp6G1sPs?node-
|
|
|
8
8
|
|
|
9
9
|
## Overview
|
|
10
10
|
|
|
11
|
-
Select renders a trigger that opens a listbox, for choosing one value from a short list. If the options fit on screen, prefer [ChoiceGroup](
|
|
11
|
+
Select renders a trigger that opens a listbox, for choosing one value from a short list. If the options fit on screen, prefer [ChoiceGroup](choice-group.md).
|
|
12
12
|
|
|
13
13
|
## Examples
|
|
14
14
|
|
|
@@ -376,15 +376,15 @@ import { Select } from '@tempoxyz/ds'
|
|
|
376
376
|
|
|
377
377
|
* Choose one value from more than five scannable options, such as an asset or a network.
|
|
378
378
|
* Filter a dashboard or table where space is tight, such as a chart's time range.
|
|
379
|
-
* Set `multiple` to pick several values when a [CheckboxGroup](
|
|
379
|
+
* Set `multiple` to pick several values when a [CheckboxGroup](checkbox-group.md) takes too much room.
|
|
380
380
|
|
|
381
381
|
### When Not to Use
|
|
382
382
|
|
|
383
|
-
* Use [RadioGroup](
|
|
384
|
-
* Use [ChoiceGroup](
|
|
385
|
-
* Use [Combobox](
|
|
386
|
-
* Use [Autocomplete](
|
|
387
|
-
* Use [Menu](
|
|
383
|
+
* Use [RadioGroup](radio-group.md) for two to five options compared side by side.
|
|
384
|
+
* Use [ChoiceGroup](choice-group.md) for two to four short options that switch a view, such as 1H, 24H, and 7D.
|
|
385
|
+
* Use [Combobox](combobox.md) for a long list filtered by typing, such as every token on Tempo.
|
|
386
|
+
* Use [Autocomplete](autocomplete.md) when any typed text is a valid value.
|
|
387
|
+
* Use [Menu](menu.md) for a list of actions. A select holds a value.
|
|
388
388
|
|
|
389
389
|
### Show Labels, Not Raw Values
|
|
390
390
|
|
|
@@ -566,7 +566,7 @@ If a guess could cost something, such as a withdrawal network, leave the select
|
|
|
566
566
|
|
|
567
567
|
### Keep Option Rows Scannable
|
|
568
568
|
|
|
569
|
-
* **Prefix and suffix:** Put a token icon or [Avatar](
|
|
569
|
+
* **Prefix and suffix:** Put a token icon or [Avatar](avatar.md) in `Select.ItemPrefix`, and a secondary value such as a balance in `Select.ItemSuffix`.
|
|
570
570
|
* **Typeahead label:** If a row holds a prefix or suffix, give `Select.Item` a `label`.
|
|
571
571
|
* **Text length:** Keep `Select.ItemText` short. It truncates beside a prefix or suffix.
|
|
572
572
|
* **First words:** Start options with distinct words, in a parallel format, such as Last hour and Last 24 hours. Typeahead jumps by first letters.
|
|
@@ -730,22 +730,22 @@ Select handles arrow keys, typeahead, and Escape. It follows the [WAI-ARIA Autho
|
|
|
730
730
|
|
|
731
731
|
## Related
|
|
732
732
|
|
|
733
|
-
[Combobox](
|
|
733
|
+
[Combobox](combobox.md)
|
|
734
734
|
|
|
735
735
|
Use for long, filterable lists.
|
|
736
736
|
|
|
737
|
-
[RadioGroup](
|
|
737
|
+
[RadioGroup](radio-group.md)
|
|
738
738
|
|
|
739
739
|
Use for a few options shown at once.
|
|
740
740
|
|
|
741
|
-
[ChoiceGroup](
|
|
741
|
+
[ChoiceGroup](choice-group.md)
|
|
742
742
|
|
|
743
743
|
Use for switching views.
|
|
744
744
|
|
|
745
|
-
[Menu](
|
|
745
|
+
[Menu](menu.md)
|
|
746
746
|
|
|
747
747
|
Use for lists of actions.
|
|
748
748
|
|
|
749
|
-
[Dashboards](
|
|
749
|
+
[Dashboards](../patterns/dashboards.md)
|
|
750
750
|
|
|
751
751
|
Covers filter bars and controls.
|
|
@@ -108,12 +108,12 @@ import { Separator } from '@tempoxyz/ds'
|
|
|
108
108
|
|
|
109
109
|
### When Not to Use
|
|
110
110
|
|
|
111
|
-
* Use [ListGroup](
|
|
112
|
-
* Use `SidebarMenu.Group` in a [SidebarMenu](
|
|
111
|
+
* Use [ListGroup](list-group.md) or [Table](table.md) for lists of records. They draw their own dividers.
|
|
112
|
+
* Use `SidebarMenu.Group` in a [SidebarMenu](sidebar-menu.md) and `Menu.Separator` in a [Menu](menu.md).
|
|
113
113
|
|
|
114
114
|
### Try Space First
|
|
115
115
|
|
|
116
|
-
A larger gap separates most groups, such as a [Stack](
|
|
116
|
+
A larger gap separates most groups, such as a [Stack](stack.md) with `gap="24"`. Add a separator only if the groups still run together, or one row must stand apart, such as a total.
|
|
117
117
|
|
|
118
118
|
**Do:** Separate the total from the line items above it.
|
|
119
119
|
|
|
@@ -226,7 +226,7 @@ namespace styles {
|
|
|
226
226
|
|
|
227
227
|
### Keep Rules Inside Containers
|
|
228
228
|
|
|
229
|
-
The edge of a [Surface](
|
|
229
|
+
The edge of a [Surface](surface.md) or popup already ends the group.
|
|
230
230
|
|
|
231
231
|
**Do:** Place separators only between groups.
|
|
232
232
|
|
|
@@ -366,14 +366,14 @@ namespace styles {
|
|
|
366
366
|
|
|
367
367
|
## Related
|
|
368
368
|
|
|
369
|
-
[Stack](
|
|
369
|
+
[Stack](stack.md)
|
|
370
370
|
|
|
371
371
|
Use for spacing groups apart.
|
|
372
372
|
|
|
373
|
-
[ListGroup](
|
|
373
|
+
[ListGroup](list-group.md)
|
|
374
374
|
|
|
375
375
|
Use for divided lists.
|
|
376
376
|
|
|
377
|
-
[Menu](
|
|
377
|
+
[Menu](menu.md)
|
|
378
378
|
|
|
379
379
|
Use for separators between menu groups.
|
|
@@ -346,14 +346,14 @@ import { SidebarMenu } from '@tempoxyz/ds'
|
|
|
346
346
|
### When to Use
|
|
347
347
|
|
|
348
348
|
* Navigate a product with five or more destinations, such as Home, API keys, Webhooks, Team, and Settings.
|
|
349
|
-
* Navigate inside `AppShell.Sidebar` ([AppShell](
|
|
349
|
+
* Navigate inside `AppShell.Sidebar` ([AppShell](app-shell.md)), which moves the menu into a drawer below 1024px.
|
|
350
350
|
|
|
351
351
|
### When Not to Use
|
|
352
352
|
|
|
353
|
-
* Use [Menu](
|
|
354
|
-
* Use [Tabs](
|
|
355
|
-
* Use [Breadcrumbs](
|
|
356
|
-
* Use [ListGroup](
|
|
353
|
+
* Use [Menu](menu.md) for a list of actions, such as Rename key or Revoke key.
|
|
354
|
+
* Use [Tabs](tabs.md) to switch views inside one page.
|
|
355
|
+
* Use [Breadcrumbs](breadcrumbs.md) to show where a deeply nested page sits.
|
|
356
|
+
* Use [ListGroup](list-group.md) for a settings page that lists its subpages in the content.
|
|
357
357
|
|
|
358
358
|
### Group Related Destinations
|
|
359
359
|
|
|
@@ -470,7 +470,7 @@ namespace styles {
|
|
|
470
470
|
* **Per group:** Three to seven items, in at most four or five groups.
|
|
471
471
|
* **Single items:** Avoid groups of one, except an unlabelled first group.
|
|
472
472
|
* **Long menus:** If a menu has 15 or more items, set `size="small"` for 32px rows and 16px icons.
|
|
473
|
-
* **Overflow:** Move rare pages onto a hub page built from [ListGroup](
|
|
473
|
+
* **Overflow:** Move rare pages onto a hub page built from [ListGroup](list-group.md), such as Settings.
|
|
474
474
|
|
|
475
475
|
**Do:** Put several related items in each group.
|
|
476
476
|
|
|
@@ -738,7 +738,7 @@ namespace styles {
|
|
|
738
738
|
|
|
739
739
|
### Put Workspace and Account Controls at the Edges
|
|
740
740
|
|
|
741
|
-
In an [AppShell](
|
|
741
|
+
In an [AppShell](app-shell.md), put the project switcher in `AppShell.SidebarHeader` and the account menu in a `SidebarMenu.Account` at the end of `AppShell.SidebarFooter`. Both open a [Menu](menu.md): trigger the account menu with a `SidebarMenu.AccountRow`, and render the switcher with `render={<button type="button" />}`.
|
|
742
742
|
|
|
743
743
|
**Do:** Pin the project switcher to the top and the account to the bottom.
|
|
744
744
|
|
|
@@ -905,18 +905,18 @@ Focus stays on a submenu trigger when it toggles. After it opens, the next Tab m
|
|
|
905
905
|
|
|
906
906
|
## Related
|
|
907
907
|
|
|
908
|
-
[AppShell](
|
|
908
|
+
[AppShell](app-shell.md)
|
|
909
909
|
|
|
910
910
|
Use for the frame that holds the sidebar.
|
|
911
911
|
|
|
912
|
-
[Menu](
|
|
912
|
+
[Menu](menu.md)
|
|
913
913
|
|
|
914
914
|
Use for lists of actions.
|
|
915
915
|
|
|
916
|
-
[Tabs](
|
|
916
|
+
[Tabs](tabs.md)
|
|
917
917
|
|
|
918
918
|
Use for views within one page.
|
|
919
919
|
|
|
920
|
-
[Navigation](
|
|
920
|
+
[Navigation](../patterns/navigation.md)
|
|
921
921
|
|
|
922
922
|
Covers choosing between navigation components.
|
|
@@ -112,10 +112,10 @@ import { Skeleton } from '@tempoxyz/ds'
|
|
|
112
112
|
|
|
113
113
|
### When Not to Use
|
|
114
114
|
|
|
115
|
-
* Use [Spinner](
|
|
116
|
-
* Use [Progress](
|
|
117
|
-
* Use `loading` on a [Button](
|
|
118
|
-
* Use [Empty](
|
|
115
|
+
* Use [Spinner](spinner.md) when the shape of the result is unknown, or for a busy control.
|
|
116
|
+
* Use [Progress](progress.md) for a long task with measurable work.
|
|
117
|
+
* Use `loading` on a [Button](button.md) while its action runs.
|
|
118
|
+
* Use [Empty](empty.md) when the request returns no records.
|
|
119
119
|
|
|
120
120
|
### Match the Final Content's Shape
|
|
121
121
|
|
|
@@ -480,7 +480,7 @@ namespace styles {
|
|
|
480
480
|
|
|
481
481
|
* **Fast Responses (Under 300 ms):** Delay the skeleton, so the content renders without a flash.
|
|
482
482
|
* **Typical Waits (300 ms to 10 s):** Show the skeleton.
|
|
483
|
-
* **Long Waits (Over 10 s):** Show [Progress](
|
|
483
|
+
* **Long Waits (Over 10 s):** Show [Progress](progress.md). See [Loading](../patterns/loading.md).
|
|
484
484
|
|
|
485
485
|
## Accessibility
|
|
486
486
|
|
|
@@ -500,18 +500,18 @@ Skeleton renders a `div` that marks its content busy and hides it until `show={f
|
|
|
500
500
|
|
|
501
501
|
## Related
|
|
502
502
|
|
|
503
|
-
[Spinner](
|
|
503
|
+
[Spinner](spinner.md)
|
|
504
504
|
|
|
505
505
|
Use for loading with an unknown shape.
|
|
506
506
|
|
|
507
|
-
[Progress](
|
|
507
|
+
[Progress](progress.md)
|
|
508
508
|
|
|
509
509
|
Use for measurable work.
|
|
510
510
|
|
|
511
|
-
[Empty](
|
|
511
|
+
[Empty](empty.md)
|
|
512
512
|
|
|
513
513
|
Use for a region with nothing to show.
|
|
514
514
|
|
|
515
|
-
[Loading](
|
|
515
|
+
[Loading](../patterns/loading.md)
|
|
516
516
|
|
|
517
517
|
Covers choosing a loading indicator.
|
|
@@ -134,9 +134,9 @@ import { Slider } from '@tempoxyz/ds'
|
|
|
134
134
|
|
|
135
135
|
### When Not to Use
|
|
136
136
|
|
|
137
|
-
* Use [AmountInput](
|
|
138
|
-
* Use [ChoiceGroup](
|
|
139
|
-
* Use [Progress](
|
|
137
|
+
* Use [AmountInput](amount-input.md) for amounts and [NumberField](number-field.md) for exact counts.
|
|
138
|
+
* Use [ChoiceGroup](choice-group.md) for a few presets, such as 25%, 50%, and Max.
|
|
139
|
+
* Use [Progress](progress.md) or [Gauge](gauge.md) for a value that people cannot change.
|
|
140
140
|
|
|
141
141
|
### Always Show the Value
|
|
142
142
|
|
|
@@ -228,7 +228,7 @@ namespace styles {
|
|
|
228
228
|
|
|
229
229
|
### Pair With an Input for Exact Values
|
|
230
230
|
|
|
231
|
-
Some people cannot drag. Where precision matters, add a [NumberField](
|
|
231
|
+
Some people cannot drag. Where precision matters, add a [NumberField](number-field.md) beside the slider.
|
|
232
232
|
|
|
233
233
|
**Do:** Share one value between the slider and the input.
|
|
234
234
|
|
|
@@ -522,18 +522,18 @@ Every drag has a single-press alternative ([SC 2.5.7](https://www.w3.org/WAI/WCA
|
|
|
522
522
|
|
|
523
523
|
## Related
|
|
524
524
|
|
|
525
|
-
[NumberField](
|
|
525
|
+
[NumberField](number-field.md)
|
|
526
526
|
|
|
527
527
|
Use for exact numbers.
|
|
528
528
|
|
|
529
|
-
[ChoiceGroup](
|
|
529
|
+
[ChoiceGroup](choice-group.md)
|
|
530
530
|
|
|
531
531
|
Use for a few preset values.
|
|
532
532
|
|
|
533
|
-
[Progress](
|
|
533
|
+
[Progress](progress.md)
|
|
534
534
|
|
|
535
535
|
Use for showing progress you can't change.
|
|
536
536
|
|
|
537
|
-
[Dashboards](
|
|
537
|
+
[Dashboards](../patterns/dashboards.md)
|
|
538
538
|
|
|
539
539
|
Covers chart controls and filters.
|
|
@@ -77,7 +77,7 @@ namespace styles {
|
|
|
77
77
|
|
|
78
78
|
### Tabs
|
|
79
79
|
|
|
80
|
-
Pass a [Tabs](
|
|
80
|
+
Pass a [Tabs](tabs.md) list as `tabs` to switch between commands. Wrap the snippet in `Tabs.Root`, and pass the command of the active tab as `children`.
|
|
81
81
|
|
|
82
82
|
```tsx
|
|
83
83
|
import { Snippet, style, Tabs } from '@tempoxyz/ds'
|
|
@@ -159,10 +159,10 @@ import { Snippet, Tabs } from '@tempoxyz/ds'
|
|
|
159
159
|
|
|
160
160
|
### When Not to Use
|
|
161
161
|
|
|
162
|
-
* Use [SecretValue](
|
|
163
|
-
* Use [Hex](
|
|
164
|
-
* Use [CopyButton](
|
|
165
|
-
* Use [Tabs](
|
|
162
|
+
* Use [SecretValue](secret-value.md) for API keys and other secrets, which stay masked.
|
|
163
|
+
* Use [Hex](hex.md) with `copy` for addresses and hashes, which truncates the middle to fit.
|
|
164
|
+
* Use [CopyButton](copy-button.md) to add copying beside your own text.
|
|
165
|
+
* Use [Tabs](tabs.md) with panels to switch content other than commands.
|
|
166
166
|
|
|
167
167
|
### Copy Exactly What You Show
|
|
168
168
|
|
|
@@ -403,22 +403,22 @@ A click anywhere on the command also copies, unless your `onClick` calls `preven
|
|
|
403
403
|
|
|
404
404
|
## Related
|
|
405
405
|
|
|
406
|
-
[CopyButton](
|
|
406
|
+
[CopyButton](copy-button.md)
|
|
407
407
|
|
|
408
408
|
Use for copying beside your own layout.
|
|
409
409
|
|
|
410
|
-
[SecretValue](
|
|
410
|
+
[SecretValue](secret-value.md)
|
|
411
411
|
|
|
412
412
|
Use for secrets.
|
|
413
413
|
|
|
414
|
-
[Hex](
|
|
414
|
+
[Hex](hex.md)
|
|
415
415
|
|
|
416
416
|
Use for addresses and hashes.
|
|
417
417
|
|
|
418
|
-
[Kbd](
|
|
418
|
+
[Kbd](kbd.md)
|
|
419
419
|
|
|
420
420
|
Use for keyboard shortcuts.
|
|
421
421
|
|
|
422
|
-
[Tabs](
|
|
422
|
+
[Tabs](tabs.md)
|
|
423
423
|
|
|
424
424
|
Use for switching between related views.
|
|
@@ -78,10 +78,10 @@ import { Spinner } from '@tempoxyz/ds'
|
|
|
78
78
|
|
|
79
79
|
### When Not to Use
|
|
80
80
|
|
|
81
|
-
* Use `loading` on a [Button](
|
|
82
|
-
* Use [Skeleton](
|
|
83
|
-
* Use [Progress](
|
|
84
|
-
* Use [LoadingDots](
|
|
81
|
+
* Use `loading` on a [Button](button.md) while its action runs, not a spinner beside it.
|
|
82
|
+
* Use [Skeleton](skeleton.md) for content with a known shape, such as activity rows or metric tiles.
|
|
83
|
+
* Use [Progress](progress.md) for measurable work, or any wait over about 10 seconds.
|
|
84
|
+
* Use [LoadingDots](loading-dots.md) for a short wait inside a line of text.
|
|
85
85
|
|
|
86
86
|
### Match the Indicator to the Wait
|
|
87
87
|
|
|
@@ -89,7 +89,7 @@ import { Spinner } from '@tempoxyz/ds'
|
|
|
89
89
|
* **About 300 ms to 10 Seconds (Spinner):** Mark the busy region or control.
|
|
90
90
|
* **Over About 10 Seconds (Progress):** Show a value for measurable work.
|
|
91
91
|
|
|
92
|
-
Once a spinner appears, keep it for at least about 500 ms so it doesn't flash. For whole pages, see [Loading](
|
|
92
|
+
Once a spinner appears, keep it for at least about 500 ms so it doesn't flash. For whole pages, see [Loading](../patterns/loading.md).
|
|
93
93
|
|
|
94
94
|
### Use One Spinner per Region
|
|
95
95
|
|
|
@@ -174,7 +174,7 @@ namespace styles {
|
|
|
174
174
|
|
|
175
175
|
### Place It Beside a Status Line
|
|
176
176
|
|
|
177
|
-
Show the spinner inline beside a short status line, such as Approving. For a pending action, use `loading` on a [Button](
|
|
177
|
+
Show the spinner inline beside a short status line, such as Approving. For a pending action, use `loading` on a [Button](button.md).
|
|
178
178
|
|
|
179
179
|
## Accessibility
|
|
180
180
|
|
|
@@ -190,27 +190,27 @@ A spinner renders an indeterminate `progressbar` named "Loading". It is not a li
|
|
|
190
190
|
### Your Responsibilities
|
|
191
191
|
|
|
192
192
|
* **Say What Is Loading (aria-label):** Name what loads, such as "Loading transactions". Several spinners named "Loading" are indistinguishable.
|
|
193
|
-
* **Announce the Result (SC 4.1.3):** A spinner isn't announced. Announce the result or an error in a status message or a [Toast](
|
|
193
|
+
* **Announce the Result (SC 4.1.3):** A spinner isn't announced. Announce the result or an error in a status message or a [Toast](toast.md).
|
|
194
194
|
* **Mark the Region Busy (aria-busy):** Set `aria-busy` on the loading region, so assistive technology waits for its content.
|
|
195
195
|
|
|
196
196
|
## Related
|
|
197
197
|
|
|
198
|
-
[Skeleton](
|
|
198
|
+
[Skeleton](skeleton.md)
|
|
199
199
|
|
|
200
200
|
Use for content with a known shape.
|
|
201
201
|
|
|
202
|
-
[Progress](
|
|
202
|
+
[Progress](progress.md)
|
|
203
203
|
|
|
204
204
|
Use for measurable work.
|
|
205
205
|
|
|
206
|
-
[LoadingDots](
|
|
206
|
+
[LoadingDots](loading-dots.md)
|
|
207
207
|
|
|
208
208
|
Use for a wait inside a line of text.
|
|
209
209
|
|
|
210
|
-
[Button](
|
|
210
|
+
[Button](button.md)
|
|
211
211
|
|
|
212
212
|
Use for an action's loading state.
|
|
213
213
|
|
|
214
|
-
[Loading](
|
|
214
|
+
[Loading](../patterns/loading.md)
|
|
215
215
|
|
|
216
216
|
Covers choosing a loading indicator.
|
|
@@ -70,9 +70,9 @@ import { SplitBar } from '@tempoxyz/ds'
|
|
|
70
70
|
|
|
71
71
|
### When Not to Use
|
|
72
72
|
|
|
73
|
-
* Use [BarChart](
|
|
74
|
-
* Use [Progress](
|
|
75
|
-
* Use [Gauge](
|
|
73
|
+
* Use [BarChart](bar-chart.md) for values over time.
|
|
74
|
+
* Use [Progress](progress.md) for the progress of one task.
|
|
75
|
+
* Use [Gauge](gauge.md) for one value against a limit.
|
|
76
76
|
|
|
77
77
|
### Show the Values
|
|
78
78
|
|
|
@@ -130,10 +130,10 @@ A split bar renders a `<div>` whose bar is hidden from screen readers. The legen
|
|
|
130
130
|
|
|
131
131
|
## Related
|
|
132
132
|
|
|
133
|
-
[BarChart](
|
|
133
|
+
[BarChart](bar-chart.md)
|
|
134
134
|
|
|
135
135
|
Use for values over time.
|
|
136
136
|
|
|
137
|
-
[Progress](
|
|
137
|
+
[Progress](progress.md)
|
|
138
138
|
|
|
139
139
|
Use for the progress of one task.
|
|
@@ -91,14 +91,14 @@ import { Menu, SplitButton } from '@tempoxyz/ds'
|
|
|
91
91
|
|
|
92
92
|
### When Not to Use
|
|
93
93
|
|
|
94
|
-
* Use a [Button](
|
|
95
|
-
* Use two [Buttons](
|
|
96
|
-
* Use [Select](
|
|
97
|
-
* Use a separate [Button](
|
|
94
|
+
* Use a [Button](button.md) with a [Menu](menu.md) when no option is the clear default.
|
|
95
|
+
* Use two [Buttons](button.md) when both actions matter equally.
|
|
96
|
+
* Use [Select](select.md) or [ChoiceGroup](choice-group.md) to choose a value or mode, not to run an action.
|
|
97
|
+
* Use a separate [Button](button.md) for destructive actions, confirmed with an [AlertDialog](alert-dialog.md).
|
|
98
98
|
|
|
99
99
|
### Make the Action the Common Choice
|
|
100
100
|
|
|
101
|
-
`SplitButton.Action` runs without opening the menu, so give it the option most people pick. If people often open the menu first, move the popular option into the action, or use a [Menu](
|
|
101
|
+
`SplitButton.Action` runs without opening the menu, so give it the option most people pick. If people often open the menu first, move the popular option into the action, or use a [Menu](menu.md) button.
|
|
102
102
|
|
|
103
103
|
**Do:** Put the option most people pick on the action.
|
|
104
104
|
|
|
@@ -216,7 +216,7 @@ namespace styles {
|
|
|
216
216
|
|
|
217
217
|
### Keep Alternatives Related
|
|
218
218
|
|
|
219
|
-
Make every menu item a variation of the action, such as a different format or timing, and use two to five of them. Put unrelated commands, or a longer list, in a [Menu](
|
|
219
|
+
Make every menu item a variation of the action, such as a different format or timing, and use two to five of them. Put unrelated commands, or a longer list, in a [Menu](menu.md).
|
|
220
220
|
|
|
221
221
|
**Do:** Fill the menu with variations of the main action.
|
|
222
222
|
|
|
@@ -418,7 +418,7 @@ Repeat the verb in each menu item, such as Export JSON, not JSON, so each item r
|
|
|
418
418
|
|
|
419
419
|
## Accessibility
|
|
420
420
|
|
|
421
|
-
`SplitButton` renders a group with a primary [Button](
|
|
421
|
+
`SplitButton` renders a group with a primary [Button](button.md) and a menu trigger. The trigger follows the [WAI-ARIA menu button pattern](https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/).
|
|
422
422
|
|
|
423
423
|
### Semantics
|
|
424
424
|
|
|
@@ -447,18 +447,18 @@ Repeat the verb in each menu item, such as Export JSON, not JSON, so each item r
|
|
|
447
447
|
|
|
448
448
|
## Related
|
|
449
449
|
|
|
450
|
-
[Button](
|
|
450
|
+
[Button](button.md)
|
|
451
451
|
|
|
452
452
|
Use for single actions.
|
|
453
453
|
|
|
454
|
-
[Menu](
|
|
454
|
+
[Menu](menu.md)
|
|
455
455
|
|
|
456
456
|
Use for lists of actions without a default.
|
|
457
457
|
|
|
458
|
-
[AlertDialog](
|
|
458
|
+
[AlertDialog](alert-dialog.md)
|
|
459
459
|
|
|
460
460
|
Use for confirming destructive actions.
|
|
461
461
|
|
|
462
|
-
[Forms](
|
|
462
|
+
[Forms](../patterns/forms.md)
|
|
463
463
|
|
|
464
464
|
Covers placing actions.
|
|
@@ -117,13 +117,13 @@ import { Stack } from '@tempoxyz/ds'
|
|
|
117
117
|
|
|
118
118
|
### When Not to Use
|
|
119
119
|
|
|
120
|
-
* Use [Inline](
|
|
121
|
-
* Use [Grid](
|
|
122
|
-
* Use [ListGroup](
|
|
120
|
+
* Use [Inline](inline.md) for a horizontal row.
|
|
121
|
+
* Use [Grid](grid.md) for collections in columns.
|
|
122
|
+
* Use [ListGroup](list-group.md) for a divided list of settings or details.
|
|
123
123
|
|
|
124
124
|
### Use Gap Instead of Margins
|
|
125
125
|
|
|
126
|
-
Space siblings with `gap`, not child margins. See [Layout](
|
|
126
|
+
Space siblings with `gap`, not child margins. See [Layout](../foundations/layout.md).
|
|
127
127
|
|
|
128
128
|
**Do:** Set one `gap` on the Stack.
|
|
129
129
|
|
|
@@ -282,18 +282,18 @@ Stack adds no role, name, or keyboard behavior.
|
|
|
282
282
|
|
|
283
283
|
## Related
|
|
284
284
|
|
|
285
|
-
[Inline](
|
|
285
|
+
[Inline](inline.md)
|
|
286
286
|
|
|
287
287
|
Use for horizontal rows.
|
|
288
288
|
|
|
289
|
-
[Grid](
|
|
289
|
+
[Grid](grid.md)
|
|
290
290
|
|
|
291
291
|
Use for columns of items.
|
|
292
292
|
|
|
293
|
-
[Separator](
|
|
293
|
+
[Separator](separator.md)
|
|
294
294
|
|
|
295
295
|
Use for a rule between groups.
|
|
296
296
|
|
|
297
|
-
[Layout](
|
|
297
|
+
[Layout](../foundations/layout.md)
|
|
298
298
|
|
|
299
299
|
Covers the spacing scale.
|
|
@@ -134,9 +134,9 @@ import { StatusChip } from '@tempoxyz/ds'
|
|
|
134
134
|
|
|
135
135
|
### When Not to Use
|
|
136
136
|
|
|
137
|
-
* Use [Badge](
|
|
138
|
-
* Use [Alert](
|
|
139
|
-
* Use [AssetChip](
|
|
137
|
+
* Use [Badge](badge.md) for a category or an attribute that is not a status.
|
|
138
|
+
* Use [Alert](alert.md) to explain a status and what to do next.
|
|
139
|
+
* Use [AssetChip](asset-chip.md) for the assets a row supports.
|
|
140
140
|
|
|
141
141
|
### Pick the Intent From the Outcome
|
|
142
142
|
|
|
@@ -169,7 +169,7 @@ export function Demo() {
|
|
|
169
169
|
}
|
|
170
170
|
```
|
|
171
171
|
|
|
172
|
-
**Don't:** Use a status chip for a category. Use a [Badge](
|
|
172
|
+
**Don't:** Use a status chip for a category. Use a [Badge](badge.md).
|
|
173
173
|
|
|
174
174
|
```tsx
|
|
175
175
|
import { ListGroup, StatusChip } from '@tempoxyz/ds'
|
|
@@ -213,14 +213,14 @@ A status chip renders a `<span>` that screen readers read as text in place. The
|
|
|
213
213
|
|
|
214
214
|
## Related
|
|
215
215
|
|
|
216
|
-
[Badge](
|
|
216
|
+
[Badge](badge.md)
|
|
217
217
|
|
|
218
218
|
Use for categories and attributes.
|
|
219
219
|
|
|
220
|
-
[Alert](
|
|
220
|
+
[Alert](alert.md)
|
|
221
221
|
|
|
222
222
|
Use for a status that needs an explanation.
|
|
223
223
|
|
|
224
|
-
[StatusRow](
|
|
224
|
+
[StatusRow](status-row.md)
|
|
225
225
|
|
|
226
226
|
Use for a status that follows a payment in a row.
|
|
@@ -67,9 +67,9 @@ import { StatusIndicator } from '@tempoxyz/ds'
|
|
|
67
67
|
|
|
68
68
|
### When Not to Use
|
|
69
69
|
|
|
70
|
-
* Use a [StatusChip](
|
|
71
|
-
* Use a [Badge](
|
|
72
|
-
* Use an [Alert](
|
|
70
|
+
* Use a [StatusChip](status-chip.md) for the status of a payment or an authorization.
|
|
71
|
+
* Use a [Badge](badge.md) for a category or an attribute.
|
|
72
|
+
* Use an [Alert](alert.md) for a status that needs an explanation.
|
|
73
73
|
|
|
74
74
|
### Match the Intent to the Status
|
|
75
75
|
|
|
@@ -106,14 +106,14 @@ A status indicator renders a `<span>` with no role. The dot is hidden, so screen
|
|
|
106
106
|
|
|
107
107
|
## Related
|
|
108
108
|
|
|
109
|
-
[StatusChip](
|
|
109
|
+
[StatusChip](status-chip.md)
|
|
110
110
|
|
|
111
111
|
Use for the status of a payment or an authorization.
|
|
112
112
|
|
|
113
|
-
[Badge](
|
|
113
|
+
[Badge](badge.md)
|
|
114
114
|
|
|
115
115
|
Use for categories and attributes.
|
|
116
116
|
|
|
117
|
-
[Alert](
|
|
117
|
+
[Alert](alert.md)
|
|
118
118
|
|
|
119
119
|
Use for a status that needs an explanation.
|