oneslash-design-system 2.28.1 → 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 (234) 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.md +2 -0
  47. package/dist/cases/app-shell.md +2 -0
  48. package/dist/cases/artifact-card.md +2 -0
  49. package/dist/cases/ask-page.md +2 -0
  50. package/dist/cases/auth-gate-loading.md +2 -0
  51. package/dist/cases/billing-page.md +2 -0
  52. package/dist/cases/blog-index.md +2 -0
  53. package/dist/cases/breadcrumb.md +2 -0
  54. package/dist/cases/breakdown-list.md +2 -0
  55. package/dist/cases/bulk-actions/list.d.ts +1 -0
  56. package/dist/cases/bulk-actions/list.jsx +209 -0
  57. package/dist/cases/bulk-actions/paged-table.d.ts +1 -0
  58. package/dist/cases/bulk-actions/paged-table.jsx +246 -0
  59. package/dist/cases/bulk-actions.md +559 -0
  60. package/dist/cases/changelog.md +2 -0
  61. package/dist/cases/chart.md +2 -0
  62. package/dist/cases/check-your-email.md +2 -0
  63. package/dist/cases/code-sample.md +2 -0
  64. package/dist/cases/collapsible-search.md +2 -0
  65. package/dist/cases/comment-thread.md +2 -0
  66. package/dist/cases/comparison-page/table.d.ts +1 -0
  67. package/dist/cases/comparison-page/table.jsx +97 -0
  68. package/dist/cases/comparison-page.md +156 -0
  69. package/dist/cases/composer-limit.md +2 -0
  70. package/dist/cases/confirm-destructive-action.md +2 -0
  71. package/dist/cases/confirm-dialogs.md +2 -0
  72. package/dist/cases/connection-status/card.d.ts +1 -0
  73. package/dist/cases/connection-status/card.jsx +97 -0
  74. package/dist/cases/connection-status/row.d.ts +1 -0
  75. package/dist/cases/connection-status/row.jsx +120 -0
  76. package/dist/cases/connection-status.md +330 -0
  77. package/dist/cases/contact-page.md +2 -0
  78. package/dist/cases/conversation-starters.md +2 -0
  79. package/dist/cases/cookie-choice.md +2 -0
  80. package/dist/cases/create-modal.md +2 -0
  81. package/dist/cases/danger-zone.md +2 -0
  82. package/dist/cases/dashboard.md +2 -0
  83. package/dist/cases/data-table-page.md +2 -0
  84. package/dist/cases/date-field.md +2 -0
  85. package/dist/cases/device-login.md +2 -0
  86. package/dist/cases/docs-component-page.md +2 -0
  87. package/dist/cases/email-confirmed.md +2 -0
  88. package/dist/cases/empty-list.md +2 -0
  89. package/dist/cases/empty-lists.md +2 -0
  90. package/dist/cases/empty-not-set-up.md +2 -0
  91. package/dist/cases/empty-search.md +2 -0
  92. package/dist/cases/error-page.md +2 -0
  93. package/dist/cases/faq.md +2 -0
  94. package/dist/cases/feature-grid.md +2 -0
  95. package/dist/cases/feedback-form.md +2 -0
  96. package/dist/cases/file-upload.md +2 -0
  97. package/dist/cases/filter-menu.md +2 -0
  98. package/dist/cases/forgot-password.md +2 -0
  99. package/dist/cases/form-errors.md +2 -0
  100. package/dist/cases/image-viewer.md +2 -0
  101. package/dist/cases/import-checklist.md +2 -0
  102. package/dist/cases/inline-form-feedback.md +2 -0
  103. package/dist/cases/integrations-list/nested.jsx +1 -1
  104. package/dist/cases/integrations-list/rows.jsx +1 -1
  105. package/dist/cases/integrations-list.md +6 -4
  106. package/dist/cases/invite-member.md +2 -0
  107. package/dist/cases/invoice-list.md +2 -0
  108. package/dist/cases/landing-hero.md +2 -0
  109. package/dist/cases/leaderboard.md +2 -0
  110. package/dist/cases/legal-page.md +2 -0
  111. package/dist/cases/load-failure.md +2 -0
  112. package/dist/cases/log-out-confirm.md +2 -0
  113. package/dist/cases/login-page.md +2 -0
  114. package/dist/cases/long-form-page.md +2 -0
  115. package/dist/cases/master-detail.md +2 -0
  116. package/dist/cases/members-list.md +2 -0
  117. package/dist/cases/mention-list.md +2 -0
  118. package/dist/cases/message-actions.md +2 -0
  119. package/dist/cases/message-attachments.md +2 -0
  120. package/dist/cases/message-composer/with-tools.jsx +17 -7
  121. package/dist/cases/message-composer.md +28 -11
  122. package/dist/cases/message-edit.md +2 -0
  123. package/dist/cases/message-reactions.md +2 -0
  124. package/dist/cases/message-row.md +2 -0
  125. package/dist/cases/message-send-failure/needs-a-person.d.ts +1 -0
  126. package/dist/cases/message-send-failure/needs-a-person.jsx +116 -0
  127. package/dist/cases/message-send-failure/retrying.d.ts +1 -0
  128. package/dist/cases/message-send-failure/retrying.jsx +116 -0
  129. package/dist/cases/message-send-failure.md +308 -0
  130. package/dist/cases/mobile-menu.md +2 -0
  131. package/dist/cases/newsletter-signup.md +2 -0
  132. package/dist/cases/no-access/page.d.ts +1 -0
  133. package/dist/cases/no-access/page.jsx +37 -0
  134. package/dist/cases/no-access/read-only.d.ts +1 -0
  135. package/dist/cases/no-access/read-only.jsx +33 -0
  136. package/dist/cases/no-access.md +147 -0
  137. package/dist/cases/not-found-page.md +2 -0
  138. package/dist/cases/notification-menu.md +2 -0
  139. package/dist/cases/number-format.md +2 -0
  140. package/dist/cases/oauth-consent.md +2 -0
  141. package/dist/cases/on-off-settings.md +2 -0
  142. package/dist/cases/on-this-page.md +2 -0
  143. package/dist/cases/onboarding.md +2 -0
  144. package/dist/cases/one-main-action.md +2 -0
  145. package/dist/cases/overflow-menu.md +2 -0
  146. package/dist/cases/page-end.md +2 -0
  147. package/dist/cases/page-header.md +2 -0
  148. package/dist/cases/paged-card.md +2 -0
  149. package/dist/cases/password-gate.md +2 -0
  150. package/dist/cases/payment-method.md +2 -0
  151. package/dist/cases/people-row.md +2 -0
  152. package/dist/cases/phone-navigation.md +2 -0
  153. package/dist/cases/plan-change-confirm.md +2 -0
  154. package/dist/cases/plan-comparison.md +3 -1
  155. package/dist/cases/plan-picker.md +4 -1
  156. package/dist/cases/plan-sign-off.md +2 -0
  157. package/dist/cases/pricing-section.md +5 -1
  158. package/dist/cases/product-cards.md +2 -0
  159. package/dist/cases/product-demo/scripted.d.ts +3 -0
  160. package/dist/cases/product-demo/scripted.jsx +95 -0
  161. package/dist/cases/product-demo/still.d.ts +1 -0
  162. package/dist/cases/product-demo/still.jsx +20 -0
  163. package/dist/cases/product-demo.md +221 -0
  164. package/dist/cases/profile-form.md +2 -0
  165. package/dist/cases/quick-switcher.md +2 -0
  166. package/dist/cases/range-switch.md +2 -0
  167. package/dist/cases/rename.md +2 -0
  168. package/dist/cases/reply-feedback.md +2 -0
  169. package/dist/cases/reply-sources.md +2 -0
  170. package/dist/cases/route-loading.md +2 -0
  171. package/dist/cases/scope-picker.md +2 -0
  172. package/dist/cases/section-index.md +2 -0
  173. package/dist/cases/session-expired/in-place.d.ts +1 -0
  174. package/dist/cases/session-expired/in-place.jsx +63 -0
  175. package/dist/cases/session-expired/redirect.d.ts +1 -0
  176. package/dist/cases/session-expired/redirect.jsx +62 -0
  177. package/dist/cases/session-expired.md +204 -0
  178. package/dist/cases/set-new-password.md +2 -0
  179. package/dist/cases/settings-page.md +2 -0
  180. package/dist/cases/settings-save.md +2 -0
  181. package/dist/cases/side-pane.md +2 -0
  182. package/dist/cases/sidebar-nav.md +2 -0
  183. package/dist/cases/sign-up-page.md +3 -0
  184. package/dist/cases/signup-from-site/plain.d.ts +1 -0
  185. package/dist/cases/signup-from-site/plain.jsx +125 -0
  186. package/dist/cases/signup-from-site/with-plan.d.ts +4 -0
  187. package/dist/cases/signup-from-site/with-plan.jsx +151 -0
  188. package/dist/cases/signup-from-site.md +351 -0
  189. package/dist/cases/site-footer.md +2 -0
  190. package/dist/cases/site-header/links.d.ts +3 -1
  191. package/dist/cases/site-header/links.jsx +6 -2
  192. package/dist/cases/site-header.md +11 -3
  193. package/dist/cases/site-matches-app.md +32 -0
  194. package/dist/cases/site-search.md +2 -0
  195. package/dist/cases/slash-command-list.md +2 -0
  196. package/dist/cases/stat-row.md +2 -0
  197. package/dist/cases/status-label.md +3 -1
  198. package/dist/cases/success-feedback.md +2 -0
  199. package/dist/cases/tabbed-panels.md +2 -0
  200. package/dist/cases/tag-filter.md +2 -0
  201. package/dist/cases/task-header.md +2 -0
  202. package/dist/cases/theme-switcher.md +2 -0
  203. package/dist/cases/type-to-confirm.md +2 -0
  204. package/dist/cases/typing-and-status.md +2 -0
  205. package/dist/cases/unsaved-changes-guard.md +2 -0
  206. package/dist/cases/upgrade-prompt.md +2 -0
  207. package/dist/cases/usage-meters.md +2 -0
  208. package/dist/cases.json +1489 -39
  209. package/dist/components/checkBox.d.ts +5 -1
  210. package/dist/components/checkBox.jsx +23 -9
  211. package/dist/components/diff.d.ts +29 -0
  212. package/dist/components/diff.jsx +35 -0
  213. package/dist/index.d.ts +1 -0
  214. package/dist/index.js +1 -0
  215. package/dist/internal/diff.d.ts +17 -0
  216. package/dist/internal/diff.js +44 -0
  217. package/dist/native-mapping.json +9 -2
  218. package/dist/stories/AgentPermissions.probe.stories.d.ts +7 -0
  219. package/dist/stories/AgentPermissions.probe.stories.jsx +18 -0
  220. package/dist/stories/AgentRunFailure.probe.stories.d.ts +6 -0
  221. package/dist/stories/AgentRunFailure.probe.stories.jsx +12 -0
  222. package/dist/stories/Cases.generated.stories.d.ts +24 -0
  223. package/dist/stories/Cases.generated.stories.jsx +48 -0
  224. package/dist/stories/Checkbox.stories.d.ts +2 -0
  225. package/dist/stories/Checkbox.stories.jsx +18 -0
  226. package/dist/stories/Diff.stories.d.ts +9 -0
  227. package/dist/stories/Diff.stories.jsx +40 -0
  228. package/dist/stories/ProductDemo.probe.stories.d.ts +6 -0
  229. package/dist/stories/ProductDemo.probe.stories.jsx +12 -0
  230. package/dist/stories/SignupFromSite.probe.stories.d.ts +7 -0
  231. package/dist/stories/SignupFromSite.probe.stories.jsx +17 -0
  232. package/dist/stories/SiteHeader.probe.stories.d.ts +6 -0
  233. package/dist/stories/SiteHeader.probe.stories.jsx +13 -0
  234. package/package.json +1 -1
@@ -0,0 +1,97 @@
1
+ 'use client';
2
+ import PageShell from '../../components/pageShell';
3
+ import PageHeader from '../../components/pageHeader';
4
+ import SectionIntro from '../../components/sectionIntro';
5
+ import Surface from '../../components/surface';
6
+ import Heading from '../../components/heading';
7
+ import Paragraph from '../../components/paragraph';
8
+ import List from '../../components/list';
9
+ import Button from '../../components/button';
10
+ import Link from '../../components/link';
11
+ import TableContainer from '../../components/tableContainer';
12
+ import TableHeader from '../../components/tableHeader';
13
+ import TableHeaderCell from '../../components/tableHeaderCell';
14
+ import TableRow from '../../components/tableRow';
15
+ import TableCell from '../../components/tableCell';
16
+ import { formatMoney } from '../../components/formatNumber';
17
+ import { Cluster, Grid, PageSection, Stack } from '../../components/layout';
18
+ // Fair to both: each says when a visitor should pick it.
19
+ var picks = [
20
+ {
21
+ name: 'Acme',
22
+ items: ['Your team plans its work in threads.', 'You want an agent that reads the thread and asks before it changes shared work.', 'A small team wants a free plan.'],
23
+ },
24
+ {
25
+ name: 'Northwind',
26
+ items: ['Your team works mostly in long documents.', 'You need single sign-on today.', 'You want a desktop app that works offline.'],
27
+ },
28
+ ];
29
+ // Every claim about Northwind comes from one of its public pages, listed under the table by number.
30
+ var sources = [
31
+ { label: 'Northwind pricing', href: 'https://northwind.example/pricing' },
32
+ { label: 'Northwind plan limits', href: 'https://northwind.example/help/limits' },
33
+ { label: 'Northwind agent help', href: 'https://northwind.example/help/agent' },
34
+ { label: 'Northwind export help', href: 'https://northwind.example/help/export' },
35
+ { label: 'Northwind security', href: 'https://northwind.example/security' },
36
+ { label: 'Northwind downloads', href: 'https://northwind.example/download' },
37
+ ];
38
+ // Acme's cells use the plan names, prices and limits of the cases 'Plan picker' and 'Pricing section'.
39
+ // Each Northwind cell names its source by number, in words a screen reader reads with the cell.
40
+ var rows = [
41
+ { feature: 'Price', acme: "Pro, ".concat(formatMoney(8), " per member per month"), northwind: "Team, ".concat(formatMoney(10), " per member per month"), source: 1 },
42
+ { feature: 'Free plan', acme: 'Yes, up to 3 members', northwind: 'No, a 30-day trial', source: 1 },
43
+ { feature: 'AI agent responses', acme: '1,000 a month on Pro', northwind: '500 a month on Team', source: 2 },
44
+ { feature: 'Agent asks before it changes work', acme: 'Yes', northwind: 'No', source: 3 },
45
+ { feature: 'Export to PDF', acme: 'Yes, on Pro', northwind: 'Yes, on Team', source: 4 },
46
+ { feature: 'Single sign-on', acme: 'No', northwind: 'Yes, on Team', source: 5 },
47
+ { feature: 'Desktop app that works offline', acme: 'No', northwind: 'Yes', source: 6 },
48
+ ];
49
+ export default function ComparisonPageTable() {
50
+ return (<PageShell>
51
+ <Stack gap="giant">
52
+ <Stack gap="xxlarge">
53
+ <PageHeader level={1} eyebrow="Compare" title="Acme and Northwind" lede="Both help a team plan its work with an AI agent. Here is where they differ, so you can pick the one that fits."/>
54
+ {/* The one main action, with the same label as the rest of the site. */}
55
+ <Cluster>
56
+ <Button size="large" type="primary" state="enabled" label="Sign Up" href="/sign-up"/>
57
+ </Cluster>
58
+ </Stack>
59
+ <PageSection gap="xxlarge">
60
+ <SectionIntro id="comparison-page-pick" name="When to pick which"/>
61
+ <Grid columns={2}>
62
+ {picks.map(function (p) { return (<Surface key={p.name} padding="medium">
63
+ <Stack gap="medium">
64
+ <Heading level={3} size="h6">{"Pick ".concat(p.name, " when")}</Heading>
65
+ <List items={p.items} size="body2" marker="dot"/>
66
+ </Stack>
67
+ </Surface>); })}
68
+ </Grid>
69
+ </PageSection>
70
+ <PageSection gap="xxlarge">
71
+ <SectionIntro id="comparison-page-features" name="Feature by feature"/>
72
+ <Stack gap="medium">
73
+ {/* A named region that scrolls sideways on a phone, so the page never does. */}
74
+ <TableContainer aria-label="Acme and Northwind compared" minWidth="40rem">
75
+ <TableHeader>
76
+ <TableRow>
77
+ <TableHeaderCell>Feature</TableHeaderCell>
78
+ <TableHeaderCell>Acme</TableHeaderCell>
79
+ <TableHeaderCell>Northwind</TableHeaderCell>
80
+ </TableRow>
81
+ </TableHeader>
82
+ {rows.map(function (row) { return (<TableRow key={row.feature}>
83
+ <TableCell rowHeader>{row.feature}</TableCell>
84
+ <TableCell>{row.acme}</TableCell>
85
+ <TableCell>{"".concat(row.northwind, " (Source ").concat(row.source, ")")}</TableCell>
86
+ </TableRow>); })}
87
+ </TableContainer>
88
+ {/* The sources sit under the table, out of its scroll region. Another site opens in a new tab and says so. */}
89
+ <Stack gap="small">
90
+ <Paragraph size="body2" tone="secondary" measure="none">Sources for Northwind. Checked on Nov 16, 2026, on Northwind's public pages.</Paragraph>
91
+ <List size="body2" marker="number" items={sources.map(function (src) { return (<Link key={src.href} href={src.href} size="body2" openInNewTab announceNewTab>{src.label}</Link>); })}/>
92
+ </Stack>
93
+ </Stack>
94
+ </PageSection>
95
+ </Stack>
96
+ </PageShell>);
97
+ }
@@ -0,0 +1,156 @@
1
+ # Comparison with another product
2
+
3
+ A visitor to the public site is choosing between this product and one other, and wants a fair side-by-side view.
4
+
5
+ For: a marketing site
6
+
7
+ ## Do
8
+
9
+ - Follow the rule 'A site promises only what the app does, in the app's words': name each feature as the app names it.
10
+ - Open the page with `PageHeader` at level 1. Name both products in the title.
11
+ - Put a short 'When to pick which' section next, in a `Grid` of two `Surface`s, one for each product.
12
+ - Be fair to the other product. Say what it does well, and when a visitor should pick it.
13
+ - Put the table in `TableContainer` with an `aria-label` and a `minWidth`, as the case 'Plan comparison' does, so it scrolls in its region on a phone.
14
+ - Put each feature in `TableCell rowHeader`, so a screen reader says it with each cell.
15
+ - Write 'Yes' and 'No' here, since each column is a product, not a plan. Add a short note when it helps, such as 'Yes, up to 3 members'.
16
+ - Give every claim about the other product a source. Name it in the cell by number, such as 'Yes, on Team (Source 5)'.
17
+ - List the sources under the table, numbered, as `Link`s with `announceNewTab`. Keep them out of the table, so its region scrolls alone.
18
+ - Say when the sources were checked, above the list: 'Checked on Nov 16, 2026, on Northwind's public pages.'
19
+ - Ask for one main action, as the rule 'A marketing page asks for one main action, in the same words everywhere' says: 'Sign Up'.
20
+
21
+ ## Don't
22
+
23
+ - Do not add a row about the other product with no source.
24
+ - Do not show a check mark or a cross with no words.
25
+ - Do not leave out the rows where the other product does better.
26
+ - Do not compare against a plan or a price of your own that the app does not have.
27
+ - Do not compare more than two products on one page. Make one page for each.
28
+
29
+ ## Example: Table with sources
30
+
31
+ Uses: `Button`, `Cluster`, `Grid`, `Heading`, `Link`, `List`, `PageHeader`, `PageSection`, `PageShell`, `Paragraph`, `SectionIntro`, `Stack`, `Surface`, `TableCell`, `TableContainer`, `TableHeader`, `TableHeaderCell`, `TableRow`, `formatMoney`
32
+
33
+ ```tsx
34
+ 'use client';
35
+ import PageShell from 'oneslash-design-system/components/pageShell';
36
+ import PageHeader from 'oneslash-design-system/components/pageHeader';
37
+ import SectionIntro from 'oneslash-design-system/components/sectionIntro';
38
+ import Surface from 'oneslash-design-system/components/surface';
39
+ import Heading from 'oneslash-design-system/components/heading';
40
+ import Paragraph from 'oneslash-design-system/components/paragraph';
41
+ import List from 'oneslash-design-system/components/list';
42
+ import Button from 'oneslash-design-system/components/button';
43
+ import Link from 'oneslash-design-system/components/link';
44
+ import TableContainer from 'oneslash-design-system/components/tableContainer';
45
+ import TableHeader from 'oneslash-design-system/components/tableHeader';
46
+ import TableHeaderCell from 'oneslash-design-system/components/tableHeaderCell';
47
+ import TableRow from 'oneslash-design-system/components/tableRow';
48
+ import TableCell from 'oneslash-design-system/components/tableCell';
49
+ import { formatMoney } from 'oneslash-design-system/components/formatNumber';
50
+ import { Cluster, Grid, PageSection, Stack } from 'oneslash-design-system/components/layout';
51
+
52
+ // Fair to both: each says when a visitor should pick it.
53
+ const picks = [
54
+ {
55
+ name: 'Acme',
56
+ items: ['Your team plans its work in threads.', 'You want an agent that reads the thread and asks before it changes shared work.', 'A small team wants a free plan.'],
57
+ },
58
+ {
59
+ name: 'Northwind',
60
+ items: ['Your team works mostly in long documents.', 'You need single sign-on today.', 'You want a desktop app that works offline.'],
61
+ },
62
+ ];
63
+
64
+ // Every claim about Northwind comes from one of its public pages, listed under the table by number.
65
+ const sources = [
66
+ { label: 'Northwind pricing', href: 'https://northwind.example/pricing' },
67
+ { label: 'Northwind plan limits', href: 'https://northwind.example/help/limits' },
68
+ { label: 'Northwind agent help', href: 'https://northwind.example/help/agent' },
69
+ { label: 'Northwind export help', href: 'https://northwind.example/help/export' },
70
+ { label: 'Northwind security', href: 'https://northwind.example/security' },
71
+ { label: 'Northwind downloads', href: 'https://northwind.example/download' },
72
+ ];
73
+
74
+ // Acme's cells use the plan names, prices and limits of the cases 'Plan picker' and 'Pricing section'.
75
+ // Each Northwind cell names its source by number, in words a screen reader reads with the cell.
76
+ const rows: { feature: string; acme: string; northwind: string; source: number }[] = [
77
+ { feature: 'Price', acme: `Pro, ${formatMoney(8)} per member per month`, northwind: `Team, ${formatMoney(10)} per member per month`, source: 1 },
78
+ { feature: 'Free plan', acme: 'Yes, up to 3 members', northwind: 'No, a 30-day trial', source: 1 },
79
+ { feature: 'AI agent responses', acme: '1,000 a month on Pro', northwind: '500 a month on Team', source: 2 },
80
+ { feature: 'Agent asks before it changes work', acme: 'Yes', northwind: 'No', source: 3 },
81
+ { feature: 'Export to PDF', acme: 'Yes, on Pro', northwind: 'Yes, on Team', source: 4 },
82
+ { feature: 'Single sign-on', acme: 'No', northwind: 'Yes, on Team', source: 5 },
83
+ { feature: 'Desktop app that works offline', acme: 'No', northwind: 'Yes', source: 6 },
84
+ ];
85
+
86
+ export default function ComparisonPageTable() {
87
+ return (
88
+ <PageShell>
89
+ <Stack gap="giant">
90
+ <Stack gap="xxlarge">
91
+ <PageHeader
92
+ level={1}
93
+ eyebrow="Compare"
94
+ title="Acme and Northwind"
95
+ lede="Both help a team plan its work with an AI agent. Here is where they differ, so you can pick the one that fits."
96
+ />
97
+ {/* The one main action, with the same label as the rest of the site. */}
98
+ <Cluster>
99
+ <Button size="large" type="primary" state="enabled" label="Sign Up" href="/sign-up" />
100
+ </Cluster>
101
+ </Stack>
102
+ <PageSection gap="xxlarge">
103
+ <SectionIntro id="comparison-page-pick" name="When to pick which" />
104
+ <Grid columns={2}>
105
+ {picks.map((p) => (
106
+ <Surface key={p.name} padding="medium">
107
+ <Stack gap="medium">
108
+ <Heading level={3} size="h6">{`Pick ${p.name} when`}</Heading>
109
+ <List items={p.items} size="body2" marker="dot" />
110
+ </Stack>
111
+ </Surface>
112
+ ))}
113
+ </Grid>
114
+ </PageSection>
115
+ <PageSection gap="xxlarge">
116
+ <SectionIntro id="comparison-page-features" name="Feature by feature" />
117
+ <Stack gap="medium">
118
+ {/* A named region that scrolls sideways on a phone, so the page never does. */}
119
+ <TableContainer aria-label="Acme and Northwind compared" minWidth="40rem">
120
+ <TableHeader>
121
+ <TableRow>
122
+ <TableHeaderCell>Feature</TableHeaderCell>
123
+ <TableHeaderCell>Acme</TableHeaderCell>
124
+ <TableHeaderCell>Northwind</TableHeaderCell>
125
+ </TableRow>
126
+ </TableHeader>
127
+ {rows.map((row) => (
128
+ <TableRow key={row.feature}>
129
+ <TableCell rowHeader>{row.feature}</TableCell>
130
+ <TableCell>{row.acme}</TableCell>
131
+ <TableCell>{`${row.northwind} (Source ${row.source})`}</TableCell>
132
+ </TableRow>
133
+ ))}
134
+ </TableContainer>
135
+ {/* The sources sit under the table, out of its scroll region. Another site opens in a new tab and says so. */}
136
+ <Stack gap="small">
137
+ <Paragraph size="body2" tone="secondary" measure="none">Sources for Northwind. Checked on Nov 16, 2026, on Northwind's public pages.</Paragraph>
138
+ <List
139
+ size="body2"
140
+ marker="number"
141
+ items={sources.map((src) => (
142
+ <Link key={src.href} href={src.href} size="body2" openInNewTab announceNewTab>{src.label}</Link>
143
+ ))}
144
+ />
145
+ </Stack>
146
+ </Stack>
147
+ </PageSection>
148
+ </Stack>
149
+ </PageShell>
150
+ );
151
+ }
152
+ ```
153
+
154
+ ## Native
155
+
156
+ On Apple and Android an app has no comparison page. It lives on the site.
@@ -2,6 +2,8 @@
2
2
 
3
3
  The agent cannot be called from the composer because the workspace reached a limit, such as its AI agent responses for the month.
4
4
 
5
+ For: an app, an agent
6
+
5
7
  ## Do
6
8
 
7
9
  - Follow the rule 'An agent refuses clearly' word for word: "You've used all 50 AI agent responses this month."
@@ -2,6 +2,8 @@
2
2
 
3
3
  A person asks to delete or remove something, and it cannot be undone.
4
4
 
5
+ For: an app
6
+
5
7
  ## Do
6
8
 
7
9
  - Follow the rule 'A confirm says exactly what will happen' for the Modal: `size="small"`, 'Cancel' first, then the action with `color="danger"`.
@@ -2,6 +2,8 @@
2
2
 
3
3
  An action a person takes themselves needs their yes before it happens. An action the agent wants to take follows the rule 'An agent asks before a risky action', a card in the conversation, not this one.
4
4
 
5
+ For: a marketing site, an app
6
+
5
7
  ## Answer
6
8
 
7
9
  A confirm is a Modal with `size="small"`. Its title names the action in Title Case, such as 'Delete Project'. The body says in one or two sentences what will happen and what is kept. Two Buttons sit in the Modal's `actions`. 'Cancel' comes first, a `<Button type="tertiary" size="small">`. Then comes the action, a `<Button type="primary" size="small">` labelled in Title Case with the same verb as the title. When the action destroys or removes something, the action Button also has `color="danger"`. One case differs: 'Unsaved changes'. Its guard may have three Buttons, 'Cancel', "Don't Save" and 'Save', in that order. When it has two, its safe Button reads 'Keep Editing'. Escape and a click outside the Modal mean Cancel. While the request runs, the action Button is `loading` and keeps its label, and 'Cancel' is `state="disabled"`. The Modal stays open. It still calls `onClose` on Escape or a click outside, and the page ignores that call until the request ends. If the request fails, the Modal stays open and shows an inline error Alert at the top of its body, as the rule 'A form error shows next to the problem' says. When the action works, the Modal closes. If the thing is still on screen, the change shows where it is. If the thing is gone, a toast names it, as the rule 'Success shows where the person is looking' says.
@@ -0,0 +1 @@
1
+ export default function ConnectionStatusCard(): import("react").JSX.Element;
@@ -0,0 +1,97 @@
1
+ 'use client';
2
+ import { useEffect, useRef, useState } from 'react';
3
+ import { Figma, FileText } from 'lucide-react';
4
+ import Toaster, { toast, dismissToast } from '../../components/toaster';
5
+ import Heading from '../../components/heading';
6
+ import Paragraph from '../../components/paragraph';
7
+ import Link from '../../components/link';
8
+ import Line from '../../components/line';
9
+ import Icon from '../../components/icon';
10
+ import Tag from '../../components/tag';
11
+ import TimeStamp from '../../components/timeStamp';
12
+ import Button from '../../components/button';
13
+ import { Center, Cluster, Stack } from '../../components/layout';
14
+ // A real app reads these from the server: only the sources that need a person. The other 3 work.
15
+ var total = 5;
16
+ var firstSources = [
17
+ { id: 'figma', name: 'Figma', status: 'Needs reconnect', syncedMinutesAgo: 2 * 24 * 60, line: 'Access ran out. Design comments since Nov 14, 2026 are missing.' },
18
+ { id: 'notion', name: 'Notion', status: 'Not responding', syncedMinutesAgo: 35, line: 'Notion has not answered since 2:10 PM. Docs may be out of date.' },
19
+ ];
20
+ export default function ConnectionStatusCard() {
21
+ var _a = useState(firstSources), sources = _a[0], setSources = _a[1];
22
+ var _b = useState(null), working = _b[0], setWorking = _b[1];
23
+ // The minutes above count back from when the page opened.
24
+ var openedAt = useState(function () { return Date.now(); })[0];
25
+ var timers = useRef([]);
26
+ var toastIds = useRef([]);
27
+ var title = useRef(null);
28
+ // Each source's Button by id, so focus can move to the next one when a fixed source leaves the card.
29
+ var buttons = useRef({});
30
+ // Where focus goes after the next render, once the element it goes to is on screen.
31
+ var focusNext = useRef();
32
+ // On unmount it stops every request and closes every toast it opened.
33
+ useEffect(function () { return function () {
34
+ timers.current.forEach(clearTimeout);
35
+ toastIds.current.forEach(function (id) { return dismissToast(id); });
36
+ toastIds.current = [];
37
+ }; }, []);
38
+ useEffect(function () {
39
+ var move = focusNext.current;
40
+ focusNext.current = undefined;
41
+ move === null || move === void 0 ? void 0 : move();
42
+ });
43
+ // 'Reconnect' stands in for the provider's sign-in; 'Try Again' asks the source at once. Both work here.
44
+ function fix(s) {
45
+ if (working)
46
+ return;
47
+ setWorking(s.id);
48
+ timers.current.push(setTimeout(function () {
49
+ var _a;
50
+ setWorking(null);
51
+ var at = sources.findIndex(function (x) { return x.id === s.id; });
52
+ var rest = sources.filter(function (x) { return x.id !== s.id; });
53
+ setSources(rest);
54
+ toastIds.current.push(toast({ type: 'success', message: "".concat(s.name, " is connected and syncing again.") }));
55
+ // The fixed source leaves the card: focus goes to the next source, the one before on the last row, or the title.
56
+ var neighbor = (_a = rest[at]) !== null && _a !== void 0 ? _a : rest[at - 1];
57
+ focusNext.current = function () { var _a; return (_a = (neighbor ? buttons.current[neighbor.id] : title.current)) === null || _a === void 0 ? void 0 : _a.focus(); };
58
+ }, 1200));
59
+ }
60
+ return (<Center width="page">
61
+ {/* A real app mounts one Toaster near its root. */}
62
+ <Toaster />
63
+ <Stack gap="medium">
64
+ <Line />
65
+ <Heading ref={title} tabIndex={-1} level={2} size="h6">
66
+ {sources.length === 0 ? 'Sources' : "".concat(sources.length, " ").concat(sources.length === 1 ? 'source needs' : 'sources need', " you")}
67
+ </Heading>
68
+ {sources.length === 0 ? (<Paragraph tone="secondary" size="body2" measure="none">{"All ".concat(total, " sources are working.")}</Paragraph>) : (<Stack gap="large">
69
+ {sources.map(function (s) {
70
+ var busy = working === s.id;
71
+ var reconnect = s.status === 'Needs reconnect';
72
+ return (<Cluster key={s.id} justify="between" align="start">
73
+ <Stack gap="small">
74
+ <Cluster gap="small">
75
+ <Icon icon={s.id === 'figma' ? Figma : FileText} size="small" color="secondary"/>
76
+ <Heading level={3} size="subtitle2">{s.name}</Heading>
77
+ </Cluster>
78
+ <Cluster gap="small">
79
+ <Tag variant="dot" size="small" color={reconnect ? 'warning' : 'error'} label={s.status}/>
80
+ <Cluster gap="small">
81
+ <Paragraph size="caption" tone="secondary" measure="none">Synced</Paragraph>
82
+ <TimeStamp createdAt={openedAt - s.syncedMinutesAgo * 60 * 1000} dateFormat="relative" data={s.syncedMinutesAgo < 24 * 60 ? 'time' : 'date'}/>
83
+ </Cluster>
84
+ </Cluster>
85
+ <Paragraph tone="secondary" size="body2" measure="none">{s.line}</Paragraph>
86
+ </Stack>
87
+ <Button ref={function (el) { buttons.current[s.id] = el; }} size="small" type={reconnect ? 'primary' : 'secondary'} state={working && !busy ? 'disabled' : 'enabled'} label={reconnect ? 'Reconnect' : 'Try Again'} aria-label={reconnect ? "Reconnect ".concat(s.name) : "Try again to reach ".concat(s.name)} loading={busy} onClickButton={function () { return fix(s); }}/>
88
+ </Cluster>);
89
+ })}
90
+ </Stack>)}
91
+ {/* A real app links to its integrations page. Link has no click handler to keep the example here, so it uses '#'. */}
92
+ <Cluster>
93
+ <Link href="#" size="body2">See All Sources</Link>
94
+ </Cluster>
95
+ </Stack>
96
+ </Center>);
97
+ }
@@ -0,0 +1 @@
1
+ export default function ConnectionStatusRow(): import("react").JSX.Element;
@@ -0,0 +1,120 @@
1
+ 'use client';
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ import { useEffect, useRef, useState } from 'react';
14
+ import { Figma, FileText, Slack } from 'lucide-react';
15
+ import Heading from '../../components/heading';
16
+ import Paragraph from '../../components/paragraph';
17
+ import TableContainer from '../../components/tableContainer';
18
+ import TableRow from '../../components/tableRow';
19
+ import TableCell from '../../components/tableCell';
20
+ import BrandIcon from '../../components/brandIcon';
21
+ import Icon from '../../components/icon';
22
+ import Tag from '../../components/tag';
23
+ import TimeStamp from '../../components/timeStamp';
24
+ import Progress from '../../components/progress';
25
+ import Button from '../../components/button';
26
+ import { Center, Cluster, Stack } from '../../components/layout';
27
+ // A real app reads these from the server.
28
+ var firstSources = [
29
+ { id: 'slack', name: 'Slack', status: 'Connected', syncedMinutesAgo: 2 },
30
+ { id: 'github', name: 'GitHub', status: 'Syncing', syncedMinutesAgo: 12, line: 'GitHub asked Acme to slow down. Syncing again at 2:45 PM.', brand: 'github' },
31
+ { id: 'drive', name: 'Google Drive', status: 'Syncing', line: 'First import. Files show up as they arrive.', imported: { done: 12, total: 40 }, brand: 'google' },
32
+ { id: 'figma', name: 'Figma', status: 'Needs reconnect', syncedMinutesAgo: 2 * 24 * 60, line: 'Access ran out on Nov 14, 2026. Reconnect to keep files in sync.' },
33
+ { id: 'notion', name: 'Notion', status: 'Not responding', syncedMinutesAgo: 35, line: 'Notion has not answered since 2:10 PM. Acme tries again every 10 minutes.' },
34
+ ];
35
+ // The case 'Status in a row': a grey dot for a usual state, a color only when a person must act.
36
+ var dotColor = {
37
+ Connected: 'default',
38
+ Syncing: 'default',
39
+ 'Needs reconnect': 'warning',
40
+ 'Not responding': 'error',
41
+ };
42
+ function renderLogo(s) {
43
+ if (s.brand)
44
+ return <BrandIcon name={s.brand} size={24}/>;
45
+ return <Icon icon={s.id === 'slack' ? Slack : s.id === 'figma' ? Figma : FileText} size="medium" color="secondary"/>;
46
+ }
47
+ export default function ConnectionStatusRow() {
48
+ var _a = useState(firstSources), sources = _a[0], setSources = _a[1];
49
+ var _b = useState(null), working = _b[0], setWorking = _b[1];
50
+ // The minutes above count back from when the page opened.
51
+ var openedAt = useState(function () { return Date.now(); })[0];
52
+ var timers = useRef([]);
53
+ // Each row's Disconnect by source id, so focus can move there when Reconnect or Try Again goes away.
54
+ var disconnectButtons = useRef({});
55
+ // Where focus goes after the next render, once the element it goes to is on screen.
56
+ var focusNext = useRef();
57
+ // On unmount it stops every request.
58
+ useEffect(function () { return function () {
59
+ timers.current.forEach(clearTimeout);
60
+ }; }, []);
61
+ useEffect(function () {
62
+ var move = focusNext.current;
63
+ focusNext.current = undefined;
64
+ move === null || move === void 0 ? void 0 : move();
65
+ });
66
+ // 'Reconnect' stands in for the provider's sign-in; 'Try Again' asks the source at once. Both work here.
67
+ function fix(s) {
68
+ if (working)
69
+ return;
70
+ setWorking(s.id);
71
+ timers.current.push(setTimeout(function () {
72
+ setWorking(null);
73
+ setSources(function (list) { return list.map(function (x) { return (x.id === s.id ? __assign(__assign({}, x), { status: 'Connected', syncedMinutesAgo: 0, line: undefined }) : x); }); });
74
+ // The row's new status says it works again, so no toast. The Button that had focus is gone,
75
+ // so focus goes to the row's Disconnect.
76
+ focusNext.current = function () { var _a; return (_a = disconnectButtons.current[s.id]) === null || _a === void 0 ? void 0 : _a.focus(); };
77
+ }, 1200));
78
+ }
79
+ return (<Center width="page">
80
+ <Stack gap="large">
81
+ <Stack gap="small">
82
+ <Heading level={1} size="h5">Integrations</Heading>
83
+ <Paragraph tone="secondary" size="body2" measure="none">Connect the tools your team already uses.</Paragraph>
84
+ </Stack>
85
+ {/* A named table scrolls inside its own region on a phone, never the page. */}
86
+ <TableContainer aria-label="Connected sources" minWidth="640px">
87
+ {sources.map(function (s) {
88
+ var busy = working === s.id;
89
+ var minutes = s.syncedMinutesAgo;
90
+ return (<TableRow key={s.id}>
91
+ <TableCell width="56px">{renderLogo(s)}</TableCell>
92
+ <TableCell>
93
+ <Stack gap="small">
94
+ <Heading level={2} size="subtitle1">{s.name}</Heading>
95
+ <Cluster gap="small">
96
+ <Tag variant="dot" size="small" color={dotColor[s.status]} label={s.status}/>
97
+ {minutes !== undefined && (<Cluster gap="small">
98
+ <Paragraph size="caption" tone="secondary" measure="none">Synced</Paragraph>
99
+ <TimeStamp createdAt={openedAt - minutes * 60 * 1000} dateFormat="relative" data={minutes < 24 * 60 ? 'time' : 'date'}/>
100
+ </Cluster>)}
101
+ </Cluster>
102
+ {s.line && <Paragraph tone="secondary" size="body2" measure="none">{s.line}</Paragraph>}
103
+ {s.imported && (<Progress label="Importing files" kind="share" size="small" value={s.imported.done} max={s.imported.total} valueText={"".concat(s.imported.done, " of ").concat(s.imported.total, " files")}/>)}
104
+ </Stack>
105
+ </TableCell>
106
+ {/* A fixed last column keeps every row's Buttons in one place. */}
107
+ <TableCell width="220px">
108
+ <Cluster gap="small" justify="end">
109
+ {s.status === 'Needs reconnect' && (<Button size="small" type="primary" state={working && !busy ? 'disabled' : 'enabled'} label="Reconnect" aria-label={"Reconnect ".concat(s.name)} loading={busy} onClickButton={function () { return fix(s); }}/>)}
110
+ {s.status === 'Not responding' && (<Button size="small" type="secondary" state={working && !busy ? 'disabled' : 'enabled'} label="Try Again" aria-label={"Try again to reach ".concat(s.name)} loading={busy} onClickButton={function () { return fix(s); }}/>)}
111
+ {/* The case 'Integrations' confirms Disconnect in a small Modal. */}
112
+ <Button ref={function (el) { disconnectButtons.current[s.id] = el; }} size="small" type="tertiary" state={working ? 'disabled' : 'enabled'} label="Disconnect" aria-label={"Disconnect ".concat(s.name)} onClickButton={function () { return console.info("Ask to disconnect ".concat(s.name)); }}/>
113
+ </Cluster>
114
+ </TableCell>
115
+ </TableRow>);
116
+ })}
117
+ </TableContainer>
118
+ </Stack>
119
+ </Center>);
120
+ }