@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,516 @@
1
+ # Pagination
2
+
3
+ Moves between pages of a long list.
4
+
5
+ [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/Pagination.tsx)
6
+
7
+ ## Overview
8
+
9
+ Pagination renders a navigation landmark with links to each page of a list, plus previous and next steps.
10
+
11
+ ## Examples
12
+
13
+ ### Basic
14
+
15
+ ```tsx
16
+ import { Pagination } from '@tempoxyz/ds'
17
+
18
+ function Pages(props: { current: number; size?: Pagination.Props['size'] }) {
19
+ return (
20
+ <Pagination size={props.size}>
21
+ <Pagination.Previous disabled={props.current === 1} href="#" />
22
+ <Pagination.Page current={props.current === 1} href="#">
23
+ 1
24
+ </Pagination.Page>
25
+ <Pagination.Ellipsis />
26
+ <Pagination.Page current={props.current === 4} href="#">
27
+ 4
28
+ </Pagination.Page>
29
+ <Pagination.Ellipsis />
30
+ <Pagination.Page current={props.current === 9} href="#">
31
+ 9
32
+ </Pagination.Page>
33
+ <Pagination.Next disabled={props.current === 9} href="#" />
34
+ </Pagination>
35
+ )
36
+ }
37
+
38
+ export function Demo() {
39
+ return <Pages current={4} />
40
+ }
41
+ ```
42
+
43
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Pagination/Basic.tsx)
44
+
45
+ ### Size
46
+
47
+ Set `size` to `small`, `medium` (default), or `large`.
48
+
49
+ ```tsx
50
+ import { Pagination, Stack } from '@tempoxyz/ds'
51
+
52
+ function Pages(props: { current: number; size?: Pagination.Props['size'] }) {
53
+ return (
54
+ <Pagination size={props.size}>
55
+ <Pagination.Previous disabled={props.current === 1} href="#" />
56
+ <Pagination.Page current={props.current === 1} href="#">
57
+ 1
58
+ </Pagination.Page>
59
+ <Pagination.Ellipsis />
60
+ <Pagination.Page current={props.current === 4} href="#">
61
+ 4
62
+ </Pagination.Page>
63
+ <Pagination.Ellipsis />
64
+ <Pagination.Page current={props.current === 9} href="#">
65
+ 9
66
+ </Pagination.Page>
67
+ <Pagination.Next disabled={props.current === 9} href="#" />
68
+ </Pagination>
69
+ )
70
+ }
71
+
72
+ export function Demo() {
73
+ return (
74
+ <Stack gap="16">
75
+ <Pages current={4} size="small" />
76
+ <Pages current={4} size="medium" />
77
+ <Pages current={4} size="large" />
78
+ </Stack>
79
+ )
80
+ }
81
+ ```
82
+
83
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Pagination/Size.tsx)
84
+
85
+ ### Current
86
+
87
+ Set `current` on exactly one `Pagination.Page`. `Pagination.Previous` and `Pagination.Next` take `disabled` at either end.
88
+
89
+ ```tsx
90
+ import { Pagination, Stack } from '@tempoxyz/ds'
91
+
92
+ function Pages(props: { current: number; size?: Pagination.Props['size'] }) {
93
+ return (
94
+ <Pagination size={props.size}>
95
+ <Pagination.Previous disabled={props.current === 1} href="#" />
96
+ <Pagination.Page current={props.current === 1} href="#">
97
+ 1
98
+ </Pagination.Page>
99
+ <Pagination.Ellipsis />
100
+ <Pagination.Page current={props.current === 4} href="#">
101
+ 4
102
+ </Pagination.Page>
103
+ <Pagination.Ellipsis />
104
+ <Pagination.Page current={props.current === 9} href="#">
105
+ 9
106
+ </Pagination.Page>
107
+ <Pagination.Next disabled={props.current === 9} href="#" />
108
+ </Pagination>
109
+ )
110
+ }
111
+
112
+ export function Demo() {
113
+ return (
114
+ <Stack gap="16">
115
+ <Pages current={1} />
116
+ <Pages current={4} />
117
+ <Pages current={9} />
118
+ </Stack>
119
+ )
120
+ }
121
+ ```
122
+
123
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Pagination/Current.tsx)
124
+
125
+ ## Anatomy
126
+
127
+ Import the component and assemble its parts.
128
+
129
+ ```tsx
130
+ import { Pagination } from '@tempoxyz/ds'
131
+
132
+ <Pagination>
133
+ <Pagination.Previous />
134
+ <Pagination.Page />
135
+ <Pagination.Ellipsis />
136
+ <Pagination.Next />
137
+ </Pagination>
138
+ ```
139
+
140
+ ## Guidelines
141
+
142
+ ### When to Use
143
+
144
+ * Split long lists that people scan, sort, and revisit, such as transaction history or webhook deliveries.
145
+ * Paginate tables where position matters, such as a shared link to page 3.
146
+
147
+ ### When Not to Use
148
+
149
+ * Use a `secondary` [Button](button.md) labelled Load more at the end of a feed, such as wallet Activity.
150
+ * Use [Stepper](stepper.md) for progress through a flow.
151
+ * Use [Tabs](tabs.md) to split a list by category, such as Incoming and Outgoing.
152
+ * Use a [Table](table.md) or [ListGroup](list-group.md) without pagination when the list fits on one screen.
153
+
154
+ ### Choose Pagination or Load More
155
+
156
+ * **Pagination (Tables and logs):** Each page has a URL, readers jump to any page, and the footer stays reachable.
157
+ * **Load More (Feeds):** New items append below the last one. The footer is reachable after each load.
158
+
159
+ Avoid infinite scroll on the web. It pushes the footer out of reach and gives keyboard users no stopping point.
160
+
161
+ ### Link Every Page
162
+
163
+ Give each `Pagination.Page` an `href` with its number. Links then survive a reload, open in a new tab, and work with Back. Pass `render` to use your router's link.
164
+
165
+ **Do:** Put the page number in the URL, such as `?page=3`.
166
+
167
+ ```tsx
168
+ /**
169
+ * Do example for "Link Every Page" on the Pagination page.
170
+ * Put the page number in the URL, such as `?page=3`.
171
+ * @module
172
+ */
173
+ import { Pagination, style } from '@tempoxyz/ds'
174
+
175
+ /** Renders the static preview, which the guideline card shows inert. */
176
+ export function Demo() {
177
+ return (
178
+ <div {...styles.page()}>
179
+ <span {...styles.address()}>console.tempo.xyz/activity?page=3</span>
180
+ <Pagination size="small">
181
+ <Pagination.Previous href="#" />
182
+ <Pagination.Page href="#">2</Pagination.Page>
183
+ <Pagination.Page current href="#">
184
+ 3
185
+ </Pagination.Page>
186
+ <Pagination.Page href="#">4</Pagination.Page>
187
+ <Pagination.Next href="#" />
188
+ </Pagination>
189
+ </div>
190
+ )
191
+ }
192
+
193
+ namespace styles {
194
+ export const address = style({
195
+ backgroundColor: 'container.regular',
196
+ borderRadius: 'full',
197
+ color: 'content.secondary',
198
+ cornerShape: 'round',
199
+ paddingBlock: '4',
200
+ paddingInline: '12',
201
+ typography: 'body.b3',
202
+ })
203
+
204
+ export const page = style({
205
+ alignItems: 'flex-start',
206
+ display: 'flex',
207
+ flexDirection: 'column',
208
+ rowGap: '16',
209
+ })
210
+ }
211
+ ```
212
+
213
+ **Don't:** Change pages without changing the URL.
214
+
215
+ ```tsx
216
+ /**
217
+ * Don't example for "Link Every Page" on the Pagination page.
218
+ * Don't change pages without changing the URL.
219
+ * @module
220
+ */
221
+ import { Pagination, style } from '@tempoxyz/ds'
222
+
223
+ /** Renders the static preview, which the guideline card shows inert. */
224
+ export function Demo() {
225
+ return (
226
+ <div {...styles.page()}>
227
+ <span {...styles.address()}>console.tempo.xyz/activity</span>
228
+ <Pagination size="small">
229
+ <Pagination.Previous href="#" />
230
+ <Pagination.Page href="#">2</Pagination.Page>
231
+ <Pagination.Page current href="#">
232
+ 3
233
+ </Pagination.Page>
234
+ <Pagination.Page href="#">4</Pagination.Page>
235
+ <Pagination.Next href="#" />
236
+ </Pagination>
237
+ </div>
238
+ )
239
+ }
240
+
241
+ namespace styles {
242
+ export const address = style({
243
+ backgroundColor: 'container.regular',
244
+ borderRadius: 'full',
245
+ color: 'content.secondary',
246
+ cornerShape: 'round',
247
+ paddingBlock: '4',
248
+ paddingInline: '12',
249
+ typography: 'body.b3',
250
+ })
251
+
252
+ export const page = style({
253
+ alignItems: 'flex-start',
254
+ display: 'flex',
255
+ flexDirection: 'column',
256
+ rowGap: '16',
257
+ })
258
+ }
259
+ ```
260
+
261
+ ### Truncate Long Ranges
262
+
263
+ * **Always show:** The first, last, and current pages.
264
+ * **Skipped ranges:** Replace each with a `Pagination.Ellipsis`.
265
+ * **Limit:** Keep about seven page items, with the current page's neighbors when there is room.
266
+
267
+ **Do:** Keep the first and last pages around the current one.
268
+
269
+ ```tsx
270
+ /**
271
+ * Do example for "Truncate Long Ranges" on the Pagination page.
272
+ * Keep the first and last pages around the current one.
273
+ * @module
274
+ */
275
+ import { Pagination } from '@tempoxyz/ds'
276
+
277
+ /** Renders the static preview, which the guideline card shows inert. */
278
+ export function Demo() {
279
+ return (
280
+ <Pagination size="small">
281
+ <Pagination.Previous href="#" />
282
+ <Pagination.Page href="#">1</Pagination.Page>
283
+ <Pagination.Ellipsis />
284
+ <Pagination.Page href="#">4</Pagination.Page>
285
+ <Pagination.Page current href="#">
286
+ 5
287
+ </Pagination.Page>
288
+ <Pagination.Page href="#">6</Pagination.Page>
289
+ <Pagination.Ellipsis />
290
+ <Pagination.Page href="#">49</Pagination.Page>
291
+ <Pagination.Next href="#" />
292
+ </Pagination>
293
+ )
294
+ }
295
+ ```
296
+
297
+ **Don't:** Show only the pages next to the current one.
298
+
299
+ ```tsx
300
+ /**
301
+ * Don't example for "Truncate Long Ranges" on the Pagination page.
302
+ * Don't show only the pages next to the current one.
303
+ * @module
304
+ */
305
+ import { Pagination } from '@tempoxyz/ds'
306
+
307
+ /** Renders the static preview, which the guideline card shows inert. */
308
+ export function Demo() {
309
+ return (
310
+ <Pagination size="small">
311
+ <Pagination.Previous href="#" />
312
+ <Pagination.Page href="#">4</Pagination.Page>
313
+ <Pagination.Page current href="#">
314
+ 5
315
+ </Pagination.Page>
316
+ <Pagination.Page href="#">6</Pagination.Page>
317
+ <Pagination.Next href="#" />
318
+ </Pagination>
319
+ )
320
+ }
321
+ ```
322
+
323
+ ### Keep Previous and Next in Place
324
+
325
+ Render `Pagination.Previous` and `Pagination.Next` on every page. Set `disabled` at either end instead of removing them, so the page links do not shift.
326
+
327
+ **Do:** Disable Previous on the first page.
328
+
329
+ ```tsx
330
+ /**
331
+ * Do example for "Keep Previous and Next in Place" on the Pagination page.
332
+ * Disable Previous on the first page.
333
+ * @module
334
+ */
335
+ import { Pagination } from '@tempoxyz/ds'
336
+
337
+ /** Renders the static preview, which the guideline card shows inert. */
338
+ export function Demo() {
339
+ return (
340
+ <Pagination size="small">
341
+ <Pagination.Previous disabled />
342
+ <Pagination.Page current href="#">
343
+ 1
344
+ </Pagination.Page>
345
+ <Pagination.Page href="#">2</Pagination.Page>
346
+ <Pagination.Page href="#">3</Pagination.Page>
347
+ <Pagination.Next href="#" />
348
+ </Pagination>
349
+ )
350
+ }
351
+ ```
352
+
353
+ **Don't:** Remove Previous, which moves every page link when it returns.
354
+
355
+ ```tsx
356
+ /**
357
+ * Don't example for "Keep Previous and Next in Place" on the Pagination page.
358
+ * Don't remove Previous, which moves every page link when it returns.
359
+ * @module
360
+ */
361
+ import { Pagination } from '@tempoxyz/ds'
362
+
363
+ /** Renders the static preview, which the guideline card shows inert. */
364
+ export function Demo() {
365
+ return (
366
+ <Pagination size="small">
367
+ <Pagination.Page current href="#">
368
+ 1
369
+ </Pagination.Page>
370
+ <Pagination.Page href="#">2</Pagination.Page>
371
+ <Pagination.Page href="#">3</Pagination.Page>
372
+ <Pagination.Next href="#" />
373
+ </Pagination>
374
+ )
375
+ }
376
+ ```
377
+
378
+ ### Show the Range You're Viewing
379
+
380
+ Place a count beside the control, directly below its list.
381
+
382
+ **Do:** Show the rows on screen and the total, such as Showing 51–75 of 1,204 transactions.
383
+
384
+ ```tsx
385
+ /**
386
+ * Do example for "Show the Range You're Viewing" on the Pagination page.
387
+ * Show the rows on screen and the total, such as Showing 51–75 of 1,204 transactions.
388
+ * @module
389
+ */
390
+ import { Pagination, style } from '@tempoxyz/ds'
391
+
392
+ /** Renders the static preview, which the guideline card shows inert. */
393
+ export function Demo() {
394
+ return (
395
+ <div {...styles.row()}>
396
+ <span {...styles.count()}>Showing 51–75 of 1,204 transactions</span>
397
+ <Pagination size="small">
398
+ <Pagination.Previous href="#" />
399
+ <Pagination.Page href="#">2</Pagination.Page>
400
+ <Pagination.Page current href="#">
401
+ 3
402
+ </Pagination.Page>
403
+ <Pagination.Page href="#">4</Pagination.Page>
404
+ <Pagination.Next href="#" />
405
+ </Pagination>
406
+ </div>
407
+ )
408
+ }
409
+
410
+ namespace styles {
411
+ export const count = style({ color: 'content.secondary', typography: 'body.b3' })
412
+
413
+ export const row = style({
414
+ alignItems: 'center',
415
+ display: 'flex',
416
+ flexWrap: 'wrap',
417
+ gap: '12',
418
+ justifyContent: 'space-between',
419
+ width: '100% !custom',
420
+ })
421
+ }
422
+ ```
423
+
424
+ **Don't:** Show page numbers without the count.
425
+
426
+ ```tsx
427
+ /**
428
+ * Don't example for "Show the Range You're Viewing" on the Pagination page.
429
+ * Don't show page numbers without the count.
430
+ * @module
431
+ */
432
+ import { Pagination, style } from '@tempoxyz/ds'
433
+
434
+ /** Renders the static preview, which the guideline card shows inert. */
435
+ export function Demo() {
436
+ return (
437
+ <div {...styles.row()}>
438
+ <Pagination size="small">
439
+ <Pagination.Previous href="#" />
440
+ <Pagination.Page href="#">2</Pagination.Page>
441
+ <Pagination.Page current href="#">
442
+ 3
443
+ </Pagination.Page>
444
+ <Pagination.Page href="#">4</Pagination.Page>
445
+ <Pagination.Next href="#" />
446
+ </Pagination>
447
+ </div>
448
+ )
449
+ }
450
+
451
+ namespace styles {
452
+ export const row = style({
453
+ alignItems: 'center',
454
+ display: 'flex',
455
+ flexWrap: 'wrap',
456
+ gap: '12',
457
+ justifyContent: 'space-between',
458
+ width: '100% !custom',
459
+ })
460
+ }
461
+ ```
462
+
463
+ ### Match Size to the List
464
+
465
+ * **Small (32px):** Under dense tables, like Tempo Performance runs.
466
+ * **Medium (40px):** The default.
467
+ * **Large (56px):** Touch-first layouts.
468
+
469
+ ## Content
470
+
471
+ * **Steps:** Keep the default Previous and Next. If children replace them, keep both descriptive, such as Newer and Older.
472
+ * **Count:** Name the rows of the list, such as transactions or deliveries.
473
+ * **Numbers:** Use numerals, and group the digits of large totals, such as 1,204.
474
+
475
+ ## Accessibility
476
+
477
+ The current page and disabled steps carry ARIA states.
478
+
479
+ ### Semantics
480
+
481
+ * **Root (navigation):** A landmark named "Pagination" that wraps a list of pages.
482
+ * **Parts (li):** Each part is a list item. Pages and steps render links by default.
483
+ * **Current Page (aria-current):** Set by `current`. Screen readers announce the page as current.
484
+ * **Disabled Steps (aria-disabled):** Renders as text and leaves the tab order. With `render`, it keeps your element.
485
+ * **Pagination.Ellipsis:** Plain text that takes no focus. The chevron icons are hidden from assistive technology.
486
+
487
+ ### Keyboard
488
+
489
+ * **Move Between Links (Tab):** Moves through the links in order. Skips ellipses and disabled steps without `render`.
490
+ * **Follow a Link (Enter):** Follows the focused link.
491
+
492
+ ### Your Responsibilities
493
+
494
+ * **Mark One Current Page (current):** Set it on exactly one page.
495
+ * **Block Disabled Custom Links (render):** For a custom disabled step, block navigation and remove it from the tab order yourself.
496
+ * **Name Each Pagination (aria-label):** If a page holds more than one, give each a distinct name, such as "Deliveries pagination".
497
+ * **Name Page Links (SC 2.4.4):** Consider an `aria-label` such as "Page 4". A bare number means little out of context.
498
+ * **Handle In-Place Loads:** After a client-side page change, move focus to the start of the results, such as the heading.
499
+
500
+ ## Related
501
+
502
+ [Table](table.md)
503
+
504
+ Use for the rows you paginate.
505
+
506
+ [ListGroup](list-group.md)
507
+
508
+ Use for lists of records.
509
+
510
+ [Button](button.md)
511
+
512
+ Use for a Load more action.
513
+
514
+ [Tables and Lists](../patterns/tables-and-lists.md)
515
+
516
+ Covers sorting, filtering, and paging data.