@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.
Files changed (210) hide show
  1. package/README.md +7 -6
  2. package/dist/docs/AGENTS.md +12 -0
  3. package/dist/docs/index.md +145 -0
  4. package/dist/docs/marketing/introduction/getting-started.md +241 -0
  5. package/dist/docs/product/components/accordion.md +489 -0
  6. package/dist/docs/product/components/address-card.md +147 -0
  7. package/dist/docs/product/components/agent-logo.md +194 -0
  8. package/dist/docs/product/components/alert-dialog.md +631 -0
  9. package/dist/docs/product/components/alert.md +448 -0
  10. package/dist/docs/product/components/amount-input.md +305 -0
  11. package/dist/docs/product/components/amount.md +794 -0
  12. package/dist/docs/product/components/app-shell.md +559 -0
  13. package/dist/docs/product/components/asset-chip.md +294 -0
  14. package/dist/docs/product/components/autocomplete.md +620 -0
  15. package/dist/docs/product/components/avatar.md +321 -0
  16. package/dist/docs/product/components/badge.md +339 -0
  17. package/dist/docs/product/components/badged-logo.md +116 -0
  18. package/dist/docs/product/components/banner.md +379 -0
  19. package/dist/docs/product/components/bar-chart.md +208 -0
  20. package/dist/docs/product/components/breadcrumbs.md +380 -0
  21. package/dist/docs/product/components/button-group.md +286 -0
  22. package/dist/docs/product/components/button.md +650 -0
  23. package/dist/docs/product/components/calendar.md +375 -0
  24. package/dist/docs/product/components/callout.md +96 -0
  25. package/dist/docs/product/components/checkbox-group.md +521 -0
  26. package/dist/docs/product/components/checkbox.md +467 -0
  27. package/dist/docs/product/components/choice-group.md +516 -0
  28. package/dist/docs/product/components/choicebox.md +641 -0
  29. package/dist/docs/product/components/code.md +100 -0
  30. package/dist/docs/product/components/combobox.md +939 -0
  31. package/dist/docs/product/components/container.md +257 -0
  32. package/dist/docs/product/components/copy-button.md +642 -0
  33. package/dist/docs/product/components/date-picker.md +514 -0
  34. package/dist/docs/product/components/dialog.md +1332 -0
  35. package/dist/docs/product/components/drawer.md +966 -0
  36. package/dist/docs/product/components/empty.md +340 -0
  37. package/dist/docs/product/components/field.md +570 -0
  38. package/dist/docs/product/components/fieldset.md +398 -0
  39. package/dist/docs/product/components/frame.md +434 -0
  40. package/dist/docs/product/components/gauge.md +299 -0
  41. package/dist/docs/product/components/get-started-visual.md +117 -0
  42. package/dist/docs/product/components/grid.md +288 -0
  43. package/dist/docs/product/components/hero-visual.md +155 -0
  44. package/dist/docs/product/components/hex.md +487 -0
  45. package/dist/docs/product/components/icon-tile.md +292 -0
  46. package/dist/docs/product/components/identicon.md +371 -0
  47. package/dist/docs/product/components/inline.md +233 -0
  48. package/dist/docs/product/components/inset.md +225 -0
  49. package/dist/docs/product/components/kbd.md +423 -0
  50. package/dist/docs/product/components/list-group.md +981 -0
  51. package/dist/docs/product/components/loading-dots.md +237 -0
  52. package/dist/docs/product/components/menu.md +934 -0
  53. package/dist/docs/product/components/native-select.md +204 -0
  54. package/dist/docs/product/components/network-logo.md +248 -0
  55. package/dist/docs/product/components/number-field.md +543 -0
  56. package/dist/docs/product/components/otp-field.md +616 -0
  57. package/dist/docs/product/components/pagination.md +516 -0
  58. package/dist/docs/product/components/popover.md +544 -0
  59. package/dist/docs/product/components/progress.md +388 -0
  60. package/dist/docs/product/components/qr.md +314 -0
  61. package/dist/docs/product/components/radio-group.md +528 -0
  62. package/dist/docs/product/components/secret-value.md +406 -0
  63. package/dist/docs/product/components/select.md +751 -0
  64. package/dist/docs/product/components/separator.md +379 -0
  65. package/dist/docs/product/components/sidebar-menu.md +922 -0
  66. package/dist/docs/product/components/skeleton.md +517 -0
  67. package/dist/docs/product/components/slider.md +539 -0
  68. package/dist/docs/product/components/snippet.md +424 -0
  69. package/dist/docs/product/components/spinner.md +216 -0
  70. package/dist/docs/product/components/split-bar.md +139 -0
  71. package/dist/docs/product/components/split-button.md +464 -0
  72. package/dist/docs/product/components/stack.md +299 -0
  73. package/dist/docs/product/components/status-chip.md +226 -0
  74. package/dist/docs/product/components/status-indicator.md +119 -0
  75. package/dist/docs/product/components/status-row.md +174 -0
  76. package/dist/docs/product/components/stepper.md +451 -0
  77. package/dist/docs/product/components/success-hero.md +157 -0
  78. package/dist/docs/product/components/surface.md +639 -0
  79. package/dist/docs/product/components/switch.md +472 -0
  80. package/dist/docs/product/components/table.md +967 -0
  81. package/dist/docs/product/components/tabs.md +627 -0
  82. package/dist/docs/product/components/tempo-logo.md +185 -0
  83. package/dist/docs/product/components/text-input.md +624 -0
  84. package/dist/docs/product/components/textarea.md +352 -0
  85. package/dist/docs/product/components/toast.md +535 -0
  86. package/dist/docs/product/components/token-logo.md +371 -0
  87. package/dist/docs/product/components/token.md +247 -0
  88. package/dist/docs/product/components/tooltip.md +490 -0
  89. package/dist/docs/product/components/verification-code.md +116 -0
  90. package/dist/docs/product/components/visual.md +249 -0
  91. package/dist/docs/product/components.md +203 -0
  92. package/dist/docs/product/foundations/accessibility.md +377 -0
  93. package/dist/docs/product/foundations/agents.md +150 -0
  94. package/dist/docs/product/foundations/color.md +522 -0
  95. package/dist/docs/product/foundations/content/tone.md +194 -0
  96. package/dist/docs/product/foundations/content/voice.md +194 -0
  97. package/dist/docs/product/foundations/content/writing-style.md +406 -0
  98. package/dist/docs/product/foundations/iconography.md +282 -0
  99. package/dist/docs/product/foundations/intent.md +360 -0
  100. package/dist/docs/product/foundations/layout.md +508 -0
  101. package/dist/docs/product/foundations/linter.md +496 -0
  102. package/dist/docs/product/foundations/motion.md +151 -0
  103. package/dist/docs/product/foundations/radius-and-padding.md +86 -0
  104. package/dist/docs/product/foundations/typography.md +266 -0
  105. package/dist/docs/product/introduction/faq.md +133 -0
  106. package/dist/docs/product/introduction/getting-started.md +377 -0
  107. package/dist/docs/product/patterns/blockchain-values.md +709 -0
  108. package/dist/docs/product/patterns/dashboards.md +638 -0
  109. package/dist/docs/product/patterns/destructive-actions.md +626 -0
  110. package/dist/docs/product/patterns/empty-states.md +612 -0
  111. package/dist/docs/product/patterns/errors-and-validation.md +808 -0
  112. package/dist/docs/product/patterns/feedback-and-status.md +518 -0
  113. package/dist/docs/product/patterns/forms.md +679 -0
  114. package/dist/docs/product/patterns/loading.md +630 -0
  115. package/dist/docs/product/patterns/navigation.md +397 -0
  116. package/dist/docs/product/patterns/payments.md +765 -0
  117. package/dist/docs/product/patterns/responsive-layout.md +997 -0
  118. package/dist/docs/product/patterns/tables-and-lists.md +964 -0
  119. package/dist/docs/product/products/tempo-console.md +671 -0
  120. package/dist/docs/product/products/tempo-performance.md +437 -0
  121. package/dist/docs/product/products/tempo-wallet.md +438 -0
  122. package/dist/marketing/index.d.ts +4 -0
  123. package/dist/marketing/index.d.ts.map +1 -0
  124. package/dist/marketing/index.js +4 -0
  125. package/dist/marketing/index.js.map +1 -0
  126. package/dist/marketing/index.js.zyzz.json +1 -0
  127. package/dist/marketing/vars.d.ts +907 -0
  128. package/dist/marketing/vars.d.ts.map +1 -0
  129. package/dist/marketing/vars.js +15 -0
  130. package/dist/marketing/vars.js.map +1 -0
  131. package/dist/marketing/vars.js.zyzz.json +1 -0
  132. package/dist/marketing/zyzz.config.d.ts +4512 -0
  133. package/dist/marketing/zyzz.config.d.ts.map +1 -0
  134. package/dist/marketing/zyzz.config.js +63 -0
  135. package/dist/marketing/zyzz.config.js.map +1 -0
  136. package/dist/marketing/zyzz.config.js.zyzz.json +1 -0
  137. package/dist/oxlint/index.d.ts +12 -1
  138. package/dist/oxlint/index.d.ts.map +1 -1
  139. package/dist/oxlint/index.js +39 -1
  140. package/dist/oxlint/index.js.map +1 -1
  141. package/dist/oxlint/internal/Docs.d.ts +9 -0
  142. package/dist/oxlint/internal/Docs.d.ts.map +1 -0
  143. package/dist/oxlint/internal/Docs.js +15 -0
  144. package/dist/oxlint/internal/Docs.js.map +1 -0
  145. package/dist/oxlint/internal/Imports.d.ts +1 -1
  146. package/dist/oxlint/internal/Imports.d.ts.map +1 -1
  147. package/dist/oxlint/internal/Imports.js +2 -0
  148. package/dist/oxlint/internal/Imports.js.map +1 -1
  149. package/dist/oxlint/internal/Styles.d.ts +40 -0
  150. package/dist/oxlint/internal/Styles.d.ts.map +1 -0
  151. package/dist/oxlint/internal/Styles.js +194 -0
  152. package/dist/oxlint/internal/Styles.js.map +1 -0
  153. package/dist/oxlint/internal/Tokens.d.ts +16 -0
  154. package/dist/oxlint/internal/Tokens.d.ts.map +1 -0
  155. package/dist/oxlint/internal/Tokens.js +39 -0
  156. package/dist/oxlint/internal/Tokens.js.map +1 -0
  157. package/dist/oxlint/rules/NoCrossSurface.d.ts +2 -2
  158. package/dist/oxlint/rules/NoCrossSurface.js +3 -3
  159. package/dist/oxlint/rules/NoCrossSurface.js.map +1 -1
  160. package/dist/oxlint/rules/NoCustomValues.d.ts +11 -0
  161. package/dist/oxlint/rules/NoCustomValues.d.ts.map +1 -0
  162. package/dist/oxlint/rules/NoCustomValues.js +150 -0
  163. package/dist/oxlint/rules/NoCustomValues.js.map +1 -0
  164. package/dist/oxlint/rules/NoSingleKeyShortcuts.d.ts +11 -0
  165. package/dist/oxlint/rules/NoSingleKeyShortcuts.d.ts.map +1 -0
  166. package/dist/oxlint/rules/NoSingleKeyShortcuts.js +158 -0
  167. package/dist/oxlint/rules/NoSingleKeyShortcuts.js.map +1 -0
  168. package/dist/oxlint/rules/PreferComponent.d.ts +3 -2
  169. package/dist/oxlint/rules/PreferComponent.d.ts.map +1 -1
  170. package/dist/oxlint/rules/PreferComponent.js +11 -4
  171. package/dist/oxlint/rules/PreferComponent.js.map +1 -1
  172. package/dist/oxlint/rules/PreferLayout.d.ts +9 -0
  173. package/dist/oxlint/rules/PreferLayout.d.ts.map +1 -0
  174. package/dist/oxlint/rules/PreferLayout.js +90 -0
  175. package/dist/oxlint/rules/PreferLayout.js.map +1 -0
  176. package/dist/oxlint/rules/PreferProgress.d.ts +9 -0
  177. package/dist/oxlint/rules/PreferProgress.d.ts.map +1 -0
  178. package/dist/oxlint/rules/PreferProgress.js +43 -0
  179. package/dist/oxlint/rules/PreferProgress.js.map +1 -0
  180. package/dist/oxlint/rules/PreferSurface.d.ts +9 -0
  181. package/dist/oxlint/rules/PreferSurface.d.ts.map +1 -0
  182. package/dist/oxlint/rules/PreferSurface.js +55 -0
  183. package/dist/oxlint/rules/PreferSurface.js.map +1 -0
  184. package/dist/oxlint/rules/RequireAccessibleName.d.ts.map +1 -1
  185. package/dist/oxlint/rules/RequireAccessibleName.js +3 -1
  186. package/dist/oxlint/rules/RequireAccessibleName.js.map +1 -1
  187. package/dist/oxlint/rules/RequireScrollRegion.d.ts +11 -0
  188. package/dist/oxlint/rules/RequireScrollRegion.d.ts.map +1 -0
  189. package/dist/oxlint/rules/RequireScrollRegion.js +71 -0
  190. package/dist/oxlint/rules/RequireScrollRegion.js.map +1 -0
  191. package/dist/web/icons/index.js.zyzz.json +1 -0
  192. package/package.json +6 -1
  193. package/src/marketing/README.md +21 -0
  194. package/src/marketing/index.ts +3 -0
  195. package/src/marketing/vars.ts +751 -0
  196. package/src/marketing/zyzz.config.ts +376 -0
  197. package/src/oxlint/index.ts +40 -1
  198. package/src/oxlint/internal/Docs.ts +18 -0
  199. package/src/oxlint/internal/Imports.ts +2 -1
  200. package/src/oxlint/internal/Styles.ts +240 -0
  201. package/src/oxlint/internal/Tokens.ts +43 -0
  202. package/src/oxlint/rules/NoCrossSurface.ts +3 -3
  203. package/src/oxlint/rules/NoCustomValues.ts +170 -0
  204. package/src/oxlint/rules/NoSingleKeyShortcuts.ts +190 -0
  205. package/src/oxlint/rules/PreferComponent.ts +11 -4
  206. package/src/oxlint/rules/PreferLayout.ts +96 -0
  207. package/src/oxlint/rules/PreferProgress.ts +49 -0
  208. package/src/oxlint/rules/PreferSurface.ts +70 -0
  209. package/src/oxlint/rules/RequireAccessibleName.ts +3 -1
  210. package/src/oxlint/rules/RequireScrollRegion.ts +92 -0
@@ -0,0 +1,377 @@
1
+ # Accessibility
2
+
3
+ The accessibility baseline for every Tempo component, and what you still own.
4
+
5
+ ## Overview
6
+
7
+ Tempo products target [WCAG 2.2](https://www.w3.org/TR/WCAG22/) level AA on Web, in light and dark schemes, and follow the platform guidelines on iOS and Android. A screen conforms only when every part does, so one unlabelled button fails the page.
8
+
9
+ Components render native elements, follow the [WAI-ARIA Authoring Practices](https://www.w3.org/WAI/ARIA/apg/patterns/), manage focus, and announce changes. You own names, content, page structure, composition, and testing. Rules below link their success criteria (SC).
10
+
11
+ ## Color and Contrast
12
+
13
+ Every foreground and background pair meets these ratios in both schemes, and [Color](color.md#contrast) lists the pairs that pass.
14
+
15
+ * **Body Text (4.5:1):** For readable text, such as `content.primary` or `content.secondary` ([SC 1.4.3](https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum.html)).
16
+ * **Large Text (3:1):** For large text, at least 24px in regular weight or 18.66px in bold.
17
+ * **Non-Text Contrast (3:1):** For control borders, focus outlines, and meaningful graphics such as status icons ([SC 1.4.11](https://www.w3.org/WAI/WCAG22/Understanding/non-text-contrast.html)).
18
+ * **Exempt Content:** Logos, decorative graphics, and disabled controls, which must still look disabled.
19
+
20
+ ### Never Use Color Alone
21
+
22
+ Pair color with text, an icon, or a shape ([SC 1.4.1](https://www.w3.org/WAI/WCAG22/Understanding/use-of-color.html)), as [Color](color.md#never-use-color-alone) shows.
23
+
24
+ * **Statuses:** Pair each status color with an icon and a label.
25
+ * **Errors:** Pair the invalid fill with an error message.
26
+ * **Selection:** Mark a selected item with a check or indicator.
27
+ * **Links:** Underline links that sit in body text.
28
+
29
+ ## Keyboard and Focus
30
+
31
+ Every action works with the keyboard alone, with no timing requirement ([SC 2.1.1](https://www.w3.org/WAI/WCAG22/Understanding/keyboard.html)), and focus never stays in a region the keyboard cannot leave ([SC 2.1.2](https://www.w3.org/WAI/WCAG22/Understanding/no-keyboard-trap.html)). Modal overlays are the exception, and Escape closes them.
32
+
33
+ ### Focus Order
34
+
35
+ Focus follows the reading order ([SC 2.4.3](https://www.w3.org/WAI/WCAG22/Understanding/focus-order.html)).
36
+
37
+ * **Match the Visual Order:** Keep the DOM in reading order. Don't reorder content with CSS.
38
+ * **Avoid Positive Tabindex (tabindex):** Never use a positive value. Use `-1` only on an element you focus with a script.
39
+ * **One Stop per Widget (Tab):** Tabs, radio groups, and menus take one stop. Arrow keys move within them.
40
+
41
+ ### Common Keys
42
+
43
+ Components use the keys the Authoring Practices define for each widget.
44
+
45
+ * **Move Between Controls (Tab and Shift+Tab):** Moves focus to the next or previous control in the tab order.
46
+ * **Activate or Submit (Enter):** Activates a button or a link, and submits a form from a text field.
47
+ * **Activate or Toggle (Space):** Activates a button, and toggles a checkbox or a switch.
48
+ * **Move Within a Widget (Arrow keys):** Move within tabs, radio groups, menus, listboxes, and calendar grids.
49
+ * **Jump to the First or Last Item (Home and End):** Jump to the first or last item in a list or menu, or to either end of a slider.
50
+ * **Close an Overlay (Escape):** Closes the open overlay, and returns focus to the control that opened it.
51
+
52
+ ### Shortcuts
53
+
54
+ * **Reserved Keys:** Don't take over keys that browsers or assistive technology use.
55
+ * **Single-Key Shortcuts:** Let the reader turn off or remap them, or limit them to a focused control ([SC 2.1.4](https://www.w3.org/WAI/WCAG22/Understanding/character-key-shortcuts.html)).
56
+ * **Show Shortcuts (Kbd):** Show them with [Kbd](../components/kbd.md), which reads modifiers by name, such as Command K.
57
+
58
+ ### Visible Focus
59
+
60
+ Controls show an outline on keyboard focus ([SC 2.4.7](https://www.w3.org/WAI/WCAG22/Understanding/focus-visible.html)).
61
+
62
+ ```tsx
63
+ import { Button, Checkbox, Field, style, TextInput } from '@tempoxyz/ds'
64
+
65
+ export function Demo() {
66
+ return (
67
+ <div {...styles.stack()}>
68
+ <Field.Root>
69
+ <Field.Label>Recipient</Field.Label>
70
+ <TextInput.Group>
71
+ <TextInput.Control placeholder="0x…" />
72
+ </TextInput.Group>
73
+ </Field.Root>
74
+ <Field.Root>
75
+ <Field.Item>
76
+ <Checkbox />
77
+ <Field.Label>Save as contact</Field.Label>
78
+ </Field.Item>
79
+ </Field.Root>
80
+ <div {...styles.row()}>
81
+ <Button variant="secondary">Cancel</Button>
82
+ <Button>Continue</Button>
83
+ </div>
84
+ </div>
85
+ )
86
+ }
87
+
88
+ namespace styles {
89
+ export const row = style({ display: 'flex', gap: '12', justifyContent: 'flex-end' })
90
+
91
+ export const stack = style({
92
+ display: 'grid',
93
+ gap: '16',
94
+ maxWidth: '20rem !custom',
95
+ width: '100% !custom',
96
+ })
97
+ }
98
+ ```
99
+
100
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Foundations/FocusVisible.tsx)
101
+
102
+ * **Outline (border.focus):** Buttons, fields, and other standalone controls draw a 2px solid outline.
103
+ * **Outline Contrast (3:1):** Measures 5.7:1 on the dark page, but 2.8:1 on the light page, below the minimum.
104
+ * **Invalid Fields (border.negative):** An invalid field draws its focus outline in the negative border color.
105
+ * **Keyboard Only (:focus-visible):** Shows for keyboard focus only, and stays hidden on a pointer press.
106
+ * **Menus and Listboxes:** The highlighted item takes a tinted background instead of an outline.
107
+ * **Keep the Outline:** Do not remove it with `outline: none`. A restyled control still needs one.
108
+ * **Leave Room (2px offset):** Leave room for the outline. A parent with `overflow: hidden` can clip it.
109
+
110
+ ### Focus Not Obscured
111
+
112
+ Never let sticky bars, banners, or toasts fully hide a focused control ([SC 2.4.11](https://www.w3.org/WAI/WCAG22/Understanding/focus-not-obscured-minimum.html)).
113
+
114
+ * **Sticky Bars (scroll-padding):** Set it on the scroll container to the height of sticky bars.
115
+ * **Toasts:** Keep toasts clear of the next focused control. F6 reaches them, and focus pauses their timers.
116
+
117
+ ### Overlays
118
+
119
+ Modal overlays, such as [Dialog](../components/dialog.md), [AlertDialog](../components/alert-dialog.md), and [Drawer](../components/drawer.md), manage focus from open to close. Anchored popups, such as [Popover](../components/popover.md), [Menu](../components/menu.md), and [Tooltip](../components/tooltip.md), follow their own rules.
120
+
121
+ * **On Open:** Focus moves into the overlay, so the reader starts inside it.
122
+ * **While Open (Tab and Shift+Tab):** Focus cycles within the overlay. The page behind is inert and locked. Escape closes it.
123
+ * **On Close:** Focus returns to the control that opened it, so the reader keeps their place.
124
+ * **Popover:** Moves focus inside without a trap, and the page behind stays interactive.
125
+ * **Menu:** Returns focus to the trigger on Escape or an outside press, as [Popover](../components/popover.md) does.
126
+ * **Tooltip:** Never moves focus. It opens on hover and keyboard focus, and Escape dismisses it.
127
+ * **Removed Trigger:** If the trigger is gone on close, such as a deleted row, move focus to a logical place.
128
+
129
+ ## Screen Readers
130
+
131
+ ### Name, Role, and Value
132
+
133
+ Every control exposes a name, a role, and its state ([SC 4.1.2](https://www.w3.org/WAI/WCAG22/Understanding/name-role-value.html)). Components set the role and state, and you supply the name.
134
+
135
+ * **Prefer Visible Labels:** Use a visible label where you can. Voice control users speak the visible text.
136
+ * **Match the Label:** Start the accessible name with the visible label text ([SC 2.5.3](https://www.w3.org/WAI/WCAG22/Understanding/label-in-name.html)).
137
+ * **Use Aria-Label Sparingly (aria-label):** Use it only when a control has no visible text. Name the action.
138
+ * **Leave the Role Out:** Don't put the role in the name. A screen reader already announces "button".
139
+
140
+ ### States and Values
141
+
142
+ * **Loading (aria-busy):** A loading button sets it for you. Add an `aria-label` to a standalone spinner.
143
+ * **Truncated Values (Hex):** Screen readers receive the full value behind the truncated text.
144
+ * **Struck Amounts (strikethrough):** Screen readers skip the strike, so say in text that the amount is replaced.
145
+ * **Tooltips (Tooltip):** Adds no ARIA to its trigger. Name the trigger itself, and keep essential content out.
146
+
147
+ ### Structure
148
+
149
+ Screen reader users navigate by headings and landmarks ([SC 1.3.1](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html)).
150
+
151
+ * **Title and H1 (h1):** Use one main heading per page, and a unique title that names it ([SC 2.4.2](https://www.w3.org/WAI/WCAG22/Understanding/page-titled.html)).
152
+ * **Heading Levels:** Use headings in order, without skipping levels, and pick each level for the outline.
153
+ * **Landmarks (main):** [AppShell](../components/app-shell.md) and [SidebarMenu](../components/sidebar-menu.md) render them. Layout primitives take one through `render`.
154
+ * **Named Regions (aria-label):** Name tab lists and the sidebar, and give each landmark a distinct label.
155
+ * **Skip Link:** If the sidebar holds many links, add a skip link to the main content.
156
+ * **Lists and Tables (list):** Mark up lists as lists and tabular data as a [Table](../components/table.md), not as styled divs.
157
+
158
+ ### Status Messages
159
+
160
+ A message that appears after page load needs a live region, which announces it without moving focus ([SC 4.1.3](https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html)).
161
+
162
+ * **Polite (polite):** Waits until the reader is idle. Use it for confirmations, progress, and result counts.
163
+ * **Assertive (assertive):** Interrupts the reader. Use it only for a failure the reader must handle now.
164
+ * **Render the Region First:** Render the region before its message, then update it. A new region can stay silent.
165
+ * **Alert (intent):** Negative and warning alerts interrupt as alerts. Info and positive alerts announce politely.
166
+ * **Toast (priority):** Announces politely. Set `'high'` only for urgent toasts, which interrupt.
167
+ * **Banner (role):** Has no live region. Add `status` or `alert` when it appears after the page loads.
168
+
169
+ ## Forms
170
+
171
+ ### Labels and Instructions
172
+
173
+ Label every field visibly, and state any format or requirement before the reader types ([SC 3.3.2](https://www.w3.org/WAI/WCAG22/Understanding/labels-or-instructions.html)).
174
+
175
+ **Do:** Label every field with a visible `Field.Label`, with hints in `Field.Description`.
176
+
177
+ ```tsx
178
+ /**
179
+ * Do example for "Labels and Instructions" on the Accessibility page.
180
+ * Label every field with a visible `Field.Label`, with hints in `Field.Description`.
181
+ * @module
182
+ */
183
+ import { Field, style, TextInput } from '@tempoxyz/ds'
184
+
185
+ /** Renders the static preview, which the guideline card shows inert. */
186
+ export function Demo() {
187
+ return (
188
+ <div {...styles.frame()}>
189
+ <Field.Root>
190
+ <Field.Label>Recipient</Field.Label>
191
+ <TextInput.Group>
192
+ <TextInput.Control placeholder="0x…" />
193
+ </TextInput.Group>
194
+ <Field.Description>An address or contact name.</Field.Description>
195
+ </Field.Root>
196
+ </div>
197
+ )
198
+ }
199
+
200
+ namespace styles {
201
+ export const frame = style({ maxWidth: '100% !custom', width: '16rem !custom' })
202
+ }
203
+ ```
204
+
205
+ **Don't:** Use a placeholder as the only label. It disappears on input.
206
+
207
+ ```tsx
208
+ /**
209
+ * Don't example for "Labels and Instructions" on the Accessibility page.
210
+ * Don't use a placeholder as the only label. It disappears on input and sits below 4.5:1 contrast.
211
+ * @module
212
+ */
213
+ import { style, TextInput } from '@tempoxyz/ds'
214
+
215
+ /** Renders the static preview, which the guideline card shows inert. */
216
+ export function Demo() {
217
+ return (
218
+ <div {...styles.frame()}>
219
+ <TextInput.Group>
220
+ <TextInput.Control aria-label="Recipient" placeholder="Recipient address or contact" />
221
+ </TextInput.Group>
222
+ </div>
223
+ )
224
+ }
225
+
226
+ namespace styles {
227
+ export const frame = style({ maxWidth: '100% !custom', width: '16rem !custom' })
228
+ }
229
+ ```
230
+
231
+ * **Linked Label (Field.Label):** [Field](../components/field.md) links the label to its control, which takes it as its name.
232
+ * **Hints and Errors (aria-describedby):** `Field.Description` and a shown `Field.Error` read after the control's name.
233
+ * **Required and Optional:** Mark required or optional fields in text, not by color or an asterisk alone.
234
+ * **Group Related Controls (legend):** Group radios in a [Fieldset](../components/fieldset.md) whose legend asks one question.
235
+ * **Autocomplete (autocomplete):** Set it on fields that collect personal data, such as email or name ([SC 1.3.5](https://www.w3.org/WAI/WCAG22/Understanding/identify-input-purpose.html)).
236
+
237
+ ### Errors
238
+
239
+ * **Error Text:** Describe the error and its fix in text next to the field ([SC 3.3.1](https://www.w3.org/WAI/WCAG22/Understanding/error-identification.html) and [SC 3.3.3](https://www.w3.org/WAI/WCAG22/Understanding/error-suggestion.html)).
240
+ * **Review Before Payment:** Before an action that cannot be undone, such as a payment, show a review step ([SC 3.3.4](https://www.w3.org/WAI/WCAG22/Understanding/error-prevention-legal-financial-data.html)).
241
+
242
+ ### Entry and Authentication
243
+
244
+ * **Redundant Entry:** Fill in or offer information the reader already entered in this flow ([SC 3.3.7](https://www.w3.org/WAI/WCAG22/Understanding/redundant-entry.html)).
245
+ * **Accessible Authentication (Paste):** Allow paste, passkeys, and password managers instead of a memory test ([SC 3.3.8](https://www.w3.org/WAI/WCAG22/Understanding/accessible-authentication-minimum.html)).
246
+
247
+ ## Touch and Pointer
248
+
249
+ ### Target Size
250
+
251
+ Every pointer target meets a minimum size ([SC 2.5.8](https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html)), and touch screens need larger targets.
252
+
253
+ * **Minimum (24 by 24px):** Every pointer target on Web, in CSS pixels. Links inside text are exempt.
254
+ * **Touch Screens (44 by 44):** Aim for this size on touch screens, including iOS and Android.
255
+ * **Button (32 to 56px):** Every size meets the minimum. The large size meets the touch target.
256
+ * **Checkbox and RadioGroup (36px):** The hit area around the indicator. Pair it with `Field.Label` so the label toggles it.
257
+ * **Slider (24px):** The height of the interactive track, which meets the minimum target size.
258
+ * **Smaller Targets:** Grow a small target, such as a row icon, or keep clear space around it.
259
+
260
+ ### Gestures and Dragging
261
+
262
+ * **Dragging:** Offer a single-pointer alternative to each drag, such as a press on the track ([SC 2.5.7](https://www.w3.org/WAI/WCAG22/Understanding/dragging-movements.html)).
263
+ * **Gestures:** Provide a single tap alternative to multi-finger and swipe gestures ([SC 2.5.1](https://www.w3.org/WAI/WCAG22/Understanding/pointer-gestures.html)).
264
+ * **Pointer Cancellation:** Trigger actions on pointer up, so the reader can slide away to cancel ([SC 2.5.2](https://www.w3.org/WAI/WCAG22/Understanding/pointer-cancellation.html)).
265
+
266
+ ## Zoom and Reflow
267
+
268
+ ### Reflow
269
+
270
+ Content reflows to a narrow viewport without loss and without scrolling in two directions ([SC 1.4.10](https://www.w3.org/WAI/WCAG22/Understanding/reflow.html)).
271
+
272
+ * **Narrow Viewport (320px):** Reflow to this width, which a 1280px window reaches at 400% zoom.
273
+ * **Text Resize (200%):** Text resizes to this size without loss of content or function ([SC 1.4.4](https://www.w3.org/WAI/WCAG22/Understanding/resize-text.html)).
274
+ * **Columns:** Stack columns at narrow widths. Fitted grids, wrapping rows, and containers reflow by default.
275
+ * **Long Values:** Wrap long values, or truncate them with a way to view and copy the full value.
276
+ * **Wide Content:** Tables, code blocks, and charts may scroll horizontally inside their own container.
277
+
278
+ ### Text Spacing
279
+
280
+ Content must survive these spacing overrides at once, without clipping or overlap ([SC 1.4.12](https://www.w3.org/WAI/WCAG22/Understanding/text-spacing.html)).
281
+
282
+ * **Line Height (1.5):** A multiple of the font size, on every line.
283
+ * **Paragraph Spacing (2):** A multiple of the font size, after paragraphs.
284
+ * **Letter Spacing (0.12em):** Added between letters.
285
+ * **Word Spacing (0.16em):** Added between words.
286
+
287
+ **Do:** Size text containers with `min-height` and padding, so they grow with their content.
288
+
289
+ ```tsx
290
+ <Surface
291
+ size="small"
292
+ style={{ letterSpacing: '0.12em', lineHeight: 1.5, minHeight: 40, width: 200 }}
293
+ >
294
+ Alice sent you 25.00 USDC.
295
+ </Surface>
296
+ ```
297
+
298
+ **Don't:** Set a fixed `height` on a text container. Spacing overrides clip its text.
299
+
300
+ ```tsx
301
+ <Surface
302
+ size="small"
303
+ style={{
304
+ height: 40,
305
+ letterSpacing: '0.12em',
306
+ lineHeight: 1.5,
307
+ overflow: 'hidden',
308
+ width: 200,
309
+ }}
310
+ >
311
+ Alice sent you 25.00 USDC.
312
+ </Surface>
313
+ ```
314
+
315
+ ## User Preferences
316
+
317
+ * **Forced Colors (forced-colors):** In contrast themes, buttons and fields keep a system focus outline. Icons use text color.
318
+ * **Text Size (rem):** Spacing scales with the default font size. Test with a larger one.
319
+
320
+ ## Motion
321
+
322
+ [Motion](motion.md#reduced-motion) shows how to apply the reduced-motion preference to your own styles.
323
+
324
+ * **Reduced Motion (prefers-reduced-motion):** Components remove movement and scaling, but keep color changes and brief fades.
325
+ * **Moving Content (5 seconds):** Let the reader pause, stop, or hide anything that moves on its own for longer ([SC 2.2.2](https://www.w3.org/WAI/WCAG22/Understanding/pause-stop-hide.html)).
326
+ * **Flashing (3 per second):** Never flash content more often than this, even for a short alert ([SC 2.3.1](https://www.w3.org/WAI/WCAG22/Understanding/three-flashes-or-below-threshold.html)).
327
+
328
+ ## Content
329
+
330
+ * **Link Text:** Describe the destination, even out of context ([SC 2.4.4](https://www.w3.org/WAI/WCAG22/Understanding/link-purpose-in-context.html)). See [Writing Style](content/writing-style.md#links).
331
+ * **Alt Text (alt):** Describe meaningful images, and leave it empty on decorative ones ([SC 1.1.1](https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html)).
332
+ * **Time Limits:** Announce a time limit before it starts, and let the reader extend it ([SC 2.2.1](https://www.w3.org/WAI/WCAG22/Understanding/timing-adjustable.html)).
333
+ * **Toast Actions (timeout: 0):** Offer a toast's action elsewhere too, or keep the toast open until dismissed.
334
+ * **Page Language (lang):** Set the page language on the `<html>` element ([SC 3.1.1](https://www.w3.org/WAI/WCAG22/Understanding/language-of-page.html)).
335
+
336
+ ## Testing
337
+
338
+ Components run their tests in real Chromium at desktop and mobile widths, with real pointer and keyboard input, in both schemes and with reduced motion. Automated checks catch only some problems, so test each screen by hand.
339
+
340
+ * **Automated Checks:** Run a checker on each screen, then confirm each result by hand.
341
+ * **Keyboard:** Use every control by keyboard alone. Focus stays visible and never hides behind a sticky bar.
342
+ * **Screen Reader (VoiceOver or NVDA):** Use VoiceOver with Safari and NVDA with Firefox or Chrome, and check each name and state.
343
+
344
+ ## Checklist
345
+
346
+ Before you ship a screen, confirm each item.
347
+
348
+ * **Structure:** One h1, headings in order, landmarks, and a DOM that matches the visual order.
349
+ * **Keyboard:** Every action works by keyboard, without traps, and focus stays visible and returns on close.
350
+ * **Names:** Visible field labels, named icon buttons, and links that make sense out of context.
351
+ * **Messages:** Errors state the fix, and status messages announce without moving focus.
352
+ * **Contrast:** Text at 4.5:1 and outlines at 3:1 in both schemes, with nothing shown by color alone.
353
+ * **Zoom and Targets:** Works at 320px wide and 200% zoom, with 24px targets on Web and 44pt on mobile.
354
+ * **Motion:** Respects reduced motion, and nothing flashes more than three times a second.
355
+ * **Time:** Action toasts stay until dismissed, and sessions warn before they expire.
356
+
357
+ ## Related
358
+
359
+ [Color](color.md)
360
+
361
+ Covers contrast and color use.
362
+
363
+ [Motion](motion.md)
364
+
365
+ Covers reduced motion.
366
+
367
+ [Forms](../patterns/forms.md)
368
+
369
+ Covers labels and grouping.
370
+
371
+ [Errors and Validation](../patterns/errors-and-validation.md)
372
+
373
+ Covers writing and announcing errors.
374
+
375
+ [Button](../components/button.md)
376
+
377
+ Use for icon buttons and loading states.
@@ -0,0 +1,150 @@
1
+ # Agents
2
+
3
+ How coding agents read these docs and the source, and the rules they follow.
4
+
5
+ ## Overview
6
+
7
+ Coding agents read the same guidance as people. This site serves every page as Markdown, and the library source documents every export, so an agent can work from the docs or from your codebase.
8
+
9
+ The rules on this page turn that guidance into requirements for generated UI, and type checks and lint rules verify what a tool can check.
10
+
11
+ ## Point Your Agent at the Docs
12
+
13
+ Give your agent one of these entry points.
14
+
15
+ * **Agent Prompt:** The [Getting Started](../introduction/getting-started.md#agent-prompt) prompt points your agent at the home page, which returns the page index.
16
+ * **Page Index (/llms.txt):** [The index](/llms.txt) lists every page in sidebar order, with its Markdown link and description.
17
+ * **Full Text (/llms-full.txt):** [One file](/llms-full.txt) holds every page's Markdown, each after a `---` line and a `Source:` URL.
18
+ * **Copy Page:** On wide screens, Copy page copies the page's Markdown, and View markdown opens it.
19
+ * **In the Package (dist/docs):** The package ships every page's Markdown for its version, with an agent guide and an index for each system.
20
+
21
+ ### Markdown Twins
22
+
23
+ Every page has a Markdown twin. The page URL returns the twin or the HTML page, depending on the request.
24
+
25
+ ```sh
26
+ curl https://ds.tehq.dev/docs/components/button
27
+ ```
28
+
29
+ * **Markdown Path:** A page path that ends in `.md` returns the twin, such as `/docs/components/button.md`.
30
+ * **Terminal Clients:** Requests from curl, Wget, HTTPie, and xh receive the twin at the page URL.
31
+ * **Agents and Crawlers:** Requests from a known AI agent or crawler receive the twin at the page URL.
32
+ * **Accept Header:** Ranking `text/markdown` or `text/plain` at or above `text/html` returns the twin.
33
+ * **Search and Previews:** Search engine crawlers and link previews still receive the HTML page.
34
+ * **Canonical Link:** Each Markdown response carries a canonical `Link` header to the HTML page.
35
+
36
+ ### What Changes in Markdown
37
+
38
+ A twin keeps the page's text, headings, and tables, and turns interactive parts into plain text.
39
+
40
+ * **Do and Don't:** Each Do and Don't card becomes a plain paragraph in the twin, starting with **Do:** or **Don't:**.
41
+ * **Live Examples (tsx):** Each live example becomes a code block with its full source and a link to the example.
42
+ * **Source Links:** Component pages link to the source on GitHub, whose TSDoc documents every prop.
43
+ * **Setup Options:** Each setup option on Getting Started takes its own heading, so the agent reads every one.
44
+
45
+ ## Documentation in the Source
46
+
47
+ Each public component and part carries TSDoc with its purpose, accessibility behavior, and a short example, so an agent in your codebase reads it without fetching this site. Check the type declarations too, since prop and default coverage is still growing.
48
+
49
+ ```tsx
50
+ /**
51
+ * An inline message tinted by `intent`. The `negative` and `warning`
52
+ * intents render `role="alert"` and interrupt screen readers.
53
+ */
54
+ export function Alert(props: Alert.Props) {}
55
+ ```
56
+
57
+ ## Rules for Generating Tempo UI
58
+
59
+ These rules are requirements, and so are the Guidelines, Content, and Accessibility sections of every page. If a request conflicts with a guideline, follow the request and point out the conflict.
60
+
61
+ ### Use Library Components First
62
+
63
+ * **Catalog First:** Check the [Components](../components.md) overview, which compares similar ones, before you write markup.
64
+ * **Intent First:** Choose each component by the job of its content, as [Building From Intent](intent.md) describes, not by the old markup.
65
+ * **Public Entrypoints:** Import `@tempoxyz/ds` on Web and `@tempoxyz/ds/mobile` in React Native, with icons from `/icons`.
66
+ * **No Rebuilds:** Don't rebuild a library component or swap in a raw Base UI primitive or another library.
67
+ * **Named Parts:** Build larger components from their named parts, such as `Dialog.Root` and `Dialog.Title`.
68
+
69
+ ### Style With Tokens
70
+
71
+ * **Style Definitions:** Style your own markup with `style` and `variants`, grouped in a `namespace styles` block.
72
+ * **Tokens:** Set colors, spacing, type, and radii with tokens, such as `content.primary` and `'24'`.
73
+ * **Custom Values:** Mark the rare literal that no token fits with `!custom`, as in `'24rem !custom'`.
74
+ * **One Styling System:** Don't add utility classes or a separate stylesheet to UI built with the library.
75
+ * **Variable Scopes:** Components inherit variables, so apply `vars()` only to override values or fix a color scheme.
76
+
77
+ ### Use Only Documented APIs
78
+
79
+ * **Documented Props:** Use only the props, parts, and values that a component page or its TSDoc documents.
80
+ * **Missing Pieces:** Build a missing variant or token locally with `style`, and flag it for a [proposal](../introduction/faq.md#how-do-i-request-a-component-variant-or-token).
81
+ * **Installed Package:** Don't patch the installed package or target the class names that it generates.
82
+
83
+ ### Follow the Guidelines
84
+
85
+ * **Whole Pages:** Read a component's whole page before you use it, not only its Examples section.
86
+ * **Patterns:** Apply the foundations and patterns that fit, such as [Payments](../patterns/payments.md) and [Blockchain Values](../patterns/blockchain-values.md).
87
+ * **Native Semantics:** Keep native semantics, and meet every item on the [Accessibility](accessibility.md#checklist) checklist.
88
+
89
+ ### Write Copy to the Content Guidelines
90
+
91
+ * **Labels and Terms:** Use sentence case and verb-first button labels, as [Writing Style](content/writing-style.md#write-labels) describes.
92
+ * **Amounts and Addresses:** Format amounts with [Amount](../components/amount.md) and a `currency` or `symbol`, and addresses and hashes with [Hex](../components/hex.md).
93
+ * **Errors:** Write error messages that state the fix, as [Writing Style](content/writing-style.md#write-messages) describes.
94
+
95
+ ## Checks
96
+
97
+ If a tool can check a rule, run it as a check.
98
+
99
+ * **Types (tsc):** Token names are typed, so an unknown token fails to compile.
100
+ * **Lint (@tempoxyz/ds/oxlint):** Checks styles, imports, accessible names, and hand-built components, as [Linter](linter.md) lists.
101
+
102
+ ## Add Rules to Your Project
103
+
104
+ Add instructions like these to your project's AGENTS.md or CLAUDE.md file, so every agent session starts from the docs.
105
+
106
+ ```md title="AGENTS.md"
107
+ ## UI
108
+
109
+ - Build UI with Tempo Design System: `@tempoxyz/ds` on web, `@tempoxyz/ds/mobile` in React Native.
110
+ - Read https://ds.tehq.dev/llms.txt first. Before using a component, read its page as Markdown, such as https://ds.tehq.dev/docs/components/button.md.
111
+ - Treat each page's Guidelines, Content, and Accessibility sections as requirements.
112
+ - Choose each component by what its content means, not by the markup it replaces. Read https://ds.tehq.dev/docs/foundations/intent.md before you port a screen.
113
+ - Style with `style` and TDS tokens. Don't hardcode colors or spacing.
114
+ - Write interface copy with the Content foundations, such as Writing Style.
115
+ ```
116
+
117
+ ## Writing for Agents
118
+
119
+ Keep documentation readable for both audiences.
120
+
121
+ * **Title and Description:** Start each page with a title and a one-sentence description of the page.
122
+ * **Shared Headings:** Use the same headings across pages, such as Overview, Guidelines, and Accessibility.
123
+ * **One Rule per Sentence:** Put each rule in its own sentence, so an agent can quote it on its own.
124
+ * **Do and Don't Cards:** Use Do and Don't cards for guidance, so their verdict survives in Markdown.
125
+
126
+ ## Related
127
+
128
+ [Getting Started](../introduction/getting-started.md)
129
+
130
+ Covers setup and the agent prompt.
131
+
132
+ [FAQ](../introduction/faq.md)
133
+
134
+ Covers common questions.
135
+
136
+ [Components](../components.md)
137
+
138
+ Covers the component catalog.
139
+
140
+ [Building From Intent](intent.md)
141
+
142
+ Covers choosing a component by the job of its content.
143
+
144
+ [Linter](linter.md)
145
+
146
+ Covers the lint rules that check library use.
147
+
148
+ [Voice](content/voice.md)
149
+
150
+ Covers how Tempo UI copy sounds.