@tempoxyz/ds 0.3.9 → 0.3.11

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 (128) hide show
  1. package/dist/docs/AGENTS.md +9 -0
  2. package/dist/docs/components/accordion.md +489 -0
  3. package/dist/docs/components/address-card.md +147 -0
  4. package/dist/docs/components/agent-logo.md +194 -0
  5. package/dist/docs/components/alert-dialog.md +631 -0
  6. package/dist/docs/components/alert.md +448 -0
  7. package/dist/docs/components/amount-input.md +305 -0
  8. package/dist/docs/components/amount.md +794 -0
  9. package/dist/docs/components/app-shell.md +559 -0
  10. package/dist/docs/components/asset-chip.md +294 -0
  11. package/dist/docs/components/autocomplete.md +619 -0
  12. package/dist/docs/components/avatar.md +321 -0
  13. package/dist/docs/components/badge.md +339 -0
  14. package/dist/docs/components/badged-logo.md +116 -0
  15. package/dist/docs/components/banner.md +379 -0
  16. package/dist/docs/components/bar-chart.md +208 -0
  17. package/dist/docs/components/breadcrumbs.md +380 -0
  18. package/dist/docs/components/button-group.md +286 -0
  19. package/dist/docs/components/button.md +650 -0
  20. package/dist/docs/components/calendar.md +375 -0
  21. package/dist/docs/components/callout.md +96 -0
  22. package/dist/docs/components/checkbox-group.md +521 -0
  23. package/dist/docs/components/checkbox.md +467 -0
  24. package/dist/docs/components/choice-group.md +516 -0
  25. package/dist/docs/components/choicebox.md +641 -0
  26. package/dist/docs/components/code.md +100 -0
  27. package/dist/docs/components/combobox.md +939 -0
  28. package/dist/docs/components/container.md +257 -0
  29. package/dist/docs/components/copy-button.md +642 -0
  30. package/dist/docs/components/date-picker.md +514 -0
  31. package/dist/docs/components/dialog.md +1332 -0
  32. package/dist/docs/components/drawer.md +966 -0
  33. package/dist/docs/components/empty.md +340 -0
  34. package/dist/docs/components/field.md +570 -0
  35. package/dist/docs/components/fieldset.md +398 -0
  36. package/dist/docs/components/frame.md +434 -0
  37. package/dist/docs/components/gauge.md +299 -0
  38. package/dist/docs/components/get-started-visual.md +117 -0
  39. package/dist/docs/components/grid.md +288 -0
  40. package/dist/docs/components/hero-visual.md +155 -0
  41. package/dist/docs/components/hex.md +487 -0
  42. package/dist/docs/components/icon-tile.md +292 -0
  43. package/dist/docs/components/identicon.md +371 -0
  44. package/dist/docs/components/inline.md +233 -0
  45. package/dist/docs/components/inset.md +225 -0
  46. package/dist/docs/components/kbd.md +423 -0
  47. package/dist/docs/components/list-group.md +981 -0
  48. package/dist/docs/components/loading-dots.md +237 -0
  49. package/dist/docs/components/menu.md +934 -0
  50. package/dist/docs/components/native-select.md +204 -0
  51. package/dist/docs/components/network-logo.md +248 -0
  52. package/dist/docs/components/number-field.md +543 -0
  53. package/dist/docs/components/otp-field.md +616 -0
  54. package/dist/docs/components/pagination.md +516 -0
  55. package/dist/docs/components/popover.md +544 -0
  56. package/dist/docs/components/progress.md +388 -0
  57. package/dist/docs/components/qr.md +314 -0
  58. package/dist/docs/components/radio-group.md +528 -0
  59. package/dist/docs/components/secret-value.md +406 -0
  60. package/dist/docs/components/select.md +751 -0
  61. package/dist/docs/components/separator.md +379 -0
  62. package/dist/docs/components/sidebar-menu.md +922 -0
  63. package/dist/docs/components/skeleton.md +517 -0
  64. package/dist/docs/components/slider.md +539 -0
  65. package/dist/docs/components/snippet.md +424 -0
  66. package/dist/docs/components/spinner.md +216 -0
  67. package/dist/docs/components/split-bar.md +139 -0
  68. package/dist/docs/components/split-button.md +464 -0
  69. package/dist/docs/components/stack.md +299 -0
  70. package/dist/docs/components/status-chip.md +226 -0
  71. package/dist/docs/components/status-indicator.md +119 -0
  72. package/dist/docs/components/status-row.md +174 -0
  73. package/dist/docs/components/stepper.md +451 -0
  74. package/dist/docs/components/success-hero.md +157 -0
  75. package/dist/docs/components/surface.md +639 -0
  76. package/dist/docs/components/switch.md +472 -0
  77. package/dist/docs/components/table.md +967 -0
  78. package/dist/docs/components/tabs.md +627 -0
  79. package/dist/docs/components/tempo-logo.md +185 -0
  80. package/dist/docs/components/text-input.md +624 -0
  81. package/dist/docs/components/textarea.md +352 -0
  82. package/dist/docs/components/toast.md +535 -0
  83. package/dist/docs/components/token-logo.md +371 -0
  84. package/dist/docs/components/token.md +247 -0
  85. package/dist/docs/components/tooltip.md +490 -0
  86. package/dist/docs/components/verification-code.md +116 -0
  87. package/dist/docs/components/visual.md +249 -0
  88. package/dist/docs/components.md +203 -0
  89. package/dist/docs/foundations/accessibility.md +377 -0
  90. package/dist/docs/foundations/agents.md +150 -0
  91. package/dist/docs/foundations/color.md +522 -0
  92. package/dist/docs/foundations/content/tone.md +194 -0
  93. package/dist/docs/foundations/content/voice.md +194 -0
  94. package/dist/docs/foundations/content/writing-style.md +406 -0
  95. package/dist/docs/foundations/iconography.md +282 -0
  96. package/dist/docs/foundations/intent.md +360 -0
  97. package/dist/docs/foundations/layout.md +508 -0
  98. package/dist/docs/foundations/linter.md +296 -0
  99. package/dist/docs/foundations/motion.md +151 -0
  100. package/dist/docs/foundations/radius-and-padding.md +86 -0
  101. package/dist/docs/foundations/typography.md +266 -0
  102. package/dist/docs/index.md +137 -0
  103. package/dist/docs/introduction/faq.md +132 -0
  104. package/dist/docs/introduction/getting-started.md +377 -0
  105. package/dist/docs/patterns/blockchain-values.md +709 -0
  106. package/dist/docs/patterns/dashboards.md +638 -0
  107. package/dist/docs/patterns/destructive-actions.md +626 -0
  108. package/dist/docs/patterns/empty-states.md +612 -0
  109. package/dist/docs/patterns/errors-and-validation.md +808 -0
  110. package/dist/docs/patterns/feedback-and-status.md +518 -0
  111. package/dist/docs/patterns/forms.md +679 -0
  112. package/dist/docs/patterns/loading.md +630 -0
  113. package/dist/docs/patterns/navigation.md +397 -0
  114. package/dist/docs/patterns/payments.md +765 -0
  115. package/dist/docs/patterns/responsive-layout.md +997 -0
  116. package/dist/docs/patterns/tables-and-lists.md +964 -0
  117. package/dist/docs/products/tempo-console.md +671 -0
  118. package/dist/docs/products/tempo-performance.md +437 -0
  119. package/dist/docs/products/tempo-wallet.md +438 -0
  120. package/dist/web/components/OtpField.css +1 -1
  121. package/dist/web/components/OtpField.d.ts +1 -1
  122. package/dist/web/components/OtpField.d.ts.map +1 -1
  123. package/dist/web/components/OtpField.js +3 -4
  124. package/dist/web/components/OtpField.js.map +1 -1
  125. package/dist/web/components/OtpField.js.zyzz.json +1 -1
  126. package/dist/web/index.js.zyzz.json +1 -1
  127. package/package.json +1 -1
  128. package/src/web/components/OtpField.tsx +2 -24
@@ -0,0 +1,257 @@
1
+ # Container
2
+
3
+ Centers content at a maximum width.
4
+
5
+ [View source and API](https://github.com/tempoxyz/ds/blob/main/src/web/components/Container.tsx)
6
+
7
+ ## Overview
8
+
9
+ A container centers content at a maximum width, with inline padding that grows on wider viewports. It sets width only.
10
+
11
+ ## Examples
12
+
13
+ ### Basic
14
+
15
+ ```tsx
16
+ import { Container, Inline, Inset, Stack, style } from '@tempoxyz/ds'
17
+
18
+ export const fill = true
19
+ export function Demo() {
20
+ return (
21
+ <Container size="narrow">
22
+ <Stack gap="24">
23
+ <Inline justify="between">
24
+ <span>Stack, Inline and Container</span>
25
+ <Inline gap="8">
26
+ <span {...styles.chip()}>Public</span>
27
+ <span {...styles.chip()}>Private</span>
28
+ </Inline>
29
+ </Inline>
30
+ <Inset space="24" {...styles.card()}>
31
+ <Stack gap="12">
32
+ <span>Card content</span>
33
+ <span>Second line</span>
34
+ </Stack>
35
+ </Inset>
36
+ </Stack>
37
+ </Container>
38
+ )
39
+ }
40
+
41
+ namespace styles {
42
+ export const card = style({ backgroundColor: 'background.elevated', borderRadius: 'sm' })
43
+
44
+ export const chip = style({
45
+ backgroundColor: 'container.regular',
46
+ borderRadius: 'full',
47
+ cornerShape: 'round',
48
+ paddingBlock: '4',
49
+ paddingInline: '12',
50
+ })
51
+ }
52
+ ```
53
+
54
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Container/Basic.tsx)
55
+
56
+ ### Size
57
+
58
+ Set `size` to `narrow`, `medium`, `wide` (default), or `full`.
59
+
60
+ ```tsx
61
+ import { Container, Inset, Stack, style } from '@tempoxyz/ds'
62
+
63
+ export const fill = true
64
+ export function Demo() {
65
+ return (
66
+ <Stack gap="12">
67
+ {(['narrow', 'medium', 'wide', 'full'] as const).map((size) => (
68
+ <Container key={size} size={size}>
69
+ <Inset space="16" {...styles.card()}>
70
+ {size}
71
+ </Inset>
72
+ </Container>
73
+ ))}
74
+ </Stack>
75
+ )
76
+ }
77
+
78
+ namespace styles {
79
+ export const card = style({ backgroundColor: 'background.elevated', borderRadius: 'sm' })
80
+ }
81
+ ```
82
+
83
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Container/Size.tsx)
84
+
85
+ ### Gutter
86
+
87
+ Set `gutter={false}` to remove the inline padding.
88
+
89
+ ```tsx
90
+ import { Container, Inset, Stack, style } from '@tempoxyz/ds'
91
+
92
+ export const fill = true
93
+ export function Demo() {
94
+ return (
95
+ <Stack gap="12">
96
+ <Container size="narrow">
97
+ <Inset space="16" {...styles.card()}>
98
+ With gutter
99
+ </Inset>
100
+ </Container>
101
+ <Container gutter={false} size="narrow">
102
+ <Inset space="16" {...styles.card()}>
103
+ Without gutter
104
+ </Inset>
105
+ </Container>
106
+ </Stack>
107
+ )
108
+ }
109
+
110
+ namespace styles {
111
+ export const card = style({ backgroundColor: 'background.elevated', borderRadius: 'sm' })
112
+ }
113
+ ```
114
+
115
+ [View example source](https://github.com/tempoxyz/ds/blob/main/docs/src/examples/demos/Container/Gutter.tsx)
116
+
117
+ ## Anatomy
118
+
119
+ Import the component and assemble its parts.
120
+
121
+ ```tsx
122
+ import { Container } from '@tempoxyz/ds'
123
+
124
+ <Container />
125
+ ```
126
+
127
+ ## Guidelines
128
+
129
+ ### When to Use
130
+
131
+ * Center content on pages without a sidebar, such as sign-in or a receipt.
132
+ * Cap the width of a full-width band, such as a header, to line it up with the page.
133
+
134
+ ### When Not to Use
135
+
136
+ * Use [AppShell](/docs/components/app-shell) for pages with persistent navigation. `AppShell.Main` already caps and pads the content column.
137
+ * Use [Inset](/docs/components/inset) to pad content inside a region, and [Surface](/docs/components/surface) for a card.
138
+ * Use [Stack](/docs/components/stack) or [Grid](/docs/components/grid) to arrange the content inside the container.
139
+
140
+ ### Pick a Size by Content
141
+
142
+ * **Narrow (48rem):** Forms, settings, sign-in, and a send flow.
143
+ * **Medium (64rem):** Detail pages, such as a transaction or API key.
144
+ * **Wide (80rem):** The default, for dashboards and tables.
145
+ * **Full (none):** Edge-to-edge charts and maps.
146
+
147
+ Give body text in a `wide` container its own narrower column.
148
+
149
+ ### Keep the Gutter on Page Containers
150
+
151
+ Keep the gutter on any container that touches the viewport edge. If a parent already pads the content, set `gutter={false}`.
152
+
153
+ **Do:** Keep the gutter, so content stays off the screen edge.
154
+
155
+ ```tsx
156
+ /**
157
+ * Do example for "Keep the Gutter on Page Containers" on the Container page.
158
+ * Keep the gutter, so content stays off the screen edge.
159
+ * @module
160
+ */
161
+ import { Container, style, Surface } from '@tempoxyz/ds'
162
+
163
+ /** Renders the static preview, which the guideline card shows inert. */
164
+ export function Demo() {
165
+ return (
166
+ <div {...styles.viewport()}>
167
+ <Container size="narrow" {...styles.page()}>
168
+ <h1 {...styles.title()}>Send payment</h1>
169
+ <Surface size="medium">Recipient 0x71C7…976F</Surface>
170
+ </Container>
171
+ </div>
172
+ )
173
+ }
174
+
175
+ namespace styles {
176
+ export const page = style({ display: 'flex', flexDirection: 'column', gap: '12' })
177
+
178
+ export const title = style({ margin: '0', typography: 'heading.h3' })
179
+
180
+ export const viewport = style({
181
+ backgroundColor: 'background.primary',
182
+ borderRadius: 'sm',
183
+ boxSizing: 'border-box',
184
+ paddingBlock: '24',
185
+ width: '100% !custom',
186
+ })
187
+ }
188
+ ```
189
+
190
+ **Don't:** Remove the gutter from a container at the viewport edge.
191
+
192
+ ```tsx
193
+ /**
194
+ * Don't example for "Keep the Gutter on Page Containers" on the Container page.
195
+ * Don't remove the gutter from a container at the viewport edge.
196
+ * @module
197
+ */
198
+ import { Container, style, Surface } from '@tempoxyz/ds'
199
+
200
+ /** Renders the static preview, which the guideline card shows inert. */
201
+ export function Demo() {
202
+ return (
203
+ <div {...styles.viewport()}>
204
+ <Container gutter={false} size="narrow" {...styles.page()}>
205
+ <h1 {...styles.title()}>Send payment</h1>
206
+ <Surface size="medium">Recipient 0x71C7…976F</Surface>
207
+ </Container>
208
+ </div>
209
+ )
210
+ }
211
+
212
+ namespace styles {
213
+ export const page = style({ display: 'flex', flexDirection: 'column', gap: '12' })
214
+
215
+ export const title = style({ margin: '0', typography: 'heading.h3' })
216
+
217
+ export const viewport = style({
218
+ backgroundColor: 'background.primary',
219
+ borderRadius: 'sm',
220
+ boxSizing: 'border-box',
221
+ paddingBlock: '24',
222
+ width: '100% !custom',
223
+ })
224
+ }
225
+ ```
226
+
227
+ ## Accessibility
228
+
229
+ A container has no role, name, or keyboard behavior.
230
+
231
+ ### Semantics
232
+
233
+ * **Default Element (div):** Carries no role by default.
234
+ * **Semantic Element (render):** Set a landmark with `render={<main />}`.
235
+
236
+ ### Your Responsibilities
237
+
238
+ * **Render Landmarks Directly (render):** Render `main` on the container, not on an extra wrapper, and don't nest a second `main` inside it.
239
+ * **Reflow at 320px (SC 1.4.10):** Content must [reflow](https://www.w3.org/WAI/WCAG22/Understanding/reflow.html) without horizontal scrolling. Check addresses and hashes.
240
+
241
+ ## Related
242
+
243
+ [AppShell](/docs/components/app-shell)
244
+
245
+ Use for pages with a sidebar.
246
+
247
+ [Stack](/docs/components/stack)
248
+
249
+ Use for spacing content inside the container.
250
+
251
+ [Layout](/docs/foundations/layout)
252
+
253
+ Covers widths, spacing, and breakpoints.
254
+
255
+ [Responsive Layout](/docs/patterns/responsive-layout)
256
+
257
+ Covers adapting pages across breakpoints.