oneslash-design-system 2.28.0 → 2.29.0

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 (237) hide show
  1. package/README.md +1 -1
  2. package/dist/DESIGN.md +31 -1
  3. package/dist/cases/about-page.md +2 -0
  4. package/dist/cases/accept-invite.md +2 -0
  5. package/dist/cases/account-menu.md +2 -0
  6. package/dist/cases/activity-timeline.md +2 -0
  7. package/dist/cases/admin-inbox.md +2 -0
  8. package/dist/cases/agent-asks-before-risky-action.md +3 -1
  9. package/dist/cases/agent-cancels-when-unanswered.md +2 -0
  10. package/dist/cases/agent-changes-review/all-at-once.d.ts +1 -0
  11. package/dist/cases/agent-changes-review/all-at-once.jsx +238 -0
  12. package/dist/cases/agent-changes-review/per-change.d.ts +1 -0
  13. package/dist/cases/agent-changes-review/per-change.jsx +203 -0
  14. package/dist/cases/agent-changes-review.md +585 -0
  15. package/dist/cases/agent-handoff/to-agent.d.ts +1 -0
  16. package/dist/cases/agent-handoff/to-agent.jsx +53 -0
  17. package/dist/cases/agent-handoff/to-person.d.ts +1 -0
  18. package/dist/cases/agent-handoff/to-person.jsx +84 -0
  19. package/dist/cases/agent-handoff.md +231 -0
  20. package/dist/cases/agent-memory/list.d.ts +1 -0
  21. package/dist/cases/agent-memory/list.jsx +256 -0
  22. package/dist/cases/agent-memory.md +354 -0
  23. package/dist/cases/agent-options.md +2 -0
  24. package/dist/cases/agent-pending-reply/steps.jsx +70 -21
  25. package/dist/cases/agent-pending-reply.md +74 -27
  26. package/dist/cases/agent-permissions/levels.d.ts +3 -0
  27. package/dist/cases/agent-permissions/levels.jsx +49 -0
  28. package/dist/cases/agent-permissions/per-tool.d.ts +3 -0
  29. package/dist/cases/agent-permissions/per-tool.jsx +178 -0
  30. package/dist/cases/agent-permissions.md +314 -0
  31. package/dist/cases/agent-plan-proposal/changes.jsx +18 -11
  32. package/dist/cases/agent-plan-proposal/steps.jsx +11 -4
  33. package/dist/cases/agent-plan-proposal.md +36 -21
  34. package/dist/cases/agent-question.md +2 -0
  35. package/dist/cases/agent-refuses-clearly.md +2 -0
  36. package/dist/cases/agent-run-failure/limit-reached.d.ts +1 -0
  37. package/dist/cases/agent-run-failure/limit-reached.jsx +172 -0
  38. package/dist/cases/agent-run-failure/step-failed.d.ts +3 -0
  39. package/dist/cases/agent-run-failure/step-failed.jsx +187 -0
  40. package/dist/cases/agent-run-failure.md +500 -0
  41. package/dist/cases/agent-says-what-it-is.md +2 -0
  42. package/dist/cases/agent-says-where-it-stopped.md +27 -0
  43. package/dist/cases/agent-settings.md +2 -0
  44. package/dist/cases/agent-shows-progress.md +2 -0
  45. package/dist/cases/agent-shows-sources.md +2 -0
  46. package/dist/cases/api-keys/list.jsx +30 -3
  47. package/dist/cases/api-keys.md +37 -3
  48. package/dist/cases/app-shell.md +2 -0
  49. package/dist/cases/artifact-card.md +2 -0
  50. package/dist/cases/ask-page.md +2 -0
  51. package/dist/cases/auth-gate-loading.md +2 -0
  52. package/dist/cases/billing-page.md +2 -0
  53. package/dist/cases/blog-index.md +2 -0
  54. package/dist/cases/breadcrumb.md +2 -0
  55. package/dist/cases/breakdown-list.md +2 -0
  56. package/dist/cases/bulk-actions/list.d.ts +1 -0
  57. package/dist/cases/bulk-actions/list.jsx +209 -0
  58. package/dist/cases/bulk-actions/paged-table.d.ts +1 -0
  59. package/dist/cases/bulk-actions/paged-table.jsx +246 -0
  60. package/dist/cases/bulk-actions.md +559 -0
  61. package/dist/cases/changelog.md +2 -0
  62. package/dist/cases/chart.md +2 -0
  63. package/dist/cases/check-your-email.md +2 -0
  64. package/dist/cases/code-sample.md +2 -0
  65. package/dist/cases/collapsible-search.md +2 -0
  66. package/dist/cases/comment-thread.md +2 -0
  67. package/dist/cases/comparison-page/table.d.ts +1 -0
  68. package/dist/cases/comparison-page/table.jsx +97 -0
  69. package/dist/cases/comparison-page.md +156 -0
  70. package/dist/cases/composer-limit.md +2 -0
  71. package/dist/cases/confirm-destructive-action.md +2 -0
  72. package/dist/cases/confirm-dialogs.md +2 -0
  73. package/dist/cases/connection-status/card.d.ts +1 -0
  74. package/dist/cases/connection-status/card.jsx +97 -0
  75. package/dist/cases/connection-status/row.d.ts +1 -0
  76. package/dist/cases/connection-status/row.jsx +120 -0
  77. package/dist/cases/connection-status.md +330 -0
  78. package/dist/cases/contact-page.md +2 -0
  79. package/dist/cases/conversation-starters.md +2 -0
  80. package/dist/cases/cookie-choice.md +2 -0
  81. package/dist/cases/create-modal.md +2 -0
  82. package/dist/cases/danger-zone.md +2 -0
  83. package/dist/cases/dashboard.md +2 -0
  84. package/dist/cases/data-table-page.md +2 -0
  85. package/dist/cases/date-field.md +2 -0
  86. package/dist/cases/device-login.md +2 -0
  87. package/dist/cases/docs-component-page.md +2 -0
  88. package/dist/cases/email-confirmed.md +2 -0
  89. package/dist/cases/empty-list.md +2 -0
  90. package/dist/cases/empty-lists.md +2 -0
  91. package/dist/cases/empty-not-set-up.md +2 -0
  92. package/dist/cases/empty-search.md +2 -0
  93. package/dist/cases/error-page.md +2 -0
  94. package/dist/cases/faq.md +2 -0
  95. package/dist/cases/feature-grid.md +2 -0
  96. package/dist/cases/feedback-form.md +2 -0
  97. package/dist/cases/file-upload.md +2 -0
  98. package/dist/cases/filter-menu.md +2 -0
  99. package/dist/cases/forgot-password.md +2 -0
  100. package/dist/cases/form-errors.md +2 -0
  101. package/dist/cases/image-viewer.md +2 -0
  102. package/dist/cases/import-checklist.md +2 -0
  103. package/dist/cases/inline-form-feedback.md +2 -0
  104. package/dist/cases/integrations-list/nested.jsx +1 -1
  105. package/dist/cases/integrations-list/rows.jsx +1 -1
  106. package/dist/cases/integrations-list.md +6 -4
  107. package/dist/cases/invite-member.md +2 -0
  108. package/dist/cases/invoice-list.md +2 -0
  109. package/dist/cases/landing-hero.md +2 -0
  110. package/dist/cases/leaderboard.md +2 -0
  111. package/dist/cases/legal-page.md +2 -0
  112. package/dist/cases/load-failure.md +2 -0
  113. package/dist/cases/log-out-confirm.md +2 -0
  114. package/dist/cases/login-page.md +2 -0
  115. package/dist/cases/long-form-page.md +2 -0
  116. package/dist/cases/master-detail.md +2 -0
  117. package/dist/cases/members-list/rows.jsx +37 -6
  118. package/dist/cases/members-list/table.jsx +37 -6
  119. package/dist/cases/members-list.md +83 -12
  120. package/dist/cases/mention-list.md +2 -0
  121. package/dist/cases/message-actions.md +2 -0
  122. package/dist/cases/message-attachments.md +2 -0
  123. package/dist/cases/message-composer/with-tools.jsx +17 -7
  124. package/dist/cases/message-composer.md +28 -11
  125. package/dist/cases/message-edit.md +2 -0
  126. package/dist/cases/message-reactions.md +2 -0
  127. package/dist/cases/message-row.md +2 -0
  128. package/dist/cases/message-send-failure/needs-a-person.d.ts +1 -0
  129. package/dist/cases/message-send-failure/needs-a-person.jsx +116 -0
  130. package/dist/cases/message-send-failure/retrying.d.ts +1 -0
  131. package/dist/cases/message-send-failure/retrying.jsx +116 -0
  132. package/dist/cases/message-send-failure.md +308 -0
  133. package/dist/cases/mobile-menu.md +2 -0
  134. package/dist/cases/newsletter-signup.md +2 -0
  135. package/dist/cases/no-access/page.d.ts +1 -0
  136. package/dist/cases/no-access/page.jsx +37 -0
  137. package/dist/cases/no-access/read-only.d.ts +1 -0
  138. package/dist/cases/no-access/read-only.jsx +33 -0
  139. package/dist/cases/no-access.md +147 -0
  140. package/dist/cases/not-found-page.md +2 -0
  141. package/dist/cases/notification-menu.md +2 -0
  142. package/dist/cases/number-format.md +2 -0
  143. package/dist/cases/oauth-consent.md +2 -0
  144. package/dist/cases/on-off-settings.md +2 -0
  145. package/dist/cases/on-this-page.md +2 -0
  146. package/dist/cases/onboarding.md +2 -0
  147. package/dist/cases/one-main-action.md +2 -0
  148. package/dist/cases/overflow-menu.md +2 -0
  149. package/dist/cases/page-end.md +2 -0
  150. package/dist/cases/page-header.md +2 -0
  151. package/dist/cases/paged-card.md +2 -0
  152. package/dist/cases/password-gate.md +2 -0
  153. package/dist/cases/payment-method.md +2 -0
  154. package/dist/cases/people-row.md +2 -0
  155. package/dist/cases/phone-navigation.md +2 -0
  156. package/dist/cases/plan-change-confirm.md +2 -0
  157. package/dist/cases/plan-comparison.md +3 -1
  158. package/dist/cases/plan-picker.md +4 -1
  159. package/dist/cases/plan-sign-off.md +2 -0
  160. package/dist/cases/pricing-section.md +5 -1
  161. package/dist/cases/product-cards.md +2 -0
  162. package/dist/cases/product-demo/scripted.d.ts +3 -0
  163. package/dist/cases/product-demo/scripted.jsx +95 -0
  164. package/dist/cases/product-demo/still.d.ts +1 -0
  165. package/dist/cases/product-demo/still.jsx +20 -0
  166. package/dist/cases/product-demo.md +221 -0
  167. package/dist/cases/profile-form.md +2 -0
  168. package/dist/cases/quick-switcher.md +2 -0
  169. package/dist/cases/range-switch.md +2 -0
  170. package/dist/cases/rename.md +2 -0
  171. package/dist/cases/reply-feedback.md +2 -0
  172. package/dist/cases/reply-sources.md +2 -0
  173. package/dist/cases/route-loading.md +2 -0
  174. package/dist/cases/scope-picker.md +2 -0
  175. package/dist/cases/section-index.md +2 -0
  176. package/dist/cases/session-expired/in-place.d.ts +1 -0
  177. package/dist/cases/session-expired/in-place.jsx +63 -0
  178. package/dist/cases/session-expired/redirect.d.ts +1 -0
  179. package/dist/cases/session-expired/redirect.jsx +62 -0
  180. package/dist/cases/session-expired.md +204 -0
  181. package/dist/cases/set-new-password.md +2 -0
  182. package/dist/cases/settings-page.md +2 -0
  183. package/dist/cases/settings-save.md +2 -0
  184. package/dist/cases/side-pane.md +2 -0
  185. package/dist/cases/sidebar-nav.md +2 -0
  186. package/dist/cases/sign-up-page.md +3 -0
  187. package/dist/cases/signup-from-site/plain.d.ts +1 -0
  188. package/dist/cases/signup-from-site/plain.jsx +125 -0
  189. package/dist/cases/signup-from-site/with-plan.d.ts +4 -0
  190. package/dist/cases/signup-from-site/with-plan.jsx +151 -0
  191. package/dist/cases/signup-from-site.md +351 -0
  192. package/dist/cases/site-footer.md +2 -0
  193. package/dist/cases/site-header/links.d.ts +3 -1
  194. package/dist/cases/site-header/links.jsx +6 -2
  195. package/dist/cases/site-header.md +11 -3
  196. package/dist/cases/site-matches-app.md +32 -0
  197. package/dist/cases/site-search.md +2 -0
  198. package/dist/cases/slash-command-list.md +2 -0
  199. package/dist/cases/stat-row.md +2 -0
  200. package/dist/cases/status-label.md +3 -1
  201. package/dist/cases/success-feedback.md +2 -0
  202. package/dist/cases/tabbed-panels.md +2 -0
  203. package/dist/cases/tag-filter.md +2 -0
  204. package/dist/cases/task-header.md +2 -0
  205. package/dist/cases/theme-switcher.md +2 -0
  206. package/dist/cases/type-to-confirm.md +2 -0
  207. package/dist/cases/typing-and-status.md +2 -0
  208. package/dist/cases/unsaved-changes-guard.md +2 -0
  209. package/dist/cases/upgrade-prompt.md +2 -0
  210. package/dist/cases/usage-meters.md +2 -0
  211. package/dist/cases.json +1494 -42
  212. package/dist/components/checkBox.d.ts +5 -1
  213. package/dist/components/checkBox.jsx +23 -9
  214. package/dist/components/diff.d.ts +29 -0
  215. package/dist/components/diff.jsx +35 -0
  216. package/dist/index.d.ts +1 -0
  217. package/dist/index.js +1 -0
  218. package/dist/internal/diff.d.ts +17 -0
  219. package/dist/internal/diff.js +44 -0
  220. package/dist/native-mapping.json +9 -2
  221. package/dist/stories/AgentPermissions.probe.stories.d.ts +7 -0
  222. package/dist/stories/AgentPermissions.probe.stories.jsx +18 -0
  223. package/dist/stories/AgentRunFailure.probe.stories.d.ts +6 -0
  224. package/dist/stories/AgentRunFailure.probe.stories.jsx +12 -0
  225. package/dist/stories/Cases.generated.stories.d.ts +24 -0
  226. package/dist/stories/Cases.generated.stories.jsx +48 -0
  227. package/dist/stories/Checkbox.stories.d.ts +2 -0
  228. package/dist/stories/Checkbox.stories.jsx +18 -0
  229. package/dist/stories/Diff.stories.d.ts +9 -0
  230. package/dist/stories/Diff.stories.jsx +40 -0
  231. package/dist/stories/ProductDemo.probe.stories.d.ts +6 -0
  232. package/dist/stories/ProductDemo.probe.stories.jsx +12 -0
  233. package/dist/stories/SignupFromSite.probe.stories.d.ts +7 -0
  234. package/dist/stories/SignupFromSite.probe.stories.jsx +17 -0
  235. package/dist/stories/SiteHeader.probe.stories.d.ts +6 -0
  236. package/dist/stories/SiteHeader.probe.stories.jsx +13 -0
  237. package/package.json +1 -1
@@ -0,0 +1,147 @@
1
+ # No access
2
+
3
+ A person reaches a page or a setting that their role does not let them see or change, often by a link someone sent.
4
+
5
+ For: an app
6
+
7
+ ## Do
8
+
9
+ - Keep the shell and the navigation, as the case 'Error page' does inside the shell. Name the page in the `TitleBar`, so the person knows the link was right.
10
+ - Show an `EmptyBox` in the page's place that names what they cannot see: 'You do not have access to Billing'.
11
+ - Say who can give access, by name: 'Ask an admin: Dana Lee'.
12
+ - Offer one way out, 'Go Home', as the `EmptyBox` action.
13
+ - Show one info `Alert` at the top of a settings page the person can only read: 'Only admins can change these settings. Your admin is Dana Lee.' Give it no close button and `autoDismiss={false}`.
14
+ - Show the fields with `readOnly`, so the person can still read, select and copy the values.
15
+ - Show a choice that has no read-only state, such as a `RadioGroup`, disabled, under the line that says who can change it.
16
+ - Leave out the Save Button and every Button that would change a setting.
17
+
18
+ ## Don't
19
+
20
+ - Do not show a 404 for a page that exists. Say it is there and who can open it.
21
+ - Do not hide a navigation item and leave the page blank when a person followed a link to it. Say why they cannot see it.
22
+ - Do not show disabled Buttons with no reason. Leave them out, and say once at the top who can change things.
23
+ - Do not use `disabled` fields for a page the person can read. Disabled text is faint and cannot be focused.
24
+ - Do not say 'Contact your admin' on a page the person cannot change without saying who that is.
25
+
26
+ ## Option: Page they cannot see
27
+
28
+ Use when: The person opened a page their role cannot see.
29
+
30
+ Uses: `AppShell`, `Button`, `EmptyBox`, `MenuItem`, `Navigation`, `Paragraph`, `Stack`, `Surface`, `TitleBar`
31
+
32
+ ```tsx
33
+ 'use client';
34
+ import { useState } from 'react';
35
+ import AppShell from 'oneslash-design-system/components/appShell';
36
+ import Navigation from 'oneslash-design-system/components/navigation';
37
+ import MenuItem from 'oneslash-design-system/components/menuItem';
38
+ import TitleBar from 'oneslash-design-system/components/titleBar';
39
+ import Surface from 'oneslash-design-system/components/surface';
40
+ import EmptyBox from 'oneslash-design-system/components/emptyBox';
41
+ import Paragraph from 'oneslash-design-system/components/paragraph';
42
+ import Button from 'oneslash-design-system/components/button';
43
+ import { Stack } from 'oneslash-design-system/components/layout';
44
+
45
+ // The places a member can open. Billing is for admins, so it is not in the list:
46
+ // the person reached it by a link, and the page says why they cannot see it.
47
+ const places = [
48
+ { label: 'Home', icon: 'House', href: '/' },
49
+ { label: 'Invoices', icon: 'FileText', href: '/invoices' },
50
+ { label: 'Settings', icon: 'Settings', href: '/settings' },
51
+ ];
52
+
53
+ const sidebar = (
54
+ <Navigation aria-label="Main">
55
+ <Paragraph size="body1" measure="none">Acme</Paragraph>
56
+ {places.map((p) => (
57
+ <MenuItem
58
+ key={p.href}
59
+ size="small"
60
+ label={p.label}
61
+ iconName={p.icon}
62
+ href={p.href}
63
+ isSelected={false}
64
+ // A real app lets the link go to its page.
65
+ onClick={(event: { preventDefault: () => void }) => event.preventDefault()}
66
+ />
67
+ ))}
68
+ </Navigation>
69
+ );
70
+
71
+ export default function NoAccessPage() {
72
+ // Below md the sidebar is a Drawer; this says whether it is open.
73
+ const [navOpen, setNavOpen] = useState(false);
74
+ return (
75
+ <AppShell title="Billing" navOpen={navOpen} onNavOpenChange={setNavOpen} sidebar={sidebar}>
76
+ <Stack gap="large">
77
+ {/* The page exists, so it keeps its name. It is not a 404. */}
78
+ <TitleBar title="Billing" />
79
+ <Surface minHeight="tall" align="center">
80
+ <EmptyBox
81
+ size="large"
82
+ icon="Lock"
83
+ text="You do not have access to Billing"
84
+ secondText="Ask an admin: Dana Lee"
85
+ action={<Button size="medium" type="secondary" state="enabled" label="Go Home" href="/" />}
86
+ />
87
+ </Surface>
88
+ </Stack>
89
+ </AppShell>
90
+ );
91
+ }
92
+ ```
93
+
94
+ ## Option: Settings they cannot change
95
+
96
+ Use when: The person can see a settings page but cannot change it.
97
+
98
+ Uses: `Alert`, `Center`, `Heading`, `SettingsSection`, `Stack`, `TextField`
99
+
100
+ ```tsx
101
+ 'use client';
102
+ import Heading from 'oneslash-design-system/components/heading';
103
+ import Alert from 'oneslash-design-system/components/alert';
104
+ import SettingsSection from 'oneslash-design-system/components/settingsSection';
105
+ import TextField from 'oneslash-design-system/components/textField';
106
+ import { Center, Stack } from 'oneslash-design-system/components/layout';
107
+
108
+ // A real app reads these from the server. Ben Carter is a member, so he can read them and not change them.
109
+ const general = [
110
+ { id: 'no-access-name', label: 'Workspace name', value: 'Acme' },
111
+ { id: 'no-access-email', label: 'Billing email', value: 'billing@acme.example' },
112
+ { id: 'no-access-time-zone', label: 'Time zone', value: 'Central Time (US and Canada)' },
113
+ ];
114
+ const members = [
115
+ { id: 'no-access-invite', label: 'Who can invite members', value: 'Admins only' },
116
+ { id: 'no-access-domain', label: 'Email domain for new members', value: 'acme.example' },
117
+ ];
118
+
119
+ // A read-only field changes nothing.
120
+ const unchanged = () => {};
121
+
122
+ export default function NoAccessReadOnly() {
123
+ return (
124
+ <Center>
125
+ <Stack gap="xlarge">
126
+ <Heading level={1} size="h5">Workspace settings</Heading>
127
+ {/* One line at the top says why nothing can be changed, and who can. No Save Button, no disabled Buttons. */}
128
+ <Alert type="info" variant="inline" message="Only admins can change these settings. Your admin is Dana Lee." autoDismiss={false} />
129
+ <SettingsSection title="General">
130
+ {general.map((f) => (
131
+ <TextField key={f.id} id={f.id} label={f.label} value={f.value} readOnly onChange={unchanged} />
132
+ ))}
133
+ </SettingsSection>
134
+ <SettingsSection title="Members">
135
+ {members.map((f) => (
136
+ <TextField key={f.id} id={f.id} label={f.label} value={f.value} readOnly onChange={unchanged} />
137
+ ))}
138
+ </SettingsSection>
139
+ </Stack>
140
+ </Center>
141
+ );
142
+ }
143
+ ```
144
+
145
+ ## Native
146
+
147
+ On Apple use `ContentUnavailableView` with a lock image, the line on who can give access, and 'Go Home' in its `actions`. For a read-only settings screen, show `LabeledContent` rows in place of controls, with one footer line on who can change them.
@@ -2,6 +2,8 @@
2
2
 
3
3
  A person opens a link to a page that does not exist.
4
4
 
5
+ For: a marketing site, an app
6
+
5
7
  ## Do
6
8
 
7
9
  - Say 'Page not found' in a `Heading` with `level={1}`.
@@ -2,6 +2,8 @@
2
2
 
3
3
  A person chooses how much a channel or a thread notifies them.
4
4
 
5
+ For: an app
6
+
5
7
  ## Do
6
8
 
7
9
  - Use an `IconButton` with `iconName="Bell"`, and `BellOff` when the channel is muted.
@@ -2,6 +2,8 @@
2
2
 
3
3
  A page shows counts, money, sizes, shares or changes.
4
4
 
5
+ For: a marketing site, an app
6
+
5
7
  ## Answer
6
8
 
7
9
  Use the helpers in `formatNumber` (`formatCount`, `formatMoney`, `formatPercent`, `formatBytes`, `formatDuration`), `StatTile` and `Progress`. A count is whole and grouped: '1,240'. In a tile, a count or an amount from 10,000 up shows its short form: '12.4K', '$12.4K'. A table shows the exact number, right-aligned. On a chart's axis, a number from 10,000 up shows its short form too: '12.4K'. The chart's readout and its table show the exact number. Money has its symbol and its currency's decimals: '$1,240.00', '¥1,240', 'KWD 1,240.000'. A cost under the smallest unit reads '< $0.01'. A share is a whole percent, and a small one reads '< 1%'. A size is base 1024: '52 MB', '1.2 GB'. A time reads '340 ms', '1.2 s', '2 h 24 min'. The unit is in the label or after the number in words: 'Responses', '7 of 8 seats', '340 responses, no limit'. A bare number is never shown, and a unit is never only in a tooltip. A change says its direction, its size and what it compares with: 'Up 12% from last week'. It reads 'New this week' when there was nothing before. A change in a percent is in points: 'Up 3 pts from last week'. A refund in a list of charges has a minus: '-$12.00'. In a sentence, say the word: 'Refunded $12.00'. A change has no color, because more is not good or bad by itself. Unknown is never 0. `formatNumber` shows '–' for a value it cannot read. `StatTile` shows 'No data yet'. While a number loads, a `Skeleton` holds its place. On a failure, show the case 'Load failure'. A limit is a `Progress`, which says 'Limit reached' in words.
@@ -2,6 +2,8 @@
2
2
 
3
3
  Another app, such as a CLI or an MCP client, asks to act for a person who is logged in, and the person must allow it.
4
4
 
5
+ For: an app, an agent
6
+
5
7
  ## Do
6
8
 
7
9
  - Name the app in a `Heading` with `level={1}`: 'Acme CLI wants to connect to Acme'.
@@ -2,6 +2,8 @@
2
2
 
3
3
  A person turns things on and off, such as which notifications they get.
4
4
 
5
+ For: an app
6
+
5
7
  ## Do
6
8
 
7
9
  - Follow the rule 'A setting saves in place, or with one Save Button'. Every `Switch` saves as soon as it changes, and the page has no Save Button.
@@ -2,6 +2,8 @@
2
2
 
3
3
  A person reads a long page and wants to see its sections, jump to one and know which one they are in.
4
4
 
5
+ For: a marketing site, an app
6
+
5
7
  ## Do
6
8
 
7
9
  - Put `OnThisPage` in the `aside` of `PageShell`. It sticks below a `SiteHeader` and shows from `xl`. `PageShell` gives each level 2 and 3 heading with an `id` a scroll margin, so `#sharing` lands below the header.
@@ -2,6 +2,8 @@
2
2
 
3
3
  A person has just signed up, and the app needs a few things from them before it works or before it is fully set up.
4
4
 
5
+ For: an app
6
+
5
7
  ## Do
6
8
 
7
9
  - Follow the rule 'A form error shows next to the problem'.
@@ -2,6 +2,8 @@
2
2
 
3
3
  A marketing page asks the visitor to do something: sign up, open the app, buy a plan.
4
4
 
5
+ For: a marketing site
6
+
5
7
  ## Answer
6
8
 
7
9
  A page has one main action. It is a primary `Button` with the same label in the header, the hero, the pricing section and the end of the page: 'Sign Up', or 'Sign Up for Pro' on a plan. A second action is a secondary `Button`, or a `Link` that teaches, such as 'See How It Works'. It is never a second primary. Write the label as the move, in Title Case, with short prepositions lowercase. Do not write 'Get Started Free' in one place and 'Try It' in another. The main action and the second action open in the same tab, unless one goes to a store or starts a download. A link to another site, in a list or a footer, uses `external`, as the case 'Site footer' says.
@@ -2,6 +2,8 @@
2
2
 
3
3
  A person opens a menu of less common actions, behind one button, for a thing or for the page.
4
4
 
5
+ For: an app
6
+
5
7
  ## Do
6
8
 
7
9
  - Use an `IconButton` with `iconName="Ellipsis"` and a `Tooltip` of 'More'.
@@ -2,6 +2,8 @@
2
2
 
3
3
  A page has said what it had to say, and its last block decides what the visitor does next.
4
4
 
5
+ For: a marketing site
6
+
5
7
  ## Do
6
8
 
7
9
  - Follow the rule 'A marketing page asks for one main action, in the same words everywhere'. The closing block uses the same labels as the header and the hero.
@@ -2,6 +2,8 @@
2
2
 
3
3
  A page names itself at the top and offers what the person can do with it.
4
4
 
5
+ For: an app
6
+
5
7
  ## Do
6
8
 
7
9
  - Follow the rule 'On a phone, a sidebar opens as a drawer and a list opens its detail'.
@@ -2,6 +2,8 @@
2
2
 
3
3
  A dashboard section lists things that wait on the person, such as questions or comments, and the list may be longer than the section.
4
4
 
5
+ For: an app
6
+
5
7
  ## Do
6
8
 
7
9
  - Follow the rule 'A number shows its unit and never shows 0 for unknown'.
@@ -2,6 +2,8 @@
2
2
 
3
3
  Some work is private. A visitor needs the password to read it, and someone who does not have it needs to know how to ask.
4
4
 
5
+ For: a marketing site
6
+
5
7
  ## Do
6
8
 
7
9
  - Put the gate in a `Surface` with a heading that says what is behind it: 'This case study needs a password'. It is the h1 on a whole page and an h2 inside a page.
@@ -2,6 +2,8 @@
2
2
 
3
3
  A workspace pays by card. The admin sees which card, changes it or removes it.
4
4
 
5
+ For: an app
6
+
5
7
  ## Do
6
8
 
7
9
  - Follow the rule 'A number shows its unit and never shows 0 for unknown'.
@@ -2,6 +2,8 @@
2
2
 
3
3
  A thread or a task shows who is on it, and the person can find out who they all are.
4
4
 
5
+ For: an app
6
+
5
7
  ## Do
6
8
 
7
9
  - Use `AvatarStack` for four or more people. Past `max` its last circle counts the rest, such as '+3'.
@@ -2,6 +2,8 @@
2
2
 
3
3
  A layout with a sidebar, a list beside its detail, or a side pane meets a phone screen.
4
4
 
5
+ For: a marketing site, an app
6
+
5
7
  ## Answer
6
8
 
7
9
  An app's sidebar opens in a `Drawer` from the start side, from a 'Menu' `IconButton` at the start of a top bar that names the place. `AppShell` does this. The Drawer closes on a choice, on Close, on Escape, on the scrim and when the window widens. A list beside its detail becomes two screens: the list, then the detail with a Back Button named for the list, as `SettingsLayout` does. A settings nav is such a list. A side pane takes the whole content area and has Close. It is never squeezed beside the content. A site's links go into the same kind of menu, and one main action may stay in the bar. Nothing is hidden on a phone without a way to reach it. There is no bottom tab bar on the web.
@@ -2,6 +2,8 @@
2
2
 
3
3
  An admin chose another plan. Before anything changes they need to know what it costs and when it starts.
4
4
 
5
+ For: an app
6
+
5
7
  ## Do
6
8
 
7
9
  - Follow the rule 'A number shows its unit and never shows 0 for unknown'.
@@ -2,6 +2,8 @@
2
2
 
3
3
  A visitor to the public site wants to see every limit of every plan side by side before signing up.
4
4
 
5
+ For: a marketing site
6
+
5
7
  ## Do
6
8
 
7
9
  - Follow the rule 'A number shows its unit and never shows 0 for unknown'.
@@ -19,7 +21,7 @@ A visitor to the public site wants to see every limit of every plan side by side
19
21
  - Do not build the table from a grid of boxes. A screen reader cannot read it as a table.
20
22
  - Do not hide the header row on a phone. Let the table scroll sideways in its region.
21
23
  - Do not put a Button in every column.
22
- - Do not change a price or a limit here without changing it in the cases 'Plan picker' and 'Pricing section' too.
24
+ - Do not change a price or a limit here without changing it in the cases 'Plan picker', 'Pricing section', 'Comparison with another product' and 'Sign-up from the site' too.
23
25
  - Do not dim the other columns with tabs. Every plan stays in view.
24
26
 
25
27
  ## Example: Table under the plan cards
@@ -2,6 +2,8 @@
2
2
 
3
3
  An admin compares the plans a workspace can be on and chooses one.
4
4
 
5
+ For: an app
6
+
5
7
  ## Do
6
8
 
7
9
  - Follow the rule 'A number shows its unit and never shows 0 for unknown'.
@@ -12,6 +14,7 @@ An admin compares the plans a workspace can be on and chooses one.
12
14
  - Say a change that starts later with a Tag 'Starts Dec 1' on the new plan, and a line under the heading: 'Acme is on Pro until Dec 1, 2026, then Free.'
13
15
  - Open the picker from 'Change Plan' on the case 'Billing page'. Show it only to a person who can change the plan.
14
16
  - Add a `SegmentedControl` as the case 'Range switch' says once the plans bill by the year too. Leave it out while every plan bills monthly.
17
+ - Use the same plan names, prices and limits on the site and in the app, as the rule 'A site promises only what the app does, in the app's words' says.
15
18
 
16
19
  ## Don't
17
20
 
@@ -21,7 +24,7 @@ An admin compares the plans a workspace can be on and chooses one.
21
24
  - Do not add a monthly and yearly switch when no plan bills yearly.
22
25
  - Do not change a Button label to show it is busy, such as to 'Checking...'.
23
26
  - Do not charge or change the plan from this page. The confirm does that.
24
- - Do not change a price or a limit here without changing it in the cases 'Pricing section' and 'Plan comparison' too.
27
+ - Do not change a price or a limit here without changing it in the cases 'Pricing section', 'Plan comparison', 'Comparison with another product' and 'Sign-up from the site' too.
25
28
 
26
29
  ## Option: Cards side by side
27
30
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  The agent wrote a plan for a task, and people approve it before the agent starts the work.
4
4
 
5
+ For: an agent
6
+
5
7
  ## Do
6
8
 
7
9
  - Follow the rule 'An agent asks before a risky action': the agent starts nothing until every required person has said yes.
@@ -2,6 +2,8 @@
2
2
 
3
3
  A visitor to the public site compares the plans and signs up for one.
4
4
 
5
+ For: a marketing site
6
+
5
7
  ## Do
6
8
 
7
9
  - Follow the rule 'A marketing page asks for one main action, in the same words everywhere'.
@@ -12,13 +14,15 @@ A visitor to the public site compares the plans and signs up for one.
12
14
  - Put the section's name in `SectionIntro`, so the section has a level 2 heading and a link of its own.
13
15
  - Put one line under the cards that says what the prices are in and who pays: 'Prices in USD. Pro and Business bill each member monthly.'
14
16
  - Add a `SegmentedControl` for monthly and yearly as the case 'Range switch' says once a plan bills by the year. Leave it out while every plan bills monthly.
17
+ - Use the same plan names, prices and limits on the site and in the app, as the rule 'A site promises only what the app does, in the app's words' says.
18
+ - Send a paid plan's Button to sign-up with that plan, as the case 'Sign-up from the site' says.
15
19
 
16
20
  ## Don't
17
21
 
18
22
  - Do not name a Button 'Get Started', 'Choose' or 'Select'. Name the plan it signs up for.
19
23
  - Do not open the sign-up page in a new tab.
20
24
  - Do not give two plans a primary Button.
21
- - Do not change a price or a limit here without changing it in the cases 'Plan picker' and 'Plan comparison' too. A visitor sees one set of plans.
25
+ - Do not change a price or a limit here without changing it in the cases 'Plan picker', 'Plan comparison', 'Comparison with another product' and 'Sign-up from the site' too. A visitor sees one set of plans.
22
26
  - Do not make a card clickable as a whole. Its Button is the one control.
23
27
 
24
28
  ## Example: Plan cards side by side
@@ -2,6 +2,8 @@
2
2
 
3
3
  A maker lists its products on one page, and each product has its own site.
4
4
 
5
+ For: a marketing site
6
+
5
7
  ## Do
6
8
 
7
9
  - Follow the rule 'A marketing page asks for one main action, in the same words everywhere'. A list of products has no main action of its own: each card is a link, not a Button.
@@ -0,0 +1,3 @@
1
+ export default function ProductDemoScripted({ autoPlay }?: {
2
+ autoPlay?: boolean;
3
+ }): import("react").JSX.Element;
@@ -0,0 +1,95 @@
1
+ 'use client';
2
+ import { useEffect, useRef, useState } from 'react';
3
+ import { BookOpen, Bot, MessageSquare } from 'lucide-react';
4
+ import PageShell from '../../components/pageShell';
5
+ import SectionIntro from '../../components/sectionIntro';
6
+ import Surface from '../../components/surface';
7
+ import Message from '../../components/message';
8
+ import UserImage from '../../components/userImage';
9
+ import Tag from '../../components/tag';
10
+ import TimeStamp from '../../components/timeStamp';
11
+ import Paragraph from '../../components/paragraph';
12
+ import Button from '../../components/button';
13
+ import SegmentedControl from '../../components/segmentedControl';
14
+ import StepList from '../../components/stepList';
15
+ import SourceCard from '../../components/sourceCard';
16
+ import { Cluster, Grid, PageSection, Stack } from '../../components/layout';
17
+ var agentName = 'Acme Agent';
18
+ // A made-up thread. Every label in it is one the app has: the agent's marks, its steps and its source cards.
19
+ var request = { from: 'Dana Lee', at: new Date('2026-11-16T14:30:00Z'), text: 'When does the new pricing page go live?' };
20
+ var repliedAt = new Date('2026-11-16T14:31:00Z');
21
+ var reply = 'The new pricing page goes live on Nov 20, 2026. Ben moved it two days to finish the plan table.';
22
+ var scenes = [
23
+ { value: 'ask', label: 'Ask' },
24
+ { value: 'work', label: 'Work' },
25
+ { value: 'answer', label: 'Answer' },
26
+ ];
27
+ // Long enough to read each scene.
28
+ var sceneTime = 6000;
29
+ // The agent's marks, as the rule 'An agent says what it is' says.
30
+ function agentMeta(at) {
31
+ return (<>
32
+ <Tag variant="contained" size="small" label="Agent"/>
33
+ <TimeStamp createdAt={at} dateFormat="absolute" data="time"/>
34
+ <Paragraph size="caption" tone="secondary" measure="none">Model name</Paragraph>
35
+ </>);
36
+ }
37
+ // `autoPlay` starts the scenes when the page opens. A real site passes it only when the visitor has not asked for
38
+ // reduced motion, from `matchMedia('(prefers-reduced-motion: reduce)')`. Left out, the demo waits for the visitor.
39
+ export default function ProductDemoScripted(_a) {
40
+ var _b = _a === void 0 ? {} : _a, _c = _b.autoPlay, autoPlay = _c === void 0 ? false : _c;
41
+ var _d = useState(autoPlay ? 'ask' : 'answer'), scene = _d[0], setScene = _d[1];
42
+ var _e = useState(!autoPlay), paused = _e[0], setPaused = _e[1];
43
+ var timer = useRef();
44
+ // Moves to the next scene while the demo plays, and stops when it is paused or leaves the page.
45
+ useEffect(function () {
46
+ if (paused)
47
+ return undefined;
48
+ timer.current = setInterval(function () {
49
+ setScene(function (s) { return scenes[(scenes.findIndex(function (x) { return x.value === s; }) + 1) % scenes.length].value; });
50
+ }, sceneTime);
51
+ return function () { return clearInterval(timer.current); };
52
+ }, [paused]);
53
+ var at = scenes.findIndex(function (x) { return x.value === scene; });
54
+ return (<PageShell>
55
+ <PageSection gap="xxlarge">
56
+ <SectionIntro id="product-demo-scripted" name="Ask the agent in the thread" statement="Acme Agent reads the thread and the docs, then answers with its sources."/>
57
+ {/* No live region: a screen reader is not read each scene as it changes. */}
58
+ <Surface padding="medium">
59
+ <Stack gap="large">
60
+ {/* Play or Pause comes first, so a keyboard reaches it before anything moves. It is one Button whose label
61
+ says what pressing it does, so focus stays on it when the label changes. Picking a scene pauses too. */}
62
+ <Cluster justify="between">
63
+ <Cluster gap="xlarge">
64
+ <Button size="small" type="secondary" state="enabled" label={paused ? 'Play' : 'Pause'} onClickButton={function () { return setPaused(function (p) { return !p; }); }}/>
65
+ <SegmentedControl size="small" width="fit" aria-label="Scene" options={scenes} value={scene} onChange={function (value) {
66
+ setPaused(true);
67
+ setScene(value);
68
+ }}/>
69
+ </Cluster>
70
+ <Tag variant="textOnly" size="small" label="Example"/>
71
+ </Cluster>
72
+ <Stack gap="small">
73
+ <Message aria-label={request.from} avatar={<UserImage userHandle={request.from} decorative/>} name={request.from} meta={<TimeStamp createdAt={request.at} dateFormat="absolute" data="time"/>}>
74
+ <Paragraph measure="none">{request.text}</Paragraph>
75
+ </Message>
76
+ {at >= 1 && (<Message aria-label={"".concat(agentName, ", agent")} avatar={<UserImage userHandle={agentName} icon={Bot} decorative/>} name={agentName} meta={agentMeta(repliedAt)} footer={at === 2 ? (
77
+ // Plain cards: a demo on the site opens nothing.
78
+ <Grid columns={2} gap="medium">
79
+ <SourceCard icon={BookOpen} title="Launch plan" meta="Docs · Nov 14, 2026"/>
80
+ <SourceCard icon={MessageSquare} title="Pricing page date" meta="#launch · Nov 15, 2026"/>
81
+ </Grid>) : undefined}>
82
+ {at === 2 ? (<Paragraph measure="none">{reply}</Paragraph>) : (<Stack gap="medium">
83
+ <Paragraph size="caption" tone="secondary" measure="none">Working for 4 seconds</Paragraph>
84
+ <StepList aria-label="Acme Agent's steps" steps={[
85
+ { label: 'Read the thread in #launch', status: 'done' },
86
+ { label: 'Read the launch plan', status: 'running' },
87
+ ]}/>
88
+ </Stack>)}
89
+ </Message>)}
90
+ </Stack>
91
+ </Stack>
92
+ </Surface>
93
+ </PageSection>
94
+ </PageShell>);
95
+ }
@@ -0,0 +1 @@
1
+ export default function ProductDemoStill(): import("react").JSX.Element;
@@ -0,0 +1,20 @@
1
+ 'use client';
2
+ import PageShell from '../../components/pageShell';
3
+ import SectionIntro from '../../components/sectionIntro';
4
+ import Figure from '../../components/figure';
5
+ import Image from '../../components/image';
6
+ import { PageSection } from '../../components/layout';
7
+ // A stand-in for a screenshot of the app: a thread with a question, the agent's reply and two source cards.
8
+ // A real page passes a screenshot of the app as it is today, with made-up people and work in it.
9
+ var threadPicture = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 400'%3E%3Crect width='640' height='400' fill='%23eef2f6'/%3E%3Crect width='150' height='400' fill='%23dfe7ef'/%3E%3Crect x='20' y='28' width='80' height='12' rx='6' fill='%23aab8c6'/%3E%3Crect x='20' y='68' width='100' height='10' rx='5' fill='%23c2cfdb'/%3E%3Crect x='20' y='94' width='90' height='10' rx='5' fill='%23c2cfdb'/%3E%3Ccircle cx='190' cy='52' r='12' fill='%23aab8c6'/%3E%3Crect x='212' y='44' width='120' height='10' rx='5' fill='%23aab8c6'/%3E%3Crect x='212' y='64' width='300' height='10' rx='5' fill='%23c2cfdb'/%3E%3Ccircle cx='190' cy='132' r='12' fill='%232f6b4f'/%3E%3Crect x='212' y='124' width='100' height='10' rx='5' fill='%232f6b4f'/%3E%3Crect x='212' y='144' width='360' height='10' rx='5' fill='%23c2cfdb'/%3E%3Crect x='212' y='164' width='280' height='10' rx='5' fill='%23c2cfdb'/%3E%3Crect x='212' y='192' width='170' height='48' rx='10' fill='%23ffffff'/%3E%3Crect x='392' y='192' width='170' height='48' rx='10' fill='%23ffffff'/%3E%3Crect x='170' y='336' width='440' height='40' rx='10' fill='%23ffffff'/%3E%3C/svg%3E";
10
+ export default function ProductDemoStill() {
11
+ return (<PageShell>
12
+ <PageSection gap="xxlarge">
13
+ <SectionIntro id="product-demo-still" name="Ask the agent in the thread" statement="Acme Agent reads the thread and the docs, then answers with its sources."/>
14
+ {/* The caption says what the picture shows and that it is an example. The alt says it for a screen reader. */}
15
+ <Figure crop={16 / 10} caption="Example: Dana asks when the pricing page goes live, and Acme Agent answers with two sources. The names are made up.">
16
+ <Image src={threadPicture} alt="A thread in Acme. Dana Lee asks when the new pricing page goes live. Acme Agent answers Nov 20, 2026, and links the launch plan and a message in the launch channel." width={640} height={400}/>
17
+ </Figure>
18
+ </PageSection>
19
+ </PageShell>);
20
+ }