@tempoxyz/ds 0.3.10 → 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 +12 -0
- package/dist/docs/index.md +145 -0
- package/dist/docs/marketing/introduction/getting-started.md +241 -0
- package/dist/docs/product/components/accordion.md +489 -0
- package/dist/docs/product/components/address-card.md +147 -0
- package/dist/docs/product/components/agent-logo.md +194 -0
- package/dist/docs/product/components/alert-dialog.md +631 -0
- package/dist/docs/product/components/alert.md +448 -0
- package/dist/docs/product/components/amount-input.md +305 -0
- package/dist/docs/product/components/amount.md +794 -0
- package/dist/docs/product/components/app-shell.md +559 -0
- package/dist/docs/product/components/asset-chip.md +294 -0
- package/dist/docs/product/components/autocomplete.md +620 -0
- package/dist/docs/product/components/avatar.md +321 -0
- package/dist/docs/product/components/badge.md +339 -0
- package/dist/docs/product/components/badged-logo.md +116 -0
- package/dist/docs/product/components/banner.md +379 -0
- package/dist/docs/product/components/bar-chart.md +208 -0
- package/dist/docs/product/components/breadcrumbs.md +380 -0
- package/dist/docs/product/components/button-group.md +286 -0
- package/dist/docs/product/components/button.md +650 -0
- package/dist/docs/product/components/calendar.md +375 -0
- package/dist/docs/product/components/callout.md +96 -0
- package/dist/docs/product/components/checkbox-group.md +521 -0
- package/dist/docs/product/components/checkbox.md +467 -0
- package/dist/docs/product/components/choice-group.md +516 -0
- package/dist/docs/product/components/choicebox.md +641 -0
- package/dist/docs/product/components/code.md +100 -0
- package/dist/docs/product/components/combobox.md +939 -0
- package/dist/docs/product/components/container.md +257 -0
- package/dist/docs/product/components/copy-button.md +642 -0
- package/dist/docs/product/components/date-picker.md +514 -0
- package/dist/docs/product/components/dialog.md +1332 -0
- package/dist/docs/product/components/drawer.md +966 -0
- package/dist/docs/product/components/empty.md +340 -0
- package/dist/docs/product/components/field.md +570 -0
- package/dist/docs/product/components/fieldset.md +398 -0
- package/dist/docs/product/components/frame.md +434 -0
- package/dist/docs/product/components/gauge.md +299 -0
- package/dist/docs/product/components/get-started-visual.md +117 -0
- package/dist/docs/product/components/grid.md +288 -0
- package/dist/docs/product/components/hero-visual.md +155 -0
- package/dist/docs/product/components/hex.md +487 -0
- package/dist/docs/product/components/icon-tile.md +292 -0
- package/dist/docs/product/components/identicon.md +371 -0
- package/dist/docs/product/components/inline.md +233 -0
- package/dist/docs/product/components/inset.md +225 -0
- package/dist/docs/product/components/kbd.md +423 -0
- package/dist/docs/product/components/list-group.md +981 -0
- package/dist/docs/product/components/loading-dots.md +237 -0
- package/dist/docs/product/components/menu.md +934 -0
- package/dist/docs/product/components/native-select.md +204 -0
- package/dist/docs/product/components/network-logo.md +248 -0
- package/dist/docs/product/components/number-field.md +543 -0
- package/dist/docs/product/components/otp-field.md +616 -0
- package/dist/docs/product/components/pagination.md +516 -0
- package/dist/docs/product/components/popover.md +544 -0
- package/dist/docs/product/components/progress.md +388 -0
- package/dist/docs/product/components/qr.md +314 -0
- package/dist/docs/product/components/radio-group.md +528 -0
- package/dist/docs/product/components/secret-value.md +406 -0
- package/dist/docs/product/components/select.md +751 -0
- package/dist/docs/product/components/separator.md +379 -0
- package/dist/docs/product/components/sidebar-menu.md +922 -0
- package/dist/docs/product/components/skeleton.md +517 -0
- package/dist/docs/product/components/slider.md +539 -0
- package/dist/docs/product/components/snippet.md +424 -0
- package/dist/docs/product/components/spinner.md +216 -0
- package/dist/docs/product/components/split-bar.md +139 -0
- package/dist/docs/product/components/split-button.md +464 -0
- package/dist/docs/product/components/stack.md +299 -0
- package/dist/docs/product/components/status-chip.md +226 -0
- package/dist/docs/product/components/status-indicator.md +119 -0
- package/dist/docs/product/components/status-row.md +174 -0
- package/dist/docs/product/components/stepper.md +451 -0
- package/dist/docs/product/components/success-hero.md +157 -0
- package/dist/docs/product/components/surface.md +639 -0
- package/dist/docs/product/components/switch.md +472 -0
- package/dist/docs/product/components/table.md +967 -0
- package/dist/docs/product/components/tabs.md +627 -0
- package/dist/docs/product/components/tempo-logo.md +185 -0
- package/dist/docs/product/components/text-input.md +624 -0
- package/dist/docs/product/components/textarea.md +352 -0
- package/dist/docs/product/components/toast.md +535 -0
- package/dist/docs/product/components/token-logo.md +371 -0
- package/dist/docs/product/components/token.md +247 -0
- package/dist/docs/product/components/tooltip.md +490 -0
- package/dist/docs/product/components/verification-code.md +116 -0
- package/dist/docs/product/components/visual.md +249 -0
- package/dist/docs/product/components.md +203 -0
- package/dist/docs/product/foundations/accessibility.md +377 -0
- package/dist/docs/product/foundations/agents.md +150 -0
- package/dist/docs/product/foundations/color.md +522 -0
- package/dist/docs/product/foundations/content/tone.md +194 -0
- package/dist/docs/product/foundations/content/voice.md +194 -0
- package/dist/docs/product/foundations/content/writing-style.md +406 -0
- package/dist/docs/product/foundations/iconography.md +282 -0
- package/dist/docs/product/foundations/intent.md +360 -0
- package/dist/docs/product/foundations/layout.md +508 -0
- package/dist/docs/product/foundations/linter.md +496 -0
- package/dist/docs/product/foundations/motion.md +151 -0
- package/dist/docs/product/foundations/radius-and-padding.md +86 -0
- package/dist/docs/product/foundations/typography.md +266 -0
- package/dist/docs/product/introduction/faq.md +133 -0
- package/dist/docs/product/introduction/getting-started.md +377 -0
- package/dist/docs/product/patterns/blockchain-values.md +709 -0
- package/dist/docs/product/patterns/dashboards.md +638 -0
- package/dist/docs/product/patterns/destructive-actions.md +626 -0
- package/dist/docs/product/patterns/empty-states.md +612 -0
- package/dist/docs/product/patterns/errors-and-validation.md +808 -0
- package/dist/docs/product/patterns/feedback-and-status.md +518 -0
- package/dist/docs/product/patterns/forms.md +679 -0
- package/dist/docs/product/patterns/loading.md +630 -0
- package/dist/docs/product/patterns/navigation.md +397 -0
- package/dist/docs/product/patterns/payments.md +765 -0
- package/dist/docs/product/patterns/responsive-layout.md +997 -0
- package/dist/docs/product/patterns/tables-and-lists.md +964 -0
- package/dist/docs/product/products/tempo-console.md +671 -0
- package/dist/docs/product/products/tempo-performance.md +437 -0
- package/dist/docs/product/products/tempo-wallet.md +438 -0
- 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
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Radius and Padding
|
|
2
|
+
|
|
3
|
+
How corner radius and padding pair, from fields to modals.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Corners in Tempo are squircles that ease into each edge. Each kind of element has its own radius, from fields and buttons up to modals, and the radius stays the same at every size of that element.
|
|
8
|
+
|
|
9
|
+
Padding keeps content clear of the curve. Boxes and modals pad by their own radius, and corners step down the scale as layers nest.
|
|
10
|
+
|
|
11
|
+
## Scale
|
|
12
|
+
|
|
13
|
+
* **Fields, Buttons, and Alerts (xs):** A 12px corner at every size, padded by at least 16px.
|
|
14
|
+
* **Boxes and Tiles (sm):** A 16px corner, padded by 16px, as in a list group.
|
|
15
|
+
* **Small Modals (md):** A 24px corner, padded by 24px, for one decision.
|
|
16
|
+
* **Medium and Large Modals (lg):** A 32px corner, padded by 32px, for longer tasks.
|
|
17
|
+
* **Pills (full):** Icon buttons, avatars, and token chips.
|
|
18
|
+
|
|
19
|
+
**Do:** Pad a corner by at least its radius, so content sits clear of the curve.
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
<RadiusDemo kind="padded" />
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Don't:** Pad a container by less than its radius.
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
<RadiusDemo kind="cramped" />
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Squircles
|
|
32
|
+
|
|
33
|
+
Every corner is a squircle where the browser supports it, and a round corner of the same radius everywhere else.
|
|
34
|
+
|
|
35
|
+
* **Squircle (corner-shape):** Supporting browsers draw each radius token as a squircle.
|
|
36
|
+
* **Fallback (border-radius):** Other browsers draw the same token as a round corner.
|
|
37
|
+
* **Circles and Pills (full):** Full radius stays round, so circles keep their shape.
|
|
38
|
+
|
|
39
|
+
To keep your own circle or pill round, set the round corner shape beside the full radius.
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
import { style } from '@tempoxyz/ds'
|
|
43
|
+
|
|
44
|
+
namespace styles {
|
|
45
|
+
export const badge = style({ borderRadius: 'full', cornerShape: 'round' })
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Nested Corners
|
|
50
|
+
|
|
51
|
+
A layer inside another takes a smaller radius: a modal at 32px holds boxes at 16px, which hold fields at 12px.
|
|
52
|
+
|
|
53
|
+
**Do:** Step the radius down at each layer, from modal to box to field.
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
<RadiusDemo kind="nested" />
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Don't:** Repeat the outer radius on the layers inside it.
|
|
60
|
+
|
|
61
|
+
```tsx
|
|
62
|
+
<RadiusDemo kind="repeated" />
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Corner Controls
|
|
66
|
+
|
|
67
|
+
* **Close and Back Buttons (First line):** Align with the title beside them, not with the corner.
|
|
68
|
+
|
|
69
|
+
## Bleed
|
|
70
|
+
|
|
71
|
+
* **Edge-Aligned Controls (Up to the padding):** Lines a text button's label up with the content edge.
|
|
72
|
+
* **Full-Bleed Content (Exactly the padding):** Lets rows and tables reach both edges of the box.
|
|
73
|
+
|
|
74
|
+
## Related
|
|
75
|
+
|
|
76
|
+
[Layout](layout.md)
|
|
77
|
+
|
|
78
|
+
Covers the radius, spacing, and shadow scales.
|
|
79
|
+
|
|
80
|
+
[Surface](../components/surface.md)
|
|
81
|
+
|
|
82
|
+
Use for padded boxes and cards.
|
|
83
|
+
|
|
84
|
+
[Dialog](../components/dialog.md)
|
|
85
|
+
|
|
86
|
+
Use for modals.
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
# Typography
|
|
2
|
+
|
|
3
|
+
Type sets for titles, body text, values, and code.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Type in Tempo is quiet and direct. Inter carries the interface, Pilat gives titles and large numbers their character, and JetBrains Mono keeps addresses and code legible.
|
|
8
|
+
|
|
9
|
+
Each set bundles a family, size, weight, line height, and tracking into one token, so you choose a role instead of tuning properties. A set keeps one size at every screen width.
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import { style } from '@tempoxyz/ds'
|
|
13
|
+
|
|
14
|
+
namespace styles {
|
|
15
|
+
export const title = style({ typography: 'heading.h2' })
|
|
16
|
+
|
|
17
|
+
export const body = style({ color: 'content.secondary', typography: 'body.b2' })
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Typefaces
|
|
22
|
+
|
|
23
|
+
Three bundled families cover every set.
|
|
24
|
+
|
|
25
|
+
* **Inter (100 to 900):** Body text, labels, buttons, and table cells.
|
|
26
|
+
* **Pilat (100 to 900):** Titles, display text, and large values.
|
|
27
|
+
* **JetBrains Mono (400 to 700):** Addresses, hashes, keys, and code.
|
|
28
|
+
|
|
29
|
+
## Type Sets
|
|
30
|
+
|
|
31
|
+
Six sets cover the interface, from hero titles down to small labels.
|
|
32
|
+
|
|
33
|
+
### Display
|
|
34
|
+
|
|
35
|
+
Hero titles and large amounts, in light and regular weights that let size carry the emphasis. [Amount](../components/amount.md) uses display type at its largest size.
|
|
36
|
+
|
|
37
|
+
* `display.d1`: 44px, weight 300, line height 41.8px
|
|
38
|
+
* `display.d2`: 36px, weight 400, line height 34.2px
|
|
39
|
+
|
|
40
|
+
### Value
|
|
41
|
+
|
|
42
|
+
Large readings, such as balances and dashboard numbers, with tight tracking so the digits read as one figure.
|
|
43
|
+
|
|
44
|
+
* `value.v1`: 80px, weight 400, line height normal
|
|
45
|
+
* `value.v2`: 52px, weight 400, line height normal
|
|
46
|
+
* `value.v3`: 40px, weight 400, line height normal
|
|
47
|
+
|
|
48
|
+
### Heading
|
|
49
|
+
|
|
50
|
+
Page, dialog, section, and card titles, in a medium weight. Tracking tightens as the size grows, so large titles stay compact.
|
|
51
|
+
|
|
52
|
+
* `heading.h1`: 32px, weight 500, line height 36.8px
|
|
53
|
+
* `heading.h2`: 24px, weight 500, line height 27.6px
|
|
54
|
+
* `heading.h3`: 20px, weight 500, line height 23px
|
|
55
|
+
* `heading.h4`: 18px, weight 500, line height 20.7px
|
|
56
|
+
|
|
57
|
+
### Body
|
|
58
|
+
|
|
59
|
+
Paragraphs, descriptions, labels, buttons, and table cells, in a regular and a strong weight at each size.
|
|
60
|
+
|
|
61
|
+
* `body.b1`: 16px, weight 400, line height 22px
|
|
62
|
+
* `body.b1Strong`: 16px, weight 500, line height 22px
|
|
63
|
+
* `body.b2`: 14px, weight 400, line height 20px
|
|
64
|
+
* `body.b2Strong`: 14px, weight 500, line height 20px
|
|
65
|
+
* `body.b3`: 12px, weight 400, line height 16px
|
|
66
|
+
* `body.b3Strong`: 12px, weight 500, line height 16px
|
|
67
|
+
|
|
68
|
+
* **Weight (400 and 500):** Strong sets add emphasis without a larger size.
|
|
69
|
+
* **Default (body.b1):** The page default, a size down on dense screens.
|
|
70
|
+
* **Inputs (body.b1):** Large fields keep 16px, so iOS Safari won't zoom.
|
|
71
|
+
* **Buttons (body.b2Strong):** Buttons set their own labels, one size per button.
|
|
72
|
+
|
|
73
|
+
### Mono
|
|
74
|
+
|
|
75
|
+
Addresses, hashes, keys, and code, in one size.
|
|
76
|
+
|
|
77
|
+
* **Addresses and Hashes (mono.m1):** Hex values and monospace table cells.
|
|
78
|
+
* **Commands and Keys (mono.m1):** Snippets and secret values.
|
|
79
|
+
|
|
80
|
+
### Utility
|
|
81
|
+
|
|
82
|
+
Short metadata labels in the mono family, with wide tracking. The design sets them in uppercase, which a component applies itself, since the sets keep the text's case.
|
|
83
|
+
|
|
84
|
+
* `utility.m1`: 12px, weight 400, line height 16px
|
|
85
|
+
* `utility.m2`: 10px, weight 400, line height 12px
|
|
86
|
+
|
|
87
|
+
* **Label (utility.m1):** Metadata labels above or beside a value.
|
|
88
|
+
* **Small Label (utility.m2):** The smaller size, for labels in tight spaces.
|
|
89
|
+
|
|
90
|
+
## Guidelines
|
|
91
|
+
|
|
92
|
+
### Build Hierarchy With Few Sizes
|
|
93
|
+
|
|
94
|
+
Build hierarchy with size and weight, not color. Most screens need a page title, section titles, and body text.
|
|
95
|
+
|
|
96
|
+
* **Page Title (heading.h2):** One per page, including app shell and dialog titles.
|
|
97
|
+
* **Section and Card Title (heading.h3):** Section, surface, and popover titles.
|
|
98
|
+
* **Small Title (body.b1Strong):** Compact titles, such as empty states and legends.
|
|
99
|
+
* **Body and Secondary Text (body.b1):** Reading text, in the primary or secondary color.
|
|
100
|
+
|
|
101
|
+
Keep headings in order. Choose the element by its place in the outline and the set by its look.
|
|
102
|
+
|
|
103
|
+
**Do:** Let the component set the label and description sizes.
|
|
104
|
+
|
|
105
|
+
```tsx
|
|
106
|
+
<Field.Root>
|
|
107
|
+
<Field.Label>Amount</Field.Label>
|
|
108
|
+
<TextInput.Group>
|
|
109
|
+
<TextInput.Control defaultValue="25.00" />
|
|
110
|
+
</TextInput.Group>
|
|
111
|
+
<Field.Description>Available balance: 120.00 USDC.</Field.Description>
|
|
112
|
+
</Field.Root>
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Don't:** Use all caps or bold every line to create hierarchy. Write in [sentence case](content/writing-style.md#capitalization).
|
|
116
|
+
|
|
117
|
+
```tsx
|
|
118
|
+
<p>
|
|
119
|
+
<strong>AMOUNT</strong>
|
|
120
|
+
</p>
|
|
121
|
+
<p>
|
|
122
|
+
<strong>Available balance: 120.00 USDC.</strong>
|
|
123
|
+
</p>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Match Sets to Their Role
|
|
127
|
+
|
|
128
|
+
* **Wrapping Text (body):** Anything that can wrap.
|
|
129
|
+
* **Labels (body.b2Strong):** Field labels and short lines beside controls.
|
|
130
|
+
* **Titles (heading):** Page, dialog, section, and card titles.
|
|
131
|
+
* **Hero Numbers (display and value):** Balances and dashboard readings.
|
|
132
|
+
|
|
133
|
+
### Use Tabular Figures for Numbers
|
|
134
|
+
|
|
135
|
+
Tabular figures align digits in columns and keep live values from shifting. [Amount](../components/amount.md), [NumberField](../components/number-field.md), [Slider](../components/slider.md), and numeric table cells already set them.
|
|
136
|
+
|
|
137
|
+
**Do:** Align amounts with tabular figures, such as `Amount` with `align="right"`.
|
|
138
|
+
|
|
139
|
+
```tsx
|
|
140
|
+
/**
|
|
141
|
+
* Do example for "Use Tabular Figures for Numbers" on the Typography page.
|
|
142
|
+
* Align amounts with tabular figures, such as `Amount` with `align="right"`.
|
|
143
|
+
* @module
|
|
144
|
+
*/
|
|
145
|
+
import { Amount, style } from '@tempoxyz/ds'
|
|
146
|
+
|
|
147
|
+
/** Renders the static preview, which the guideline card shows inert. */
|
|
148
|
+
export function Demo() {
|
|
149
|
+
return (
|
|
150
|
+
<div {...styles.column()}>
|
|
151
|
+
<Amount align="right" symbol="PathUSD" value="1111.11" />
|
|
152
|
+
<Amount align="right" symbol="PathUSD" value="8808.80" />
|
|
153
|
+
<Amount align="right" symbol="PathUSD" value="4170.25" />
|
|
154
|
+
</div>
|
|
155
|
+
)
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
namespace styles {
|
|
159
|
+
export const column = style({ display: 'grid', gap: '8', width: '12rem !custom' })
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
**Don't:** Stack amounts in proportional figures, where digits drift out of line.
|
|
164
|
+
|
|
165
|
+
```tsx
|
|
166
|
+
/**
|
|
167
|
+
* Don't example for "Use Tabular Figures for Numbers" on the Typography page.
|
|
168
|
+
* Don't stack amounts in proportional figures, where digits drift out of line.
|
|
169
|
+
* @module
|
|
170
|
+
*/
|
|
171
|
+
import { style } from '@tempoxyz/ds'
|
|
172
|
+
|
|
173
|
+
/** Renders the static preview, which the guideline card shows inert. */
|
|
174
|
+
export function Demo() {
|
|
175
|
+
return (
|
|
176
|
+
<div {...styles.column()}>
|
|
177
|
+
<span {...styles.amount()}>1,111.11 PathUSD</span>
|
|
178
|
+
<span {...styles.amount()}>8,808.80 PathUSD</span>
|
|
179
|
+
<span {...styles.amount()}>4,170.25 PathUSD</span>
|
|
180
|
+
</div>
|
|
181
|
+
)
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
namespace styles {
|
|
185
|
+
export const amount = style({
|
|
186
|
+
color: 'content.primary',
|
|
187
|
+
fontVariantNumeric: 'proportional-nums !custom',
|
|
188
|
+
textAlign: 'right',
|
|
189
|
+
typography: 'body.b2Strong',
|
|
190
|
+
})
|
|
191
|
+
|
|
192
|
+
export const column = style({ display: 'grid', gap: '8', width: '12rem !custom' })
|
|
193
|
+
}
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
If you render a number yourself, such as a metric tile, set tabular figures in its style.
|
|
197
|
+
|
|
198
|
+
```tsx
|
|
199
|
+
style({ fontVariantNumeric: 'tabular-nums !custom' })
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Use Monospace for Hashes and Code
|
|
203
|
+
|
|
204
|
+
Set addresses, hashes, keys, and code in monospace, so similar characters stay distinct and equal-length values align. [Hex](../components/hex.md), [Snippet](../components/snippet.md), and [SecretValue](../components/secret-value.md) apply it. Labels and prose stay out of it.
|
|
205
|
+
|
|
206
|
+
**Do:** Set hashes in `mono.m1`, so they align and `I`, `l`, `0`, and `O` stay distinct.
|
|
207
|
+
|
|
208
|
+
```tsx
|
|
209
|
+
/**
|
|
210
|
+
* Do example for "Use Monospace for Hashes and Code" on the Typography page.
|
|
211
|
+
* Set hashes in a `.mono` set, so they align and `I`, `l`, `0`, and `O` stay distinct.
|
|
212
|
+
* @module
|
|
213
|
+
*/
|
|
214
|
+
import { style } from '@tempoxyz/ds'
|
|
215
|
+
|
|
216
|
+
/** Renders the static preview, which the guideline card shows inert. */
|
|
217
|
+
export function Demo() {
|
|
218
|
+
return (
|
|
219
|
+
<div {...styles.column()}>
|
|
220
|
+
<span {...styles.value()}>0x1f0a9c3e7b11d4e0</span>
|
|
221
|
+
<span {...styles.value()}>0x8d1Il0O4e2b7a96c</span>
|
|
222
|
+
<span {...styles.value()}>0x7777a1b2c3d4e5f6</span>
|
|
223
|
+
</div>
|
|
224
|
+
)
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
namespace styles {
|
|
228
|
+
export const column = style({ display: 'grid', gap: '8' })
|
|
229
|
+
|
|
230
|
+
export const value = style({ color: 'content.primary', typography: 'mono.m1' })
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**Don't:** Set hashes in a proportional set, where equal-length values drift apart.
|
|
235
|
+
|
|
236
|
+
```tsx
|
|
237
|
+
/**
|
|
238
|
+
* Don't example for "Use Monospace for Hashes and Code" on the Typography page.
|
|
239
|
+
* Don't set hashes in a proportional set, where equal-length values drift apart.
|
|
240
|
+
* @module
|
|
241
|
+
*/
|
|
242
|
+
import { style } from '@tempoxyz/ds'
|
|
243
|
+
|
|
244
|
+
/** Renders the static preview, which the guideline card shows inert. */
|
|
245
|
+
export function Demo() {
|
|
246
|
+
return (
|
|
247
|
+
<div {...styles.column()}>
|
|
248
|
+
<span {...styles.value()}>0x1f0a9c3e7b11d4e0</span>
|
|
249
|
+
<span {...styles.value()}>0x8d1Il0O4e2b7a96c</span>
|
|
250
|
+
<span {...styles.value()}>0x7777a1b2c3d4e5f6</span>
|
|
251
|
+
</div>
|
|
252
|
+
)
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
namespace styles {
|
|
256
|
+
export const column = style({ display: 'grid', gap: '8' })
|
|
257
|
+
|
|
258
|
+
export const value = style({ color: 'content.primary', typography: 'body.b3' })
|
|
259
|
+
}
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### Keep Lines Readable
|
|
263
|
+
|
|
264
|
+
* **Line Length (45 to 75 characters):** Cap paragraphs with `maxWidth: '65ch !custom'`. Dialogs already cap their width.
|
|
265
|
+
* **Alignment:** Left-align text. Center only short text, such as an empty state title.
|
|
266
|
+
* **Minimum Size (12px):** Don't set interface text smaller. The smallest body set, `body.b3`, stops here.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# FAQ
|
|
2
|
+
|
|
3
|
+
Common questions about building with, and contributing to, Tempo Design System.
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
### Which Surface Should I Use?
|
|
8
|
+
|
|
9
|
+
Choose the surface by the platform you ship to. The surfaces share a design language but not code, so don't import one from the other.
|
|
10
|
+
|
|
11
|
+
| I am building... | Surface | Import |
|
|
12
|
+
| ------------------------- | --------- | ------------------------ |
|
|
13
|
+
| A web application | Web | `@tempoxyz/ds` |
|
|
14
|
+
| A React Native mobile app | Mobile | `@tempoxyz/ds/mobile` |
|
|
15
|
+
| A marketing website | Marketing | `@tempoxyz/ds/marketing` |
|
|
16
|
+
|
|
17
|
+
Web components render DOM elements and compile with a Zyzz bundler plugin. Mobile components render React Native views and compile with Metro. [Getting Started](getting-started.md) shows each setup.
|
|
18
|
+
|
|
19
|
+
### Do I Need to Import a Stylesheet?
|
|
20
|
+
|
|
21
|
+
No. The library publishes no stylesheet.
|
|
22
|
+
|
|
23
|
+
* **Vite:** The [Vite plugin](getting-started.md#setup) emits the variables, the Inter, Pilat, and JetBrains Mono fonts, and keyframes once. Each component emits its own rules, so a build carries only the styles it uses.
|
|
24
|
+
* **Rollup, Webpack, and esbuild:** The adapters emit a generated `/zyzz.css` that you load once.
|
|
25
|
+
* **Mobile:** Metro compiles library and app styles during the bundle.
|
|
26
|
+
|
|
27
|
+
The Zyzz plugin is the only supported web setup.
|
|
28
|
+
|
|
29
|
+
### How Do I Style My Own Markup?
|
|
30
|
+
|
|
31
|
+
Use `style` and `variants` from `@tempoxyz/ds` with TDS tokens, such as `content.primary`, `background.elevated`, `'24'`, and `body.b2`. Group the definitions in a `namespace styles` block.
|
|
32
|
+
|
|
33
|
+
If your app needs its own tokens, extend `variables` in your own Zyzz config, as the Custom Variables setup in [Getting Started](getting-started.md#setup) shows.
|
|
34
|
+
|
|
35
|
+
## Components
|
|
36
|
+
|
|
37
|
+
### Can I Change How a Component Looks?
|
|
38
|
+
|
|
39
|
+
Use the component's props first, such as `variant` and `size`.
|
|
40
|
+
|
|
41
|
+
* **Web:** Components accept `className` and `style`, and keep your classes beside their own.
|
|
42
|
+
* **Mobile:** Components accept React Native `style`. Import variables from `@tempoxyz/ds/mobile`.
|
|
43
|
+
|
|
44
|
+
If you need a token the library does not have, extend `variables` as [How Do I Style My Own Markup?](#how-do-i-style-my-own-markup) shows.
|
|
45
|
+
|
|
46
|
+
### What If the Library Doesn't Have the Component I Need?
|
|
47
|
+
|
|
48
|
+
Build it in your app from library components and `style`, with TDS tokens. Keep that code in your app. If other products need it too, propose it for the library.
|
|
49
|
+
|
|
50
|
+
### How Do I Request a Component, Variant, or Token?
|
|
51
|
+
|
|
52
|
+
Open an issue in the Design System project in Linear. Include:
|
|
53
|
+
|
|
54
|
+
* The use case.
|
|
55
|
+
* The proposed contract, such as props, variants, or token names.
|
|
56
|
+
* Links to the relevant Figma designs.
|
|
57
|
+
* Consumer code or a pull request that shows the need.
|
|
58
|
+
|
|
59
|
+
If an issue already covers the proposal, reuse it. A proposal joins `@tempoxyz/ds` after designer approval and an approved Figma definition.
|
|
60
|
+
|
|
61
|
+
### Why Isn't a Figma Component in the Library?
|
|
62
|
+
|
|
63
|
+
The library includes only components with a verified production family in Figma. Archived and experimental Figma components stay out until a production version exists.
|
|
64
|
+
|
|
65
|
+
The [Components](../components.md) overview lists what ships today. Sidebar pages marked 🚧 are not written yet.
|
|
66
|
+
|
|
67
|
+
### Which Components Exist on Mobile?
|
|
68
|
+
|
|
69
|
+
`@tempoxyz/ds/mobile` has a smaller set, and some names differ from web.
|
|
70
|
+
|
|
71
|
+
| Mobile | Web counterpart |
|
|
72
|
+
| ------------ | --------------------------------------------------------------------------------- |
|
|
73
|
+
| `Avatar` | [Avatar](../components/avatar.md) |
|
|
74
|
+
| `Badge` | [Badge](../components/badge.md) |
|
|
75
|
+
| `Button` | [Button](../components/button.md) |
|
|
76
|
+
| `CodeInput` | [OtpField](../components/otp-field.md) |
|
|
77
|
+
| `IconButton` | [Button](../components/button.md) with `shape="icon"` |
|
|
78
|
+
| `Skeleton` | [Skeleton](../components/skeleton.md) |
|
|
79
|
+
| `Spinner` | [Spinner](../components/spinner.md) |
|
|
80
|
+
| `TextButton` | [Button](../components/button.md) with `variant="tertiary"` |
|
|
81
|
+
| `TextInput` | [TextInput](../components/text-input.md) inside a [Field](../components/field.md) |
|
|
82
|
+
| `Toast` | [Toast](../components/toast.md) |
|
|
83
|
+
| `Toggle` | [Switch](../components/switch.md) |
|
|
84
|
+
|
|
85
|
+
### Do Web Components Work in Mobile Browsers?
|
|
86
|
+
|
|
87
|
+
Yes. [Responsive Layout](../patterns/responsive-layout.md) shows how to adapt a layout from a phone to a desktop.
|
|
88
|
+
|
|
89
|
+
## Design
|
|
90
|
+
|
|
91
|
+
### How Do Light and Dark Schemes Work?
|
|
92
|
+
|
|
93
|
+
Every color has a light and a dark value, so you write each color once.
|
|
94
|
+
|
|
95
|
+
* **Web:** Values follow the inherited CSS `color-scheme`. Set `color-scheme: light dark` on the root to follow the system, or apply `vars({ colorScheme: 'dark' })` to fix one region.
|
|
96
|
+
* **Mobile:** `Provider colorScheme="system"` follows the device setting. To override it, pass `light` or `dark`. To render a subtree with inverse variables, pass `vars="inverse"`.
|
|
97
|
+
|
|
98
|
+
The library does not store a scheme preference. If your app offers a theme setting, persist the choice yourself.
|
|
99
|
+
|
|
100
|
+
### Which Is Right When Figma and Code Disagree?
|
|
101
|
+
|
|
102
|
+
Figma is the design reference. Variables, icons, and components are maintained by hand, so the two can drift.
|
|
103
|
+
|
|
104
|
+
If a component does not match its production Figma design, use Report issue on its page and include the Figma link. If you need the change before the library has it, keep the implementation in your app.
|
|
105
|
+
|
|
106
|
+
### Where Are the Figma Files?
|
|
107
|
+
|
|
108
|
+
The Figma files define every variable, icon, and component:
|
|
109
|
+
|
|
110
|
+
* [TPDS 1.0 Platform](https://www.figma.com/design/yE96kcymnNR88PJp6G1sPs/TPDS-1.0-Platform) for Web variables and components
|
|
111
|
+
* [TDS Platform](https://www.figma.com/design/pcO4NIuw8wx9U2nGJOcjzE) for Web icons
|
|
112
|
+
* [TDS App](https://www.figma.com/design/8iu5856rBEI3pnZ6YaIBgw) for Mobile, whose families the mobile components implement
|
|
113
|
+
|
|
114
|
+
## Docs
|
|
115
|
+
|
|
116
|
+
### How Do I Report a Docs Issue?
|
|
117
|
+
|
|
118
|
+
On wide screens, On this page includes two actions:
|
|
119
|
+
|
|
120
|
+
* **Report issue:** Opens a GitHub issue titled with the page name and its path.
|
|
121
|
+
* **Edit page:** Opens the MDX source of the page on GitHub.
|
|
122
|
+
|
|
123
|
+
On narrower screens, use the GitHub link at the bottom of the sidebar.
|
|
124
|
+
|
|
125
|
+
### How Should Coding Agents Use These Docs?
|
|
126
|
+
|
|
127
|
+
Every page has a Markdown twin, `/llms.txt` indexes them all, and the library documents each export in its source. [Agents](../foundations/agents.md) lists the files and the rules an agent follows when it generates Tempo UI.
|
|
128
|
+
|
|
129
|
+
## License
|
|
130
|
+
|
|
131
|
+
### How Is the Library Licensed?
|
|
132
|
+
|
|
133
|
+
The library is open source under the [MIT license](https://github.com/tempoxyz/ds/blob/main/LICENSE-MIT).
|