oneslash-design-system 2.19.0 → 2.21.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.
- package/README.md +1 -1
- package/dist/DESIGN.md +62 -5
- package/dist/cases/about-page/profile.d.ts +1 -0
- package/dist/cases/about-page/profile.jsx +64 -0
- package/dist/cases/about-page.md +114 -0
- package/dist/cases/admin-inbox/list.d.ts +1 -0
- package/dist/cases/admin-inbox/list.jsx +104 -0
- package/dist/cases/admin-inbox/split.d.ts +1 -0
- package/dist/cases/admin-inbox/split.jsx +68 -0
- package/dist/cases/admin-inbox.md +254 -0
- package/dist/cases/api-keys.md +1 -1
- package/dist/cases/billing-page/billed-elsewhere.d.ts +1 -0
- package/dist/cases/billing-page/billed-elsewhere.jsx +28 -0
- package/dist/cases/billing-page/self-serve.d.ts +1 -0
- package/dist/cases/billing-page/self-serve.jsx +134 -0
- package/dist/cases/billing-page.md +247 -0
- package/dist/cases/blog-index/cards.d.ts +1 -0
- package/dist/cases/blog-index/cards.jsx +45 -0
- package/dist/cases/blog-index/list.d.ts +1 -0
- package/dist/cases/blog-index/list.jsx +46 -0
- package/dist/cases/blog-index.md +160 -0
- package/dist/cases/breakdown-list/bars.d.ts +1 -0
- package/dist/cases/breakdown-list/bars.jsx +47 -0
- package/dist/cases/breakdown-list/table.d.ts +1 -0
- package/dist/cases/breakdown-list/table.jsx +69 -0
- package/dist/cases/breakdown-list.md +158 -0
- package/dist/cases/changelog/by-month.d.ts +1 -0
- package/dist/cases/changelog/by-month.jsx +70 -0
- package/dist/cases/changelog/one-page.d.ts +1 -0
- package/dist/cases/changelog/one-page.jsx +70 -0
- package/dist/cases/changelog.md +200 -0
- package/dist/cases/code-sample/block.d.ts +1 -0
- package/dist/cases/code-sample/block.jsx +19 -0
- package/dist/cases/code-sample/command.d.ts +1 -0
- package/dist/cases/code-sample/command.jsx +17 -0
- package/dist/cases/code-sample.md +96 -0
- package/dist/cases/composer-limit/notice-with-action.jsx +3 -3
- package/dist/cases/composer-limit/notice.jsx +3 -3
- package/dist/cases/composer-limit.md +8 -8
- package/dist/cases/contact-page/form.d.ts +1 -0
- package/dist/cases/contact-page/form.jsx +83 -0
- package/dist/cases/contact-page/links.d.ts +1 -0
- package/dist/cases/contact-page/links.jsx +19 -0
- package/dist/cases/contact-page.md +142 -0
- package/dist/cases/dashboard/numbers-first.d.ts +1 -0
- package/dist/cases/dashboard/numbers-first.jsx +165 -0
- package/dist/cases/dashboard/work-first.d.ts +1 -0
- package/dist/cases/dashboard/work-first.jsx +165 -0
- package/dist/cases/dashboard.md +507 -0
- package/dist/cases/data-table-page/all-rows.d.ts +1 -0
- package/dist/cases/data-table-page/all-rows.jsx +226 -0
- package/dist/cases/data-table-page/paged.d.ts +1 -0
- package/dist/cases/data-table-page/paged.jsx +284 -0
- package/dist/cases/data-table-page.md +771 -0
- package/dist/cases/docs-component-page/reference.d.ts +1 -0
- package/dist/cases/docs-component-page/reference.jsx +93 -0
- package/dist/cases/docs-component-page.md +144 -0
- package/dist/cases/faq/accordion.d.ts +1 -0
- package/dist/cases/faq/accordion.jsx +25 -0
- package/dist/cases/faq/open-list.d.ts +1 -0
- package/dist/cases/faq/open-list.jsx +27 -0
- package/dist/cases/faq.md +110 -0
- package/dist/cases/feature-grid/cards.d.ts +1 -0
- package/dist/cases/feature-grid/cards.jsx +33 -0
- package/dist/cases/feature-grid/rows.d.ts +1 -0
- package/dist/cases/feature-grid/rows.jsx +30 -0
- package/dist/cases/feature-grid.md +132 -0
- package/dist/cases/image-viewer/gallery.d.ts +1 -0
- package/dist/cases/image-viewer/gallery.jsx +32 -0
- package/dist/cases/image-viewer/single.d.ts +1 -0
- package/dist/cases/image-viewer/single.jsx +25 -0
- package/dist/cases/image-viewer.md +123 -0
- package/dist/cases/invoice-list/table.d.ts +1 -0
- package/dist/cases/invoice-list/table.jsx +64 -0
- package/dist/cases/invoice-list/with-upcoming.d.ts +1 -0
- package/dist/cases/invoice-list/with-upcoming.jsx +75 -0
- package/dist/cases/invoice-list.md +237 -0
- package/dist/cases/landing-hero/centered.d.ts +1 -0
- package/dist/cases/landing-hero/centered.jsx +22 -0
- package/dist/cases/landing-hero/split.d.ts +1 -0
- package/dist/cases/landing-hero/split.jsx +30 -0
- package/dist/cases/landing-hero.md +114 -0
- package/dist/cases/legal-page/sections.d.ts +1 -0
- package/dist/cases/legal-page/sections.jsx +61 -0
- package/dist/cases/legal-page.md +96 -0
- package/dist/cases/load-failure/inline.jsx +2 -2
- package/dist/cases/load-failure.md +2 -2
- package/dist/cases/long-form-page/article.d.ts +1 -0
- package/dist/cases/long-form-page/article.jsx +58 -0
- package/dist/cases/long-form-page/with-contents.d.ts +1 -0
- package/dist/cases/long-form-page/with-contents.jsx +41 -0
- package/dist/cases/long-form-page.md +170 -0
- package/dist/cases/members-list/rows.jsx +2 -1
- package/dist/cases/members-list/table.jsx +8 -9
- package/dist/cases/members-list.md +12 -13
- package/dist/cases/message-actions/hover-toolbar.jsx +11 -8
- package/dist/cases/message-actions/menu.jsx +10 -7
- package/dist/cases/message-actions.md +19 -13
- package/dist/cases/message-attachments/in-composer.jsx +2 -2
- package/dist/cases/message-attachments/in-message.jsx +16 -11
- package/dist/cases/message-attachments.md +29 -17
- package/dist/cases/number-format.md +36 -0
- package/dist/cases/one-main-action.md +33 -0
- package/dist/cases/overflow-menu/in-a-header.jsx +9 -6
- package/dist/cases/overflow-menu/on-a-row.jsx +9 -6
- package/dist/cases/overflow-menu.md +16 -10
- package/dist/cases/page-end/cta-band.d.ts +1 -0
- package/dist/cases/page-end/cta-band.jsx +24 -0
- package/dist/cases/page-end/next-link.d.ts +1 -0
- package/dist/cases/page-end/next-link.jsx +18 -0
- package/dist/cases/page-end.md +88 -0
- package/dist/cases/paged-card/pager.d.ts +1 -0
- package/dist/cases/paged-card/pager.jsx +41 -0
- package/dist/cases/paged-card/see-all.d.ts +1 -0
- package/dist/cases/paged-card/see-all.jsx +34 -0
- package/dist/cases/paged-card.md +147 -0
- package/dist/cases/password-gate/inline.d.ts +1 -0
- package/dist/cases/password-gate/inline.jsx +94 -0
- package/dist/cases/password-gate/modal.d.ts +1 -0
- package/dist/cases/password-gate/modal.jsx +81 -0
- package/dist/cases/password-gate/page.d.ts +1 -0
- package/dist/cases/password-gate/page.jsx +82 -0
- package/dist/cases/password-gate.md +351 -0
- package/dist/cases/payment-method/none.d.ts +1 -0
- package/dist/cases/payment-method/none.jsx +17 -0
- package/dist/cases/payment-method/on-file.d.ts +1 -0
- package/dist/cases/payment-method/on-file.jsx +92 -0
- package/dist/cases/payment-method.md +182 -0
- package/dist/cases/plan-change-confirm/blocked.d.ts +1 -0
- package/dist/cases/plan-change-confirm/blocked.jsx +48 -0
- package/dist/cases/plan-change-confirm/downgrade.d.ts +1 -0
- package/dist/cases/plan-change-confirm/downgrade.jsx +52 -0
- package/dist/cases/plan-change-confirm/upgrade.d.ts +1 -0
- package/dist/cases/plan-change-confirm/upgrade.jsx +51 -0
- package/dist/cases/plan-change-confirm.md +261 -0
- package/dist/cases/plan-picker/cards.d.ts +1 -0
- package/dist/cases/plan-picker/cards.jsx +97 -0
- package/dist/cases/plan-picker/list.d.ts +1 -0
- package/dist/cases/plan-picker/list.jsx +103 -0
- package/dist/cases/plan-picker.md +297 -0
- package/dist/cases/pricing-section/cards.d.ts +1 -0
- package/dist/cases/pricing-section/cards.jsx +40 -0
- package/dist/cases/pricing-section.md +85 -0
- package/dist/cases/product-cards/grid.d.ts +1 -0
- package/dist/cases/product-cards/grid.jsx +20 -0
- package/dist/cases/product-cards.md +71 -0
- package/dist/cases/range-switch/segmented.jsx +11 -7
- package/dist/cases/range-switch.md +16 -11
- package/dist/cases/reply-feedback/thumbs.jsx +11 -8
- package/dist/cases/reply-feedback/with-reason.jsx +11 -8
- package/dist/cases/reply-feedback.md +20 -14
- package/dist/cases/section-index/cards.d.ts +1 -0
- package/dist/cases/section-index/cards.jsx +25 -0
- package/dist/cases/section-index/list.d.ts +1 -0
- package/dist/cases/section-index/list.jsx +56 -0
- package/dist/cases/section-index.md +140 -0
- package/dist/cases/settings-page/top-tabs.jsx +4 -3
- package/dist/cases/settings-page.md +5 -4
- package/dist/cases/site-header.md +1 -1
- package/dist/cases/site-search/dialog.d.ts +1 -0
- package/dist/cases/site-search/dialog.jsx +131 -0
- package/dist/cases/site-search.md +176 -0
- package/dist/cases/stat-row/featured.d.ts +1 -0
- package/dist/cases/stat-row/featured.jsx +17 -0
- package/dist/cases/stat-row/tiles.d.ts +1 -0
- package/dist/cases/stat-row/tiles.jsx +34 -0
- package/dist/cases/stat-row.md +104 -0
- package/dist/cases/status-label/dot.d.ts +1 -0
- package/dist/cases/status-label/dot.jsx +39 -0
- package/dist/cases/status-label/text.d.ts +1 -0
- package/dist/cases/status-label/text.jsx +44 -0
- package/dist/cases/status-label.md +143 -0
- package/dist/cases/tabbed-panels/tabs.d.ts +1 -0
- package/dist/cases/tabbed-panels/tabs.jsx +40 -0
- package/dist/cases/tabbed-panels.md +81 -0
- package/dist/cases/upgrade-prompt/inline.jsx +4 -2
- package/dist/cases/upgrade-prompt/modal.jsx +2 -1
- package/dist/cases/upgrade-prompt.md +10 -6
- package/dist/cases/usage-meters/by-person.d.ts +1 -0
- package/dist/cases/usage-meters/by-person.jsx +72 -0
- package/dist/cases/usage-meters/meters.d.ts +1 -0
- package/dist/cases/usage-meters/meters.jsx +49 -0
- package/dist/cases/usage-meters/with-cap.d.ts +1 -0
- package/dist/cases/usage-meters/with-cap.jsx +73 -0
- package/dist/cases/usage-meters.md +303 -0
- package/dist/cases.json +2178 -97
- package/dist/components/accordion.d.ts +31 -0
- package/dist/components/accordion.jsx +103 -0
- package/dist/components/button.d.ts +1 -1
- package/dist/components/button.jsx +11 -5
- package/dist/components/codeBlock.d.ts +26 -0
- package/dist/components/codeBlock.jsx +101 -0
- package/dist/components/formatNumber.d.ts +25 -0
- package/dist/components/formatNumber.js +125 -0
- package/dist/components/iconButton.jsx +12 -7
- package/dist/components/lightbox.d.ts +31 -0
- package/dist/components/lightbox.jsx +161 -0
- package/dist/components/linkCard.d.ts +10 -1
- package/dist/components/linkCard.jsx +32 -6
- package/dist/components/modal.d.ts +10 -2
- package/dist/components/modal.jsx +17 -12
- package/dist/components/pageHeader.jsx +1 -1
- package/dist/components/pagination.d.ts +28 -0
- package/dist/components/pagination.jsx +89 -0
- package/dist/components/progress.d.ts +33 -0
- package/dist/components/progress.jsx +50 -0
- package/dist/components/searchDialog.d.ts +44 -0
- package/dist/components/searchDialog.jsx +152 -0
- package/dist/components/skeleton.d.ts +21 -0
- package/dist/components/skeleton.jsx +41 -0
- package/dist/components/statTile.d.ts +32 -0
- package/dist/components/statTile.jsx +61 -0
- package/dist/components/tab.d.ts +5 -1
- package/dist/components/tab.jsx +2 -2
- package/dist/components/tabPanel.d.ts +16 -0
- package/dist/components/tabPanel.jsx +12 -0
- package/dist/components/tableContainer.d.ts +5 -1
- package/dist/components/tableContainer.jsx +9 -1
- package/dist/components/tableHeaderCell.d.ts +3 -1
- package/dist/components/tableHeaderCell.jsx +2 -2
- package/dist/components/tabsContainer.d.ts +5 -1
- package/dist/components/tabsContainer.jsx +2 -2
- package/dist/components/titleBar.d.ts +3 -1
- package/dist/components/titleBar.jsx +4 -3
- package/dist/index.d.ts +10 -0
- package/dist/index.js +10 -0
- package/dist/internal/accordion.d.ts +4 -0
- package/dist/internal/accordion.js +53 -0
- package/dist/internal/combobox.d.ts +20 -0
- package/dist/internal/combobox.js +28 -0
- package/dist/internal/highlight.d.ts +5 -0
- package/dist/internal/highlight.js +18 -0
- package/dist/native-mapping.json +57 -3
- package/dist/stories/Accordion.stories.d.ts +11 -0
- package/dist/stories/Accordion.stories.jsx +93 -0
- package/dist/stories/Button.stories.d.ts +1 -0
- package/dist/stories/Button.stories.jsx +19 -1
- package/dist/stories/Cases.generated.stories.d.ts +60 -0
- package/dist/stories/Cases.generated.stories.jsx +120 -0
- package/dist/stories/CodeBlock.stories.d.ts +12 -0
- package/dist/stories/CodeBlock.stories.jsx +65 -0
- package/dist/stories/Lightbox.stories.d.ts +8 -0
- package/dist/stories/Lightbox.stories.jsx +40 -0
- package/dist/stories/LinkCard.stories.d.ts +6 -0
- package/dist/stories/LinkCard.stories.jsx +17 -0
- package/dist/stories/PageHeader.stories.d.ts +2 -0
- package/dist/stories/PageHeader.stories.jsx +13 -0
- package/dist/stories/Pagination.stories.d.ts +9 -0
- package/dist/stories/Pagination.stories.jsx +75 -0
- package/dist/stories/Progress.stories.d.ts +9 -0
- package/dist/stories/Progress.stories.jsx +43 -0
- package/dist/stories/SearchDialog.stories.d.ts +17 -0
- package/dist/stories/SearchDialog.stories.jsx +111 -0
- package/dist/stories/Skeleton.stories.d.ts +7 -0
- package/dist/stories/Skeleton.stories.jsx +27 -0
- package/dist/stories/StatTile.stories.d.ts +10 -0
- package/dist/stories/StatTile.stories.jsx +55 -0
- package/dist/stories/TabPanel.stories.d.ts +7 -0
- package/dist/stories/TabPanel.stories.jsx +31 -0
- package/dist/stories/Table.stories.d.ts +1 -0
- package/dist/stories/Table.stories.jsx +49 -1
- package/dist/stories/TitleBar.stories.d.ts +1 -0
- package/dist/stories/TitleBar.stories.jsx +7 -0
- package/package.json +5 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import PageShell from '../../components/pageShell';
|
|
3
|
+
import PageHeader from '../../components/pageHeader';
|
|
4
|
+
import Button from '../../components/button';
|
|
5
|
+
import Paragraph from '../../components/paragraph';
|
|
6
|
+
import Figure from '../../components/figure';
|
|
7
|
+
import Image from '../../components/image';
|
|
8
|
+
import { Cluster, Grid, Stack } from '../../components/layout';
|
|
9
|
+
// A stand-in for a picture of the product. A real page passes a screenshot.
|
|
10
|
+
var appPicture = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 480'%3E%3Crect width='640' height='480' fill='%23eef2f6'/%3E%3Crect width='170' height='480' fill='%23dfe7ef'/%3E%3Crect x='20' y='28' width='90' height='12' rx='6' fill='%23aab8c6'/%3E%3Crect x='20' y='72' width='120' height='10' rx='5' fill='%23c2cfdb'/%3E%3Crect x='20' y='100' width='100' height='10' rx='5' fill='%23c2cfdb'/%3E%3Crect x='20' y='128' width='110' height='10' rx='5' fill='%23c2cfdb'/%3E%3Crect x='200' y='28' width='180' height='14' rx='7' fill='%23aab8c6'/%3E%3Crect x='200' y='80' width='300' height='44' rx='10' fill='%23ffffff'/%3E%3Crect x='260' y='148' width='340' height='44' rx='10' fill='%232f6b4f'/%3E%3Crect x='200' y='216' width='260' height='44' rx='10' fill='%23ffffff'/%3E%3Crect x='200' y='400' width='400' height='40' rx='10' fill='%23ffffff'/%3E%3C/svg%3E";
|
|
11
|
+
export default function LandingHeroSplit() {
|
|
12
|
+
return (<PageShell wide>
|
|
13
|
+
{/* Two columns from md. On a phone the words come first and the picture sits under them. */}
|
|
14
|
+
<Grid columns={2} gap="giant">
|
|
15
|
+
<Stack gap="xxlarge">
|
|
16
|
+
<PageHeader level={1} eyebrow="Team workspace with an AI agent" title="A shared workspace for your team and its agent" lede="Plan the work in threads, keep notes the whole team can search, and ask the agent when you need an answer."/>
|
|
17
|
+
<Stack gap="medium">
|
|
18
|
+
<Cluster>
|
|
19
|
+
<Button size="large" type="primary" state="enabled" label="Sign Up" href="#sign-up"/>
|
|
20
|
+
<Button size="large" type="secondary" state="enabled" label="See How It Works" href="#how-it-works"/>
|
|
21
|
+
</Cluster>
|
|
22
|
+
<Paragraph tone="secondary" size="body2" measure="none">Start on Free with 3 members. No card needed.</Paragraph>
|
|
23
|
+
</Stack>
|
|
24
|
+
</Stack>
|
|
25
|
+
<Figure crop={4 / 3}>
|
|
26
|
+
<Image src={appPicture} alt="The Acme workspace: a list of channels beside a conversation with the agent" width={640} height={480}/>
|
|
27
|
+
</Figure>
|
|
28
|
+
</Grid>
|
|
29
|
+
</PageShell>);
|
|
30
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Hero
|
|
2
|
+
|
|
3
|
+
A marketing page opens by saying what the product is and asking for one thing.
|
|
4
|
+
|
|
5
|
+
## Do
|
|
6
|
+
|
|
7
|
+
- Follow the rule 'A marketing page asks for one main action, in the same words everywhere'.
|
|
8
|
+
- Use `PageHeader` with `level={1}`, an `eyebrow` that says what kind of product it is, a title and a lede. The page has one h1.
|
|
9
|
+
- Put the main action first, a primary `Button` labeled 'Sign Up', then one secondary action such as 'See How It Works'. Use `size="large"`.
|
|
10
|
+
- Put a short line under the actions that removes a doubt: 'Start on Free with 3 members. No card needed.'
|
|
11
|
+
- Put the two actions in a `Cluster`. On a phone they sit side by side, and the second moves to its own line when they do not fit.
|
|
12
|
+
- Keep the words left aligned, also in `centered`. A centered block of text is hard to read past two lines.
|
|
13
|
+
- Let the title wrap. A long word breaks inside the column and nothing scrolls sideways.
|
|
14
|
+
- Name the picture for a screen reader: say what is in it. Use `Figure` with `crop`, so the picture keeps its shape at every width.
|
|
15
|
+
- Show the words first and the picture under them on a phone. `Grid columns={2}` stacks the two parts in the order you write them.
|
|
16
|
+
|
|
17
|
+
## Don't
|
|
18
|
+
|
|
19
|
+
- Do not add a second primary Button to the hero, or a third action.
|
|
20
|
+
- Do not put a second h1 on the page.
|
|
21
|
+
- Do not move the title or swap its words with a timer.
|
|
22
|
+
- Do not hide the main action under the picture on a phone.
|
|
23
|
+
|
|
24
|
+
## Option: Words in one column
|
|
25
|
+
|
|
26
|
+
Use when: The words carry the page: the product is easy to say and a picture would add little.
|
|
27
|
+
|
|
28
|
+
Uses: `Button`, `Cluster`, `PageHeader`, `PageShell`, `Paragraph`, `Stack`
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
'use client';
|
|
32
|
+
import PageShell from 'oneslash-design-system/components/pageShell';
|
|
33
|
+
import PageHeader from 'oneslash-design-system/components/pageHeader';
|
|
34
|
+
import Button from 'oneslash-design-system/components/button';
|
|
35
|
+
import Paragraph from 'oneslash-design-system/components/paragraph';
|
|
36
|
+
import { Cluster, Stack } from 'oneslash-design-system/components/layout';
|
|
37
|
+
|
|
38
|
+
export default function LandingHeroCentered() {
|
|
39
|
+
return (
|
|
40
|
+
<PageShell>
|
|
41
|
+
<Stack gap="xxlarge">
|
|
42
|
+
{/* The only h1 on the page: level 1 is the default. */}
|
|
43
|
+
<PageHeader
|
|
44
|
+
level={1}
|
|
45
|
+
eyebrow="Team workspace with an AI agent"
|
|
46
|
+
title="A shared workspace for your team and its agent"
|
|
47
|
+
lede="Plan the work in threads, keep notes the whole team can search, and ask the agent when you need an answer."
|
|
48
|
+
/>
|
|
49
|
+
{/* The rule's one main action first, then one secondary. They wrap on a phone. */}
|
|
50
|
+
<Stack gap="medium">
|
|
51
|
+
<Cluster>
|
|
52
|
+
<Button size="large" type="primary" state="enabled" label="Sign Up" href="#sign-up" />
|
|
53
|
+
<Button size="large" type="secondary" state="enabled" label="See How It Works" href="#how-it-works" />
|
|
54
|
+
</Cluster>
|
|
55
|
+
<Paragraph tone="secondary" size="body2" measure="none">Start on Free with 3 members. No card needed.</Paragraph>
|
|
56
|
+
</Stack>
|
|
57
|
+
</Stack>
|
|
58
|
+
</PageShell>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Option: Words beside a picture
|
|
64
|
+
|
|
65
|
+
Use when: A picture of the product explains it faster than words.
|
|
66
|
+
|
|
67
|
+
Uses: `Button`, `Cluster`, `Figure`, `Grid`, `Image`, `PageHeader`, `PageShell`, `Paragraph`, `Stack`
|
|
68
|
+
|
|
69
|
+
```tsx
|
|
70
|
+
'use client';
|
|
71
|
+
import PageShell from 'oneslash-design-system/components/pageShell';
|
|
72
|
+
import PageHeader from 'oneslash-design-system/components/pageHeader';
|
|
73
|
+
import Button from 'oneslash-design-system/components/button';
|
|
74
|
+
import Paragraph from 'oneslash-design-system/components/paragraph';
|
|
75
|
+
import Figure from 'oneslash-design-system/components/figure';
|
|
76
|
+
import Image from 'oneslash-design-system/components/image';
|
|
77
|
+
import { Cluster, Grid, Stack } from 'oneslash-design-system/components/layout';
|
|
78
|
+
|
|
79
|
+
// A stand-in for a picture of the product. A real page passes a screenshot.
|
|
80
|
+
const appPicture =
|
|
81
|
+
"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 480'%3E%3Crect width='640' height='480' fill='%23eef2f6'/%3E%3Crect width='170' height='480' fill='%23dfe7ef'/%3E%3Crect x='20' y='28' width='90' height='12' rx='6' fill='%23aab8c6'/%3E%3Crect x='20' y='72' width='120' height='10' rx='5' fill='%23c2cfdb'/%3E%3Crect x='20' y='100' width='100' height='10' rx='5' fill='%23c2cfdb'/%3E%3Crect x='20' y='128' width='110' height='10' rx='5' fill='%23c2cfdb'/%3E%3Crect x='200' y='28' width='180' height='14' rx='7' fill='%23aab8c6'/%3E%3Crect x='200' y='80' width='300' height='44' rx='10' fill='%23ffffff'/%3E%3Crect x='260' y='148' width='340' height='44' rx='10' fill='%232f6b4f'/%3E%3Crect x='200' y='216' width='260' height='44' rx='10' fill='%23ffffff'/%3E%3Crect x='200' y='400' width='400' height='40' rx='10' fill='%23ffffff'/%3E%3C/svg%3E";
|
|
82
|
+
|
|
83
|
+
export default function LandingHeroSplit() {
|
|
84
|
+
return (
|
|
85
|
+
<PageShell wide>
|
|
86
|
+
{/* Two columns from md. On a phone the words come first and the picture sits under them. */}
|
|
87
|
+
<Grid columns={2} gap="giant">
|
|
88
|
+
<Stack gap="xxlarge">
|
|
89
|
+
<PageHeader
|
|
90
|
+
level={1}
|
|
91
|
+
eyebrow="Team workspace with an AI agent"
|
|
92
|
+
title="A shared workspace for your team and its agent"
|
|
93
|
+
lede="Plan the work in threads, keep notes the whole team can search, and ask the agent when you need an answer."
|
|
94
|
+
/>
|
|
95
|
+
<Stack gap="medium">
|
|
96
|
+
<Cluster>
|
|
97
|
+
<Button size="large" type="primary" state="enabled" label="Sign Up" href="#sign-up" />
|
|
98
|
+
<Button size="large" type="secondary" state="enabled" label="See How It Works" href="#how-it-works" />
|
|
99
|
+
</Cluster>
|
|
100
|
+
<Paragraph tone="secondary" size="body2" measure="none">Start on Free with 3 members. No card needed.</Paragraph>
|
|
101
|
+
</Stack>
|
|
102
|
+
</Stack>
|
|
103
|
+
<Figure crop={4 / 3}>
|
|
104
|
+
<Image src={appPicture} alt="The Acme workspace: a list of channels beside a conversation with the agent" width={640} height={480} />
|
|
105
|
+
</Figure>
|
|
106
|
+
</Grid>
|
|
107
|
+
</PageShell>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Native
|
|
113
|
+
|
|
114
|
+
On Apple and Android an app has no hero. The first screen is the product, or a short sign-in.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function LegalPageSections(): import("react").JSX.Element;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import PageShell from '../../components/pageShell';
|
|
3
|
+
import PageHeader from '../../components/pageHeader';
|
|
4
|
+
import OnThisPage from '../../components/onThisPage';
|
|
5
|
+
import Alert from '../../components/alert';
|
|
6
|
+
import Heading from '../../components/heading';
|
|
7
|
+
import Paragraph from '../../components/paragraph';
|
|
8
|
+
import List from '../../components/list';
|
|
9
|
+
import { Stack } from '../../components/layout';
|
|
10
|
+
// Generic sample text for a made-up service. A real page uses text written for the company.
|
|
11
|
+
var sections = [
|
|
12
|
+
{ id: 'legal-page-using', title: '1. Using Acme' },
|
|
13
|
+
{ id: 'legal-page-accounts', title: '2. Your account' },
|
|
14
|
+
{ id: 'legal-page-content', title: '3. Your content' },
|
|
15
|
+
{ id: 'legal-page-rules', title: '4. Rules of use' },
|
|
16
|
+
{ id: 'legal-page-ending', title: '5. Deleting your account' },
|
|
17
|
+
{ id: 'legal-page-contact', title: '6. Contact' },
|
|
18
|
+
];
|
|
19
|
+
var items = sections.map(function (_a) {
|
|
20
|
+
var id = _a.id, title = _a.title;
|
|
21
|
+
return ({ id: id, label: title });
|
|
22
|
+
});
|
|
23
|
+
export default function LegalPageSections() {
|
|
24
|
+
return (<PageShell aside={<OnThisPage items={items}/>}>
|
|
25
|
+
<Stack gap="giant">
|
|
26
|
+
<Alert type="info" variant="inline" message="Sample text. This is not a real agreement." autoDismiss={false}/>
|
|
27
|
+
<PageHeader level={1} title="Terms of service" facts={[{ label: 'Last updated', value: 'Nov 16, 2026' }]}/>
|
|
28
|
+
<Stack gap="xxlarge">
|
|
29
|
+
<Stack gap="large">
|
|
30
|
+
<Heading level={2} size="h5" id="legal-page-using">1. Using Acme</Heading>
|
|
31
|
+
<Paragraph>These terms are between Acme and you. When you use the service, you agree to them. If you use it for a team, you say you may agree for that team.</Paragraph>
|
|
32
|
+
<Paragraph>We may change the service and these terms. We tell you before a change that matters to you.</Paragraph>
|
|
33
|
+
</Stack>
|
|
34
|
+
<Stack gap="large">
|
|
35
|
+
<Heading level={2} size="h5" id="legal-page-accounts">2. Your account</Heading>
|
|
36
|
+
<Paragraph>You keep your login details to yourself and tell us when you think someone else knows them. You answer for what happens under your account.</Paragraph>
|
|
37
|
+
<List marker="dot" size="body1" items={['Give true details when you sign up.', 'Use one account for yourself.', 'Tell us if you lose access.']}/>
|
|
38
|
+
</Stack>
|
|
39
|
+
<Stack gap="large">
|
|
40
|
+
<Heading level={2} size="h5" id="legal-page-content">3. Your content</Heading>
|
|
41
|
+
<Paragraph>What you write and upload stays yours. You let us store it and show it to the people you choose, so the service can work.</Paragraph>
|
|
42
|
+
<Paragraph>You can export your content or delete it at any time. Deleted content leaves our systems within 30 days.</Paragraph>
|
|
43
|
+
</Stack>
|
|
44
|
+
<Stack gap="large">
|
|
45
|
+
<Heading level={2} size="h5" id="legal-page-rules">4. Rules of use</Heading>
|
|
46
|
+
<Paragraph>Use Acme only for lawful work, and treat other people with respect. Do not:</Paragraph>
|
|
47
|
+
<List marker="dot" size="body1" items={['Break the law or ask others to.', 'Try to get into accounts that are not yours.', 'Send what harms the service or the people on it.']}/>
|
|
48
|
+
</Stack>
|
|
49
|
+
<Stack gap="large">
|
|
50
|
+
<Heading level={2} size="h5" id="legal-page-ending">5. Deleting your account</Heading>
|
|
51
|
+
<Paragraph>You can delete your account at any time from your settings. We may close it if you break these terms, and we tell you why when we do.</Paragraph>
|
|
52
|
+
<List marker="number" size="body1" items={['Open Settings and choose Delete Account.', 'Confirm, and the account is deleted.', 'Export your content first if you want to keep it.']}/>
|
|
53
|
+
</Stack>
|
|
54
|
+
<Stack gap="large">
|
|
55
|
+
<Heading level={2} size="h5" id="legal-page-contact">6. Contact</Heading>
|
|
56
|
+
<Paragraph>Write to help@acme.example with any question about these terms.</Paragraph>
|
|
57
|
+
</Stack>
|
|
58
|
+
</Stack>
|
|
59
|
+
</Stack>
|
|
60
|
+
</PageShell>);
|
|
61
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Legal page
|
|
2
|
+
|
|
3
|
+
A person reads the terms or the privacy policy to find one answer in it, or reads all of it before they agree.
|
|
4
|
+
|
|
5
|
+
## Do
|
|
6
|
+
|
|
7
|
+
- Put an info `Alert` first with the words 'Sample text. This is not a real agreement.' on any page whose text is an example. Set `autoDismiss={false}`, so it stays. A real page has no such line and uses text written for the company.
|
|
8
|
+
- Use `PageHeader` with `level={1}`: one level 1 title, 'Terms of service', and `facts` with 'Last updated' 'Nov 16, 2026'. The date is the date of the text, not of the last deploy.
|
|
9
|
+
- Number the sections as level 2 headings: '1. Using Acme'. Give each an `id`, in the same order as the list beside the page.
|
|
10
|
+
- Put `OnThisPage` in the `aside` of `PageShell`, as the case 'On this page' says, with the same labels as the headings.
|
|
11
|
+
- Write paragraphs and `List`s at reading width, one idea to a paragraph. Use `marker="dot"` for what a term covers and `marker="number"` for steps in order.
|
|
12
|
+
- Name who the text is between, once, in the first section: 'Acme' and 'you'.
|
|
13
|
+
- End with a Contact section that names `help@acme.example` as the only address.
|
|
14
|
+
- Leave every section open. A person finds a word with find in page, and a closed panel hides what they look for.
|
|
15
|
+
|
|
16
|
+
## Don't
|
|
17
|
+
|
|
18
|
+
- Do not put the sections in an accordion. Find in page does not search closed panels.
|
|
19
|
+
- Do not set each section in a card. A long text reads best in one column, with the headings doing the work.
|
|
20
|
+
- Do not copy the text of another company. A real page uses text a lawyer wrote for the company.
|
|
21
|
+
- Do not write a date without a year, or only "recently updated".
|
|
22
|
+
- Do not rely on the list of sections to make the page readable. It sits beside the page from the `xl` breakpoint, and a phone reads in order.
|
|
23
|
+
|
|
24
|
+
## Example: Numbered sections with a list beside them
|
|
25
|
+
|
|
26
|
+
Uses: `Alert`, `Heading`, `List`, `OnThisPage`, `PageHeader`, `PageShell`, `Paragraph`, `Stack`
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
'use client';
|
|
30
|
+
import PageShell from 'oneslash-design-system/components/pageShell';
|
|
31
|
+
import PageHeader from 'oneslash-design-system/components/pageHeader';
|
|
32
|
+
import OnThisPage from 'oneslash-design-system/components/onThisPage';
|
|
33
|
+
import Alert from 'oneslash-design-system/components/alert';
|
|
34
|
+
import Heading from 'oneslash-design-system/components/heading';
|
|
35
|
+
import Paragraph from 'oneslash-design-system/components/paragraph';
|
|
36
|
+
import List from 'oneslash-design-system/components/list';
|
|
37
|
+
import { Stack } from 'oneslash-design-system/components/layout';
|
|
38
|
+
|
|
39
|
+
// Generic sample text for a made-up service. A real page uses text written for the company.
|
|
40
|
+
const sections = [
|
|
41
|
+
{ id: 'legal-page-using', title: '1. Using Acme' },
|
|
42
|
+
{ id: 'legal-page-accounts', title: '2. Your account' },
|
|
43
|
+
{ id: 'legal-page-content', title: '3. Your content' },
|
|
44
|
+
{ id: 'legal-page-rules', title: '4. Rules of use' },
|
|
45
|
+
{ id: 'legal-page-ending', title: '5. Deleting your account' },
|
|
46
|
+
{ id: 'legal-page-contact', title: '6. Contact' },
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
const items = sections.map(({ id, title }) => ({ id, label: title }));
|
|
50
|
+
|
|
51
|
+
export default function LegalPageSections() {
|
|
52
|
+
return (
|
|
53
|
+
<PageShell aside={<OnThisPage items={items} />}>
|
|
54
|
+
<Stack gap="giant">
|
|
55
|
+
<Alert type="info" variant="inline" message="Sample text. This is not a real agreement." autoDismiss={false} />
|
|
56
|
+
<PageHeader level={1} title="Terms of service" facts={[{ label: 'Last updated', value: 'Nov 16, 2026' }]} />
|
|
57
|
+
<Stack gap="xxlarge">
|
|
58
|
+
<Stack gap="large">
|
|
59
|
+
<Heading level={2} size="h5" id="legal-page-using">1. Using Acme</Heading>
|
|
60
|
+
<Paragraph>These terms are between Acme and you. When you use the service, you agree to them. If you use it for a team, you say you may agree for that team.</Paragraph>
|
|
61
|
+
<Paragraph>We may change the service and these terms. We tell you before a change that matters to you.</Paragraph>
|
|
62
|
+
</Stack>
|
|
63
|
+
<Stack gap="large">
|
|
64
|
+
<Heading level={2} size="h5" id="legal-page-accounts">2. Your account</Heading>
|
|
65
|
+
<Paragraph>You keep your login details to yourself and tell us when you think someone else knows them. You answer for what happens under your account.</Paragraph>
|
|
66
|
+
<List marker="dot" size="body1" items={['Give true details when you sign up.', 'Use one account for yourself.', 'Tell us if you lose access.']} />
|
|
67
|
+
</Stack>
|
|
68
|
+
<Stack gap="large">
|
|
69
|
+
<Heading level={2} size="h5" id="legal-page-content">3. Your content</Heading>
|
|
70
|
+
<Paragraph>What you write and upload stays yours. You let us store it and show it to the people you choose, so the service can work.</Paragraph>
|
|
71
|
+
<Paragraph>You can export your content or delete it at any time. Deleted content leaves our systems within 30 days.</Paragraph>
|
|
72
|
+
</Stack>
|
|
73
|
+
<Stack gap="large">
|
|
74
|
+
<Heading level={2} size="h5" id="legal-page-rules">4. Rules of use</Heading>
|
|
75
|
+
<Paragraph>Use Acme only for lawful work, and treat other people with respect. Do not:</Paragraph>
|
|
76
|
+
<List marker="dot" size="body1" items={['Break the law or ask others to.', 'Try to get into accounts that are not yours.', 'Send what harms the service or the people on it.']} />
|
|
77
|
+
</Stack>
|
|
78
|
+
<Stack gap="large">
|
|
79
|
+
<Heading level={2} size="h5" id="legal-page-ending">5. Deleting your account</Heading>
|
|
80
|
+
<Paragraph>You can delete your account at any time from your settings. We may close it if you break these terms, and we tell you why when we do.</Paragraph>
|
|
81
|
+
<List marker="number" size="body1" items={['Open Settings and choose Delete Account.', 'Confirm, and the account is deleted.', 'Export your content first if you want to keep it.']} />
|
|
82
|
+
</Stack>
|
|
83
|
+
<Stack gap="large">
|
|
84
|
+
<Heading level={2} size="h5" id="legal-page-contact">6. Contact</Heading>
|
|
85
|
+
<Paragraph>Write to help@acme.example with any question about these terms.</Paragraph>
|
|
86
|
+
</Stack>
|
|
87
|
+
</Stack>
|
|
88
|
+
</Stack>
|
|
89
|
+
</PageShell>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Native
|
|
95
|
+
|
|
96
|
+
On Apple open the text in an `SFSafariViewController`, so the address is the real one. On Android open it in a Custom Tab.
|
|
@@ -7,7 +7,7 @@ import Alert from '../../components/alert';
|
|
|
7
7
|
import List from '../../components/list';
|
|
8
8
|
import Button from '../../components/button';
|
|
9
9
|
import { Center, Cluster, Stack } from '../../components/layout';
|
|
10
|
-
var invoices = ['November 2026: $
|
|
10
|
+
var invoices = ['November 2026: $24.00', 'October 2026: $24.00', 'September 2026: $24.00'];
|
|
11
11
|
export default function LoadFailureInline() {
|
|
12
12
|
var _a = useState('Could not load your invoices.'), error = _a[0], setError = _a[1];
|
|
13
13
|
var _b = useState(false), loading = _b[0], setLoading = _b[1];
|
|
@@ -29,7 +29,7 @@ export default function LoadFailureInline() {
|
|
|
29
29
|
<Surface padding="large">
|
|
30
30
|
<Stack gap="medium">
|
|
31
31
|
<Heading level={2} size="h6">Plan</Heading>
|
|
32
|
-
<Paragraph size="body2" measure="none">
|
|
32
|
+
<Paragraph size="body2" measure="none">Pro plan, 3 members, renews on Dec 1, 2026.</Paragraph>
|
|
33
33
|
<Cluster>
|
|
34
34
|
<Button size="small" type="secondary" state="enabled" label="Change Plan"/>
|
|
35
35
|
</Cluster>
|
|
@@ -92,7 +92,7 @@ import List from 'oneslash-design-system/components/list';
|
|
|
92
92
|
import Button from 'oneslash-design-system/components/button';
|
|
93
93
|
import { Center, Cluster, Stack } from 'oneslash-design-system/components/layout';
|
|
94
94
|
|
|
95
|
-
const invoices = ['November 2026: $
|
|
95
|
+
const invoices = ['November 2026: $24.00', 'October 2026: $24.00', 'September 2026: $24.00'];
|
|
96
96
|
|
|
97
97
|
export default function LoadFailureInline() {
|
|
98
98
|
const [error, setError] = useState('Could not load your invoices.');
|
|
@@ -118,7 +118,7 @@ export default function LoadFailureInline() {
|
|
|
118
118
|
<Surface padding="large">
|
|
119
119
|
<Stack gap="medium">
|
|
120
120
|
<Heading level={2} size="h6">Plan</Heading>
|
|
121
|
-
<Paragraph size="body2" measure="none">
|
|
121
|
+
<Paragraph size="body2" measure="none">Pro plan, 3 members, renews on Dec 1, 2026.</Paragraph>
|
|
122
122
|
<Cluster>
|
|
123
123
|
<Button size="small" type="secondary" state="enabled" label="Change Plan" />
|
|
124
124
|
</Cluster>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function LongFormPageArticle(): import("react").JSX.Element;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import PageShell from '../../components/pageShell';
|
|
3
|
+
import PageHeader from '../../components/pageHeader';
|
|
4
|
+
import SectionIntro from '../../components/sectionIntro';
|
|
5
|
+
import NumberedRow from '../../components/numberedRow';
|
|
6
|
+
import Figure from '../../components/figure';
|
|
7
|
+
import Image from '../../components/image';
|
|
8
|
+
import Paragraph from '../../components/paragraph';
|
|
9
|
+
import List from '../../components/list';
|
|
10
|
+
import Link from '../../components/link';
|
|
11
|
+
import LinkCard from '../../components/linkCard';
|
|
12
|
+
import { PageSection, Stack } from '../../components/layout';
|
|
13
|
+
// A stand-in for the hero picture. A real page passes its own.
|
|
14
|
+
var hero = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1280 720'%3E%3Crect width='1280' height='720' fill='%23eef2f6'/%3E%3Crect x='120' y='120' width='460' height='480' rx='24' fill='%23ffffff'/%3E%3Crect x='680' y='120' width='480' height='220' rx='24' fill='%23dfe7ef'/%3E%3Crect x='680' y='380' width='480' height='220' rx='24' fill='%232f6b4f'/%3E%3Crect x='160' y='170' width='240' height='20' rx='10' fill='%23aab8c6'/%3E%3Crect x='160' y='220' width='360' height='16' rx='8' fill='%23c2cfdb'/%3E%3Crect x='160' y='260' width='320' height='16' rx='8' fill='%23c2cfdb'/%3E%3C/svg%3E";
|
|
15
|
+
export default function LongFormPageArticle() {
|
|
16
|
+
return (<PageShell>
|
|
17
|
+
<Stack gap="giant">
|
|
18
|
+
<PageHeader level={1} title="Why we keep decisions in threads" lede="A decision made in a meeting is gone by Friday. We moved ours into the thread where the work happens, and this is what changed." facts={[
|
|
19
|
+
{ label: 'Published', value: 'Nov 12, 2026' },
|
|
20
|
+
{ label: 'Reading time', value: '6 minutes' },
|
|
21
|
+
{ label: 'Author', value: 'Dana Lee' },
|
|
22
|
+
]}/>
|
|
23
|
+
<Figure crop={16 / 9} caption="The thread for one decision, with the notes that led to it.">
|
|
24
|
+
<Image src={hero} alt="A thread beside a note, with the decision marked in green" width={1280} height={720}/>
|
|
25
|
+
</Figure>
|
|
26
|
+
<PageSection>
|
|
27
|
+
<SectionIntro id="long-form-page-problem" name="The problem" statement="People remembered the decision. They did not remember why.">
|
|
28
|
+
<Paragraph>Every month someone asked why a screen worked the way it did. The answer was in a call that nobody wrote down.</Paragraph>
|
|
29
|
+
<Paragraph>So the team spent the first ten minutes of each review arguing about a choice that was already made.</Paragraph>
|
|
30
|
+
</SectionIntro>
|
|
31
|
+
</PageSection>
|
|
32
|
+
<PageSection>
|
|
33
|
+
<SectionIntro id="long-form-page-decisions" name="What we decided"/>
|
|
34
|
+
<Stack gap="xlarge">
|
|
35
|
+
<NumberedRow index={0} title="A decision stays with the work it decides.">
|
|
36
|
+
<Paragraph>Anyone who opens the work sees the choice and the messages around it, so nobody has to ask.</Paragraph>
|
|
37
|
+
</NumberedRow>
|
|
38
|
+
<NumberedRow index={1} title="Each decision has one owner.">
|
|
39
|
+
<Paragraph>The owner writes it in a sentence and says what would change it. Ben Carter reviews it the same day.</Paragraph>
|
|
40
|
+
</NumberedRow>
|
|
41
|
+
<NumberedRow index={2} title="A decision can be reopened, with a reason." proof="The thread keeps both versions and the reason for the change.">
|
|
42
|
+
<Paragraph>Nothing is final for good. A new fact is a reason to look again, and the thread keeps both versions.</Paragraph>
|
|
43
|
+
</NumberedRow>
|
|
44
|
+
</Stack>
|
|
45
|
+
</PageSection>
|
|
46
|
+
<PageSection>
|
|
47
|
+
<SectionIntro id="long-form-page-reading" name="Further reading"/>
|
|
48
|
+
<List size="body1" items={[
|
|
49
|
+
<Link key="a" href="#how-channels-work">How channels work</Link>,
|
|
50
|
+
<Link key="b" href="#writing-a-decision">Writing a decision in one sentence</Link>,
|
|
51
|
+
<Link key="c" href="#reopening-a-decision">Reopening a decision</Link>,
|
|
52
|
+
]}/>
|
|
53
|
+
</PageSection>
|
|
54
|
+
{/* A reading page ends by pointing to the next page to read. */}
|
|
55
|
+
<LinkCard href="#task-threads" title="Task threads" caption="Next: Task threads"/>
|
|
56
|
+
</Stack>
|
|
57
|
+
</PageShell>);
|
|
58
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function LongFormPageWithContents(): import("react").JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import PageShell from '../../components/pageShell';
|
|
3
|
+
import PageHeader from '../../components/pageHeader';
|
|
4
|
+
import SectionIntro from '../../components/sectionIntro';
|
|
5
|
+
import OnThisPage from '../../components/onThisPage';
|
|
6
|
+
import Paragraph from '../../components/paragraph';
|
|
7
|
+
import List from '../../components/list';
|
|
8
|
+
import LinkCard from '../../components/linkCard';
|
|
9
|
+
import { PageSection, Stack } from '../../components/layout';
|
|
10
|
+
// The same ids and names go to the sections and to the list. A real site builds both from one list.
|
|
11
|
+
var sections = [
|
|
12
|
+
{ id: 'long-form-page-start', name: 'Before you start', text: 'Pick one workspace for the trial. Invite two people who will use it every day, and keep the rest for later.' },
|
|
13
|
+
{ id: 'long-form-page-channels', name: 'Set up channels', text: 'Make a channel for each team or project. Name it for the subject, so a new member can tell where to write.' },
|
|
14
|
+
{ id: 'long-form-page-notes', name: 'Move your notes', text: 'Paste the notes you still use into a note. Leave old ones where they are until someone asks for them.' },
|
|
15
|
+
{ id: 'long-form-page-agent', name: 'Ask the agent', text: 'Ask a question in a channel. The agent answers from that workspace and names the notes it used.' },
|
|
16
|
+
{ id: 'long-form-page-review', name: 'Review after a week', text: 'Look at what the team used and what it left alone. Remove a channel that has had no message.' },
|
|
17
|
+
];
|
|
18
|
+
var items = sections.map(function (_a) {
|
|
19
|
+
var id = _a.id, name = _a.name;
|
|
20
|
+
return ({ id: id, label: name });
|
|
21
|
+
});
|
|
22
|
+
var filler = 'Write what you decide in the thread, in one sentence. Someone who opens the page next month should not need to ask you what happened.';
|
|
23
|
+
export default function LongFormPageWithContents() {
|
|
24
|
+
return (<PageShell aside={<OnThisPage items={items}/>}>
|
|
25
|
+
<Stack gap="giant">
|
|
26
|
+
<PageHeader level={1} title="A first week with Acme" lede="What to set up on day one, and what to leave until you need it." facts={[
|
|
27
|
+
{ label: 'Published', value: 'Nov 12, 2026' },
|
|
28
|
+
{ label: 'Reading time', value: '8 minutes' },
|
|
29
|
+
{ label: 'Author', value: 'Dana Lee' },
|
|
30
|
+
]}/>
|
|
31
|
+
{sections.map(function (s) { return (<PageSection key={s.id}>
|
|
32
|
+
<SectionIntro id={s.id} name={s.name}>
|
|
33
|
+
<Paragraph>{s.text}</Paragraph>
|
|
34
|
+
<Paragraph tone="secondary">{filler}</Paragraph>
|
|
35
|
+
{s.id === 'long-form-page-agent' && (<List marker="dot" size="body1" items={['Ask one question at a time.', 'Say which channel or note it is about.', 'Check the sources it names.']}/>)}
|
|
36
|
+
</SectionIntro>
|
|
37
|
+
</PageSection>); })}
|
|
38
|
+
<LinkCard href="#task-threads" title="Task threads" caption="Next: Task threads"/>
|
|
39
|
+
</Stack>
|
|
40
|
+
</PageShell>);
|
|
41
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# Long-form page
|
|
2
|
+
|
|
3
|
+
A person reads one long piece, such as a post, a case study or a method, from the top down, and may come back to part of it.
|
|
4
|
+
|
|
5
|
+
## Do
|
|
6
|
+
|
|
7
|
+
- Use `PageHeader` with `level={1}`, a `title`, a `lede` of one or two sentences and `facts` for the date, the reading time and the author. The title is the one level 1 heading.
|
|
8
|
+
- Write the facts as 'Published' 'Nov 12, 2026', 'Reading time' '6 minutes' and 'Author' 'Dana Lee'. A number shows its unit, as the rule 'A number shows its unit and never shows 0 for unknown' says.
|
|
9
|
+
- Put one hero `Figure` after the header, with an `Image` that has alt text and a caption when it needs one.
|
|
10
|
+
- Make each section a `SectionIntro`, whose name is the level 2 heading and gets an id for a link. Put the body under it as `Paragraph`s at reading width.
|
|
11
|
+
- Show the decisions or steps of a case study as `NumberedRow`s, each with a short title and the reason beneath it.
|
|
12
|
+
- Put further reading in a `List` of `Link`s, each named for the page it goes to.
|
|
13
|
+
- End the page as the case 'Page end' says: one `LinkCard` that names the next page to read, with the caption 'Next: Task threads'.
|
|
14
|
+
- Put `OnThisPage` in the `aside` of `PageShell` for `with-contents`, as the case 'On this page' says. Give every `SectionIntro` an `id` and pass the same ids and names as the items.
|
|
15
|
+
- Make the page read in order without the list. Below the `xl` breakpoint the list is not shown, and a phone scrolls.
|
|
16
|
+
|
|
17
|
+
## Don't
|
|
18
|
+
|
|
19
|
+
- Do not pick `with-contents` for a post of two to four sections that people read through. Pick `article`, and they find the sections by scrolling.
|
|
20
|
+
- Do not put the list of sections in the page as well as beside it.
|
|
21
|
+
- Do not set the text wider than reading width. Let the figure and the numbered rows use the column.
|
|
22
|
+
- Do not end the page on a sign-up banner. A reader who finished the page wants the next thing to read.
|
|
23
|
+
- Do not hide a section behind an accordion. A reader who is in the middle of the page needs to find a word with find in page.
|
|
24
|
+
- Do not use a second level 1 heading in a section.
|
|
25
|
+
|
|
26
|
+
## Option: An article read top to bottom
|
|
27
|
+
|
|
28
|
+
Use when: A post or a case study that most people read from the first line to the last.
|
|
29
|
+
|
|
30
|
+
Uses: `Figure`, `Image`, `Link`, `LinkCard`, `List`, `NumberedRow`, `PageHeader`, `PageSection`, `PageShell`, `Paragraph`, `SectionIntro`, `Stack`
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
'use client';
|
|
34
|
+
import PageShell from 'oneslash-design-system/components/pageShell';
|
|
35
|
+
import PageHeader from 'oneslash-design-system/components/pageHeader';
|
|
36
|
+
import SectionIntro from 'oneslash-design-system/components/sectionIntro';
|
|
37
|
+
import NumberedRow from 'oneslash-design-system/components/numberedRow';
|
|
38
|
+
import Figure from 'oneslash-design-system/components/figure';
|
|
39
|
+
import Image from 'oneslash-design-system/components/image';
|
|
40
|
+
import Paragraph from 'oneslash-design-system/components/paragraph';
|
|
41
|
+
import List from 'oneslash-design-system/components/list';
|
|
42
|
+
import Link from 'oneslash-design-system/components/link';
|
|
43
|
+
import LinkCard from 'oneslash-design-system/components/linkCard';
|
|
44
|
+
import { PageSection, Stack } from 'oneslash-design-system/components/layout';
|
|
45
|
+
|
|
46
|
+
// A stand-in for the hero picture. A real page passes its own.
|
|
47
|
+
const hero =
|
|
48
|
+
"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1280 720'%3E%3Crect width='1280' height='720' fill='%23eef2f6'/%3E%3Crect x='120' y='120' width='460' height='480' rx='24' fill='%23ffffff'/%3E%3Crect x='680' y='120' width='480' height='220' rx='24' fill='%23dfe7ef'/%3E%3Crect x='680' y='380' width='480' height='220' rx='24' fill='%232f6b4f'/%3E%3Crect x='160' y='170' width='240' height='20' rx='10' fill='%23aab8c6'/%3E%3Crect x='160' y='220' width='360' height='16' rx='8' fill='%23c2cfdb'/%3E%3Crect x='160' y='260' width='320' height='16' rx='8' fill='%23c2cfdb'/%3E%3C/svg%3E";
|
|
49
|
+
|
|
50
|
+
export default function LongFormPageArticle() {
|
|
51
|
+
return (
|
|
52
|
+
<PageShell>
|
|
53
|
+
<Stack gap="giant">
|
|
54
|
+
<PageHeader
|
|
55
|
+
level={1}
|
|
56
|
+
title="Why we keep decisions in threads"
|
|
57
|
+
lede="A decision made in a meeting is gone by Friday. We moved ours into the thread where the work happens, and this is what changed."
|
|
58
|
+
facts={[
|
|
59
|
+
{ label: 'Published', value: 'Nov 12, 2026' },
|
|
60
|
+
{ label: 'Reading time', value: '6 minutes' },
|
|
61
|
+
{ label: 'Author', value: 'Dana Lee' },
|
|
62
|
+
]}
|
|
63
|
+
/>
|
|
64
|
+
<Figure crop={16 / 9} caption="The thread for one decision, with the notes that led to it.">
|
|
65
|
+
<Image src={hero} alt="A thread beside a note, with the decision marked in green" width={1280} height={720} />
|
|
66
|
+
</Figure>
|
|
67
|
+
<PageSection>
|
|
68
|
+
<SectionIntro id="long-form-page-problem" name="The problem" statement="People remembered the decision. They did not remember why.">
|
|
69
|
+
<Paragraph>Every month someone asked why a screen worked the way it did. The answer was in a call that nobody wrote down.</Paragraph>
|
|
70
|
+
<Paragraph>So the team spent the first ten minutes of each review arguing about a choice that was already made.</Paragraph>
|
|
71
|
+
</SectionIntro>
|
|
72
|
+
</PageSection>
|
|
73
|
+
<PageSection>
|
|
74
|
+
<SectionIntro id="long-form-page-decisions" name="What we decided" />
|
|
75
|
+
<Stack gap="xlarge">
|
|
76
|
+
<NumberedRow index={0} title="A decision stays with the work it decides.">
|
|
77
|
+
<Paragraph>Anyone who opens the work sees the choice and the messages around it, so nobody has to ask.</Paragraph>
|
|
78
|
+
</NumberedRow>
|
|
79
|
+
<NumberedRow index={1} title="Each decision has one owner.">
|
|
80
|
+
<Paragraph>The owner writes it in a sentence and says what would change it. Ben Carter reviews it the same day.</Paragraph>
|
|
81
|
+
</NumberedRow>
|
|
82
|
+
<NumberedRow index={2} title="A decision can be reopened, with a reason." proof="The thread keeps both versions and the reason for the change.">
|
|
83
|
+
<Paragraph>Nothing is final for good. A new fact is a reason to look again, and the thread keeps both versions.</Paragraph>
|
|
84
|
+
</NumberedRow>
|
|
85
|
+
</Stack>
|
|
86
|
+
</PageSection>
|
|
87
|
+
<PageSection>
|
|
88
|
+
<SectionIntro id="long-form-page-reading" name="Further reading" />
|
|
89
|
+
<List
|
|
90
|
+
size="body1"
|
|
91
|
+
items={[
|
|
92
|
+
<Link key="a" href="#how-channels-work">How channels work</Link>,
|
|
93
|
+
<Link key="b" href="#writing-a-decision">Writing a decision in one sentence</Link>,
|
|
94
|
+
<Link key="c" href="#reopening-a-decision">Reopening a decision</Link>,
|
|
95
|
+
]}
|
|
96
|
+
/>
|
|
97
|
+
</PageSection>
|
|
98
|
+
{/* A reading page ends by pointing to the next page to read. */}
|
|
99
|
+
<LinkCard href="#task-threads" title="Task threads" caption="Next: Task threads" />
|
|
100
|
+
</Stack>
|
|
101
|
+
</PageShell>
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Option: With a list of sections beside it
|
|
107
|
+
|
|
108
|
+
Use when: The page has five sections or more, and people jump between them or come back to one.
|
|
109
|
+
|
|
110
|
+
Uses: `LinkCard`, `List`, `OnThisPage`, `PageHeader`, `PageSection`, `PageShell`, `Paragraph`, `SectionIntro`, `Stack`
|
|
111
|
+
|
|
112
|
+
```tsx
|
|
113
|
+
'use client';
|
|
114
|
+
import PageShell from 'oneslash-design-system/components/pageShell';
|
|
115
|
+
import PageHeader from 'oneslash-design-system/components/pageHeader';
|
|
116
|
+
import SectionIntro from 'oneslash-design-system/components/sectionIntro';
|
|
117
|
+
import OnThisPage from 'oneslash-design-system/components/onThisPage';
|
|
118
|
+
import Paragraph from 'oneslash-design-system/components/paragraph';
|
|
119
|
+
import List from 'oneslash-design-system/components/list';
|
|
120
|
+
import LinkCard from 'oneslash-design-system/components/linkCard';
|
|
121
|
+
import { PageSection, Stack } from 'oneslash-design-system/components/layout';
|
|
122
|
+
|
|
123
|
+
// The same ids and names go to the sections and to the list. A real site builds both from one list.
|
|
124
|
+
const sections = [
|
|
125
|
+
{ id: 'long-form-page-start', name: 'Before you start', text: 'Pick one workspace for the trial. Invite two people who will use it every day, and keep the rest for later.' },
|
|
126
|
+
{ id: 'long-form-page-channels', name: 'Set up channels', text: 'Make a channel for each team or project. Name it for the subject, so a new member can tell where to write.' },
|
|
127
|
+
{ id: 'long-form-page-notes', name: 'Move your notes', text: 'Paste the notes you still use into a note. Leave old ones where they are until someone asks for them.' },
|
|
128
|
+
{ id: 'long-form-page-agent', name: 'Ask the agent', text: 'Ask a question in a channel. The agent answers from that workspace and names the notes it used.' },
|
|
129
|
+
{ id: 'long-form-page-review', name: 'Review after a week', text: 'Look at what the team used and what it left alone. Remove a channel that has had no message.' },
|
|
130
|
+
];
|
|
131
|
+
|
|
132
|
+
const items = sections.map(({ id, name }) => ({ id, label: name }));
|
|
133
|
+
|
|
134
|
+
const filler = 'Write what you decide in the thread, in one sentence. Someone who opens the page next month should not need to ask you what happened.';
|
|
135
|
+
|
|
136
|
+
export default function LongFormPageWithContents() {
|
|
137
|
+
return (
|
|
138
|
+
<PageShell aside={<OnThisPage items={items} />}>
|
|
139
|
+
<Stack gap="giant">
|
|
140
|
+
<PageHeader
|
|
141
|
+
level={1}
|
|
142
|
+
title="A first week with Acme"
|
|
143
|
+
lede="What to set up on day one, and what to leave until you need it."
|
|
144
|
+
facts={[
|
|
145
|
+
{ label: 'Published', value: 'Nov 12, 2026' },
|
|
146
|
+
{ label: 'Reading time', value: '8 minutes' },
|
|
147
|
+
{ label: 'Author', value: 'Dana Lee' },
|
|
148
|
+
]}
|
|
149
|
+
/>
|
|
150
|
+
{sections.map((s) => (
|
|
151
|
+
<PageSection key={s.id}>
|
|
152
|
+
<SectionIntro id={s.id} name={s.name}>
|
|
153
|
+
<Paragraph>{s.text}</Paragraph>
|
|
154
|
+
<Paragraph tone="secondary">{filler}</Paragraph>
|
|
155
|
+
{s.id === 'long-form-page-agent' && (
|
|
156
|
+
<List marker="dot" size="body1" items={['Ask one question at a time.', 'Say which channel or note it is about.', 'Check the sources it names.']} />
|
|
157
|
+
)}
|
|
158
|
+
</SectionIntro>
|
|
159
|
+
</PageSection>
|
|
160
|
+
))}
|
|
161
|
+
<LinkCard href="#task-threads" title="Task threads" caption="Next: Task threads" />
|
|
162
|
+
</Stack>
|
|
163
|
+
</PageShell>
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Native
|
|
169
|
+
|
|
170
|
+
On Apple use a `ScrollView` with a large title, and a `Menu` of sections that scrolls to one. On Android use a `LazyColumn` under a collapsing top app bar.
|