oneslash-design-system 2.20.0 → 2.22.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 +34 -1
- 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/app-shell/top-tabs.jsx +10 -4
- package/dist/cases/app-shell.md +13 -5
- 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/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/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/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/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/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/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/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/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/pricing-section/cards.d.ts +1 -0
- package/dist/cases/pricing-section/cards.jsx +41 -0
- package/dist/cases/pricing-section.md +87 -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/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 +9 -6
- package/dist/cases/settings-page.md +13 -7
- 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/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.json +1177 -31
- package/dist/components/accordion.d.ts +31 -0
- package/dist/components/accordion.jsx +103 -0
- package/dist/components/button.d.ts +2 -0
- package/dist/components/button.jsx +2 -2
- package/dist/components/codeBlock.d.ts +26 -0
- package/dist/components/codeBlock.jsx +101 -0
- package/dist/components/lightbox.d.ts +34 -0
- package/dist/components/lightbox.jsx +206 -0
- package/dist/components/linkCard.d.ts +10 -1
- package/dist/components/linkCard.jsx +32 -6
- package/dist/components/menuItem.jsx +1 -1
- 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/searchDialog.d.ts +44 -0
- package/dist/components/searchDialog.jsx +152 -0
- package/dist/components/siteHeader.d.ts +13 -2
- package/dist/components/siteHeader.jsx +21 -12
- 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/tabsContainer.d.ts +5 -1
- package/dist/components/tabsContainer.jsx +2 -2
- package/dist/components/tag.d.ts +6 -1
- package/dist/components/tag.jsx +10 -5
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -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 +31 -1
- package/dist/stories/Accordion.stories.d.ts +11 -0
- package/dist/stories/Accordion.stories.jsx +93 -0
- package/dist/stories/Button.stories.jsx +12 -8
- package/dist/stories/Cases.generated.stories.d.ts +34 -0
- package/dist/stories/Cases.generated.stories.jsx +68 -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 +11 -0
- package/dist/stories/Lightbox.stories.jsx +83 -0
- package/dist/stories/LinkCard.stories.d.ts +6 -0
- package/dist/stories/LinkCard.stories.jsx +17 -0
- package/dist/stories/MenuItem.stories.d.ts +1 -0
- package/dist/stories/MenuItem.stories.jsx +8 -0
- package/dist/stories/PageHeader.stories.d.ts +2 -0
- package/dist/stories/PageHeader.stories.jsx +13 -0
- package/dist/stories/SearchDialog.stories.d.ts +17 -0
- package/dist/stories/SearchDialog.stories.jsx +111 -0
- package/dist/stories/SiteHeader.stories.d.ts +4 -0
- package/dist/stories/SiteHeader.stories.jsx +89 -0
- package/dist/stories/TabPanel.stories.d.ts +7 -0
- package/dist/stories/TabPanel.stories.jsx +31 -0
- package/package.json +1 -1
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import PageShell from '../../components/pageShell';
|
|
4
|
+
import PageHeader from '../../components/pageHeader';
|
|
5
|
+
import Heading from '../../components/heading';
|
|
6
|
+
import Paragraph from '../../components/paragraph';
|
|
7
|
+
import Tag from '../../components/tag';
|
|
8
|
+
import List from '../../components/list';
|
|
9
|
+
import Pagination from '../../components/pagination';
|
|
10
|
+
import { Cluster, Stack } from '../../components/layout';
|
|
11
|
+
// Made-up entries, newest month first. A real site loads the month named in the address.
|
|
12
|
+
// The prefix keeps ids unique where several examples share a page. A real site uses the slug: '/changelog#pin-a-message'.
|
|
13
|
+
var months = [
|
|
14
|
+
{
|
|
15
|
+
key: '2026-11',
|
|
16
|
+
label: 'November 2026',
|
|
17
|
+
entries: [
|
|
18
|
+
{ id: 'changelog-by-month-pin-a-message', date: 'Nov 12, 2026', kind: 'New', title: 'Pin a message to a channel', changes: ['Pin any message from its menu. Pins show at the top of the channel.'] },
|
|
19
|
+
{ id: 'changelog-by-month-faster-notes', date: 'Nov 5, 2026', kind: 'Improved', title: 'Notes open faster', changes: ['A long note shows its first screen at once.', 'Search results open on the line that matched.'] },
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
key: '2026-10',
|
|
24
|
+
label: 'October 2026',
|
|
25
|
+
entries: [
|
|
26
|
+
{ id: 'changelog-by-month-export-fix', date: 'Oct 29, 2026', kind: 'Fixed', title: 'Export keeps the order of a note', changes: ['A PDF export no longer puts a list after the text that followed it.'] },
|
|
27
|
+
{ id: 'changelog-by-month-agent-sources', date: 'Oct 22, 2026', kind: 'New', title: 'The agent names its sources', changes: ['Every answer lists the notes and messages it used.'] },
|
|
28
|
+
{ id: 'changelog-by-month-invite-fix', date: 'Oct 15, 2026', kind: 'Fixed', title: 'Invitations to a second address', changes: ['An invitation sent to an address with a plus sign now arrives.'] },
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
key: '2026-09',
|
|
33
|
+
label: 'September 2026',
|
|
34
|
+
entries: [
|
|
35
|
+
{ id: 'changelog-by-month-dark-theme', date: 'Sep 17, 2026', kind: 'New', title: 'A dark theme', changes: ['Choose light, dark or the system setting in your profile.'] },
|
|
36
|
+
{ id: 'changelog-by-month-channel-order', date: 'Sep 3, 2026', kind: 'Fixed', title: 'Channels keep their order', changes: ['The sidebar no longer re-sorts a channel you moved.'] },
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
key: '2026-08',
|
|
41
|
+
label: 'August 2026',
|
|
42
|
+
entries: [
|
|
43
|
+
{ id: 'changelog-by-month-billing-page', date: 'Aug 20, 2026', kind: 'New', title: 'A billing page', changes: ['See your plan, your usage and your invoices in one place.'] },
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
var kindColor = { New: 'success', Improved: 'info', Fixed: 'default' };
|
|
48
|
+
export default function ChangelogByMonth() {
|
|
49
|
+
var _a;
|
|
50
|
+
// Page 1 is the newest month. Next goes back in time.
|
|
51
|
+
var _b = useState(1), page = _b[0], setPage = _b[1];
|
|
52
|
+
var month = (_a = months[page - 1]) !== null && _a !== void 0 ? _a : months[0];
|
|
53
|
+
return (<PageShell>
|
|
54
|
+
<Stack gap="giant">
|
|
55
|
+
<PageHeader level={1} title="Changelog" lede={"".concat(month.label, ", newest first.")}/>
|
|
56
|
+
<Stack gap="giant">
|
|
57
|
+
{month.entries.map(function (entry) { return (<Stack key={entry.id} gap="large">
|
|
58
|
+
<Heading level={2} size="h5" id={entry.id}>{entry.title}</Heading>
|
|
59
|
+
<Cluster>
|
|
60
|
+
<Tag variant="contained" size="small" color={kindColor[entry.kind]} label={entry.kind}/>
|
|
61
|
+
<Paragraph tone="secondary" size="body2" measure="none">{entry.date}</Paragraph>
|
|
62
|
+
</Cluster>
|
|
63
|
+
<List marker="dot" size="body1" items={entry.changes}/>
|
|
64
|
+
</Stack>); })}
|
|
65
|
+
</Stack>
|
|
66
|
+
{/* A real site passes an address that works without script, such as '/changelog?month=2026-10'. The example keeps the month in its hash. */}
|
|
67
|
+
<Pagination page={page} pageCount={months.length} onPageChange={setPage} getHref={function (p) { return "#month-".concat(months[p - 1].key); }} aria-label="Months"/>
|
|
68
|
+
</Stack>
|
|
69
|
+
</PageShell>);
|
|
70
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ChangelogOnePage(): import("react").JSX.Element;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import PageShell from '../../components/pageShell';
|
|
3
|
+
import PageHeader from '../../components/pageHeader';
|
|
4
|
+
import OnThisPage from '../../components/onThisPage';
|
|
5
|
+
import Heading from '../../components/heading';
|
|
6
|
+
import Paragraph from '../../components/paragraph';
|
|
7
|
+
import Tag from '../../components/tag';
|
|
8
|
+
import List from '../../components/list';
|
|
9
|
+
import { Cluster, Stack } from '../../components/layout';
|
|
10
|
+
// Made-up entries, newest first. Each has an id, so a link can go straight to it.
|
|
11
|
+
// The prefix keeps ids unique where several examples share a page. A real site uses the slug: '/changelog#pin-a-message'.
|
|
12
|
+
var entries = [
|
|
13
|
+
{
|
|
14
|
+
id: 'changelog-pin-a-message',
|
|
15
|
+
date: 'Nov 12, 2026',
|
|
16
|
+
kind: 'New',
|
|
17
|
+
title: 'Pin a message to a channel',
|
|
18
|
+
changes: ['Pin any message from its menu. Pins show at the top of the channel.', 'A channel holds up to 10 pins. Unpin one to add another.'],
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: 'changelog-faster-notes',
|
|
22
|
+
date: 'Nov 5, 2026',
|
|
23
|
+
kind: 'Improved',
|
|
24
|
+
title: 'Notes open faster',
|
|
25
|
+
changes: ['A long note shows its first screen at once and loads the rest as you scroll.', 'Search results open on the line that matched.'],
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 'changelog-export-fix',
|
|
29
|
+
date: 'Oct 29, 2026',
|
|
30
|
+
kind: 'Fixed',
|
|
31
|
+
title: 'Export keeps the order of a note',
|
|
32
|
+
changes: ['A PDF export no longer puts a list after the text that followed it.', 'An export with a table no longer cuts off the last column.'],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 'changelog-agent-sources',
|
|
36
|
+
date: 'Oct 22, 2026',
|
|
37
|
+
kind: 'New',
|
|
38
|
+
title: 'The agent names its sources',
|
|
39
|
+
changes: ['Every answer lists the notes and messages it used.', 'Open a source from the list to see it in place.'],
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: 'changelog-invite-fix',
|
|
43
|
+
date: 'Oct 15, 2026',
|
|
44
|
+
kind: 'Fixed',
|
|
45
|
+
title: 'Invitations to a second address',
|
|
46
|
+
changes: ['An invitation sent to an address with a plus sign now arrives.'],
|
|
47
|
+
},
|
|
48
|
+
];
|
|
49
|
+
var kindColor = { New: 'success', Improved: 'info', Fixed: 'default' };
|
|
50
|
+
var items = entries.map(function (_a) {
|
|
51
|
+
var id = _a.id, title = _a.title;
|
|
52
|
+
return ({ id: id, label: title });
|
|
53
|
+
});
|
|
54
|
+
export default function ChangelogOnePage() {
|
|
55
|
+
return (<PageShell aside={<OnThisPage items={items} aria-label="Entries"/>}>
|
|
56
|
+
<Stack gap="giant">
|
|
57
|
+
<PageHeader level={1} title="Changelog" lede="What changed in Acme, newest first."/>
|
|
58
|
+
<Stack gap="giant">
|
|
59
|
+
{entries.map(function (entry) { return (<Stack key={entry.id} gap="large">
|
|
60
|
+
<Heading level={2} size="h5" id={entry.id}>{entry.title}</Heading>
|
|
61
|
+
<Cluster>
|
|
62
|
+
<Tag variant="contained" size="small" color={kindColor[entry.kind]} label={entry.kind}/>
|
|
63
|
+
<Paragraph tone="secondary" size="body2" measure="none">{entry.date}</Paragraph>
|
|
64
|
+
</Cluster>
|
|
65
|
+
<List marker="dot" size="body1" items={entry.changes}/>
|
|
66
|
+
</Stack>); })}
|
|
67
|
+
</Stack>
|
|
68
|
+
</Stack>
|
|
69
|
+
</PageShell>);
|
|
70
|
+
}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
A visitor or a customer wants to know what changed in the product lately, and may be sent to one change from a message.
|
|
4
|
+
|
|
5
|
+
## Do
|
|
6
|
+
|
|
7
|
+
- Use `PageHeader` with `level={1}`: the title 'Changelog' is the one level 1 heading, with a `lede` that says the order.
|
|
8
|
+
- Put the newest entry first.
|
|
9
|
+
- Make each entry a level 2 `Heading` with an `id` of its own. A link to `/changelog#pin-a-message` goes straight to it. `PageShell` gives it a scroll margin under a header only when it has an `aside`, as `one-page` does.
|
|
10
|
+
- Put the entry's kind and its date under its heading: a `Tag` ('New' in success, 'Improved' in info, 'Fixed' in the default color) and the date as 'Nov 12, 2026'. Both are plain text a screen reader reads.
|
|
11
|
+
- List what changed in a `List` with `marker="dot"`, one change to a line, in words a customer uses.
|
|
12
|
+
- Put `OnThisPage` in the `aside` of `PageShell` for `one-page`, with the entries' titles, so a long log has a list of entries beside it.
|
|
13
|
+
- Show one month in `by-month`, and use `Pagination` with `getHref`, one page for each month, so the month is in the address (`'/changelog?month=2026-10'`). Name it 'Months', and say the month in the `lede`: 'October 2026, newest first.'
|
|
14
|
+
- Make Next go to the older month in `by-month`, as it does on the blog, so a person reads back in time.
|
|
15
|
+
|
|
16
|
+
## Don't
|
|
17
|
+
|
|
18
|
+
- Do not leave an entry without a date. A person needs to know how old a change is.
|
|
19
|
+
- Do not write an entry as a post. It is a title and a list of changes, and a link to the full post when there is one.
|
|
20
|
+
- Do not use an `Accordion` for the entries. A person looks for a change with find in page.
|
|
21
|
+
- Do not name a kind that is a feeling, such as 'Exciting'. Use New, Improved or Fixed.
|
|
22
|
+
- Do not move the month by script only. The address must change, so a month can be shared and the Back button works.
|
|
23
|
+
- Do not add an infinite scroll. It hides the footer and the older months.
|
|
24
|
+
|
|
25
|
+
## Option: All entries on one page
|
|
26
|
+
|
|
27
|
+
Use when: A few entries a month, so the whole log is a page or two long.
|
|
28
|
+
|
|
29
|
+
Uses: `Cluster`, `Heading`, `List`, `OnThisPage`, `PageHeader`, `PageShell`, `Paragraph`, `Stack`, `Tag`
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
'use client';
|
|
33
|
+
import PageShell from 'oneslash-design-system/components/pageShell';
|
|
34
|
+
import PageHeader from 'oneslash-design-system/components/pageHeader';
|
|
35
|
+
import OnThisPage from 'oneslash-design-system/components/onThisPage';
|
|
36
|
+
import Heading from 'oneslash-design-system/components/heading';
|
|
37
|
+
import Paragraph from 'oneslash-design-system/components/paragraph';
|
|
38
|
+
import Tag from 'oneslash-design-system/components/tag';
|
|
39
|
+
import List from 'oneslash-design-system/components/list';
|
|
40
|
+
import { Cluster, Stack } from 'oneslash-design-system/components/layout';
|
|
41
|
+
|
|
42
|
+
type Kind = 'New' | 'Improved' | 'Fixed';
|
|
43
|
+
|
|
44
|
+
// Made-up entries, newest first. Each has an id, so a link can go straight to it.
|
|
45
|
+
// The prefix keeps ids unique where several examples share a page. A real site uses the slug: '/changelog#pin-a-message'.
|
|
46
|
+
const entries: { id: string; date: string; kind: Kind; title: string; changes: string[] }[] = [
|
|
47
|
+
{
|
|
48
|
+
id: 'changelog-pin-a-message',
|
|
49
|
+
date: 'Nov 12, 2026',
|
|
50
|
+
kind: 'New',
|
|
51
|
+
title: 'Pin a message to a channel',
|
|
52
|
+
changes: ['Pin any message from its menu. Pins show at the top of the channel.', 'A channel holds up to 10 pins. Unpin one to add another.'],
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: 'changelog-faster-notes',
|
|
56
|
+
date: 'Nov 5, 2026',
|
|
57
|
+
kind: 'Improved',
|
|
58
|
+
title: 'Notes open faster',
|
|
59
|
+
changes: ['A long note shows its first screen at once and loads the rest as you scroll.', 'Search results open on the line that matched.'],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
id: 'changelog-export-fix',
|
|
63
|
+
date: 'Oct 29, 2026',
|
|
64
|
+
kind: 'Fixed',
|
|
65
|
+
title: 'Export keeps the order of a note',
|
|
66
|
+
changes: ['A PDF export no longer puts a list after the text that followed it.', 'An export with a table no longer cuts off the last column.'],
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: 'changelog-agent-sources',
|
|
70
|
+
date: 'Oct 22, 2026',
|
|
71
|
+
kind: 'New',
|
|
72
|
+
title: 'The agent names its sources',
|
|
73
|
+
changes: ['Every answer lists the notes and messages it used.', 'Open a source from the list to see it in place.'],
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: 'changelog-invite-fix',
|
|
77
|
+
date: 'Oct 15, 2026',
|
|
78
|
+
kind: 'Fixed',
|
|
79
|
+
title: 'Invitations to a second address',
|
|
80
|
+
changes: ['An invitation sent to an address with a plus sign now arrives.'],
|
|
81
|
+
},
|
|
82
|
+
];
|
|
83
|
+
|
|
84
|
+
const kindColor = { New: 'success', Improved: 'info', Fixed: 'default' } as const;
|
|
85
|
+
|
|
86
|
+
const items = entries.map(({ id, title }) => ({ id, label: title }));
|
|
87
|
+
|
|
88
|
+
export default function ChangelogOnePage() {
|
|
89
|
+
return (
|
|
90
|
+
<PageShell aside={<OnThisPage items={items} aria-label="Entries" />}>
|
|
91
|
+
<Stack gap="giant">
|
|
92
|
+
<PageHeader level={1} title="Changelog" lede="What changed in Acme, newest first." />
|
|
93
|
+
<Stack gap="giant">
|
|
94
|
+
{entries.map((entry) => (
|
|
95
|
+
<Stack key={entry.id} gap="large">
|
|
96
|
+
<Heading level={2} size="h5" id={entry.id}>{entry.title}</Heading>
|
|
97
|
+
<Cluster>
|
|
98
|
+
<Tag variant="contained" size="small" color={kindColor[entry.kind]} label={entry.kind} />
|
|
99
|
+
<Paragraph tone="secondary" size="body2" measure="none">{entry.date}</Paragraph>
|
|
100
|
+
</Cluster>
|
|
101
|
+
<List marker="dot" size="body1" items={entry.changes} />
|
|
102
|
+
</Stack>
|
|
103
|
+
))}
|
|
104
|
+
</Stack>
|
|
105
|
+
</Stack>
|
|
106
|
+
</PageShell>
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Option: One month at a time
|
|
112
|
+
|
|
113
|
+
Use when: Many entries, so a page of the whole log would be long and slow.
|
|
114
|
+
|
|
115
|
+
Uses: `Cluster`, `Heading`, `List`, `PageHeader`, `PageShell`, `Pagination`, `Paragraph`, `Stack`, `Tag`
|
|
116
|
+
|
|
117
|
+
```tsx
|
|
118
|
+
'use client';
|
|
119
|
+
import { useState } from 'react';
|
|
120
|
+
import PageShell from 'oneslash-design-system/components/pageShell';
|
|
121
|
+
import PageHeader from 'oneslash-design-system/components/pageHeader';
|
|
122
|
+
import Heading from 'oneslash-design-system/components/heading';
|
|
123
|
+
import Paragraph from 'oneslash-design-system/components/paragraph';
|
|
124
|
+
import Tag from 'oneslash-design-system/components/tag';
|
|
125
|
+
import List from 'oneslash-design-system/components/list';
|
|
126
|
+
import Pagination from 'oneslash-design-system/components/pagination';
|
|
127
|
+
import { Cluster, Stack } from 'oneslash-design-system/components/layout';
|
|
128
|
+
|
|
129
|
+
type Kind = 'New' | 'Improved' | 'Fixed';
|
|
130
|
+
|
|
131
|
+
// Made-up entries, newest month first. A real site loads the month named in the address.
|
|
132
|
+
// The prefix keeps ids unique where several examples share a page. A real site uses the slug: '/changelog#pin-a-message'.
|
|
133
|
+
const months: { key: string; label: string; entries: { id: string; date: string; kind: Kind; title: string; changes: string[] }[] }[] = [
|
|
134
|
+
{
|
|
135
|
+
key: '2026-11',
|
|
136
|
+
label: 'November 2026',
|
|
137
|
+
entries: [
|
|
138
|
+
{ id: 'changelog-by-month-pin-a-message', date: 'Nov 12, 2026', kind: 'New', title: 'Pin a message to a channel', changes: ['Pin any message from its menu. Pins show at the top of the channel.'] },
|
|
139
|
+
{ id: 'changelog-by-month-faster-notes', date: 'Nov 5, 2026', kind: 'Improved', title: 'Notes open faster', changes: ['A long note shows its first screen at once.', 'Search results open on the line that matched.'] },
|
|
140
|
+
],
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
key: '2026-10',
|
|
144
|
+
label: 'October 2026',
|
|
145
|
+
entries: [
|
|
146
|
+
{ id: 'changelog-by-month-export-fix', date: 'Oct 29, 2026', kind: 'Fixed', title: 'Export keeps the order of a note', changes: ['A PDF export no longer puts a list after the text that followed it.'] },
|
|
147
|
+
{ id: 'changelog-by-month-agent-sources', date: 'Oct 22, 2026', kind: 'New', title: 'The agent names its sources', changes: ['Every answer lists the notes and messages it used.'] },
|
|
148
|
+
{ id: 'changelog-by-month-invite-fix', date: 'Oct 15, 2026', kind: 'Fixed', title: 'Invitations to a second address', changes: ['An invitation sent to an address with a plus sign now arrives.'] },
|
|
149
|
+
],
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
key: '2026-09',
|
|
153
|
+
label: 'September 2026',
|
|
154
|
+
entries: [
|
|
155
|
+
{ id: 'changelog-by-month-dark-theme', date: 'Sep 17, 2026', kind: 'New', title: 'A dark theme', changes: ['Choose light, dark or the system setting in your profile.'] },
|
|
156
|
+
{ id: 'changelog-by-month-channel-order', date: 'Sep 3, 2026', kind: 'Fixed', title: 'Channels keep their order', changes: ['The sidebar no longer re-sorts a channel you moved.'] },
|
|
157
|
+
],
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
key: '2026-08',
|
|
161
|
+
label: 'August 2026',
|
|
162
|
+
entries: [
|
|
163
|
+
{ id: 'changelog-by-month-billing-page', date: 'Aug 20, 2026', kind: 'New', title: 'A billing page', changes: ['See your plan, your usage and your invoices in one place.'] },
|
|
164
|
+
],
|
|
165
|
+
},
|
|
166
|
+
];
|
|
167
|
+
|
|
168
|
+
const kindColor = { New: 'success', Improved: 'info', Fixed: 'default' } as const;
|
|
169
|
+
|
|
170
|
+
export default function ChangelogByMonth() {
|
|
171
|
+
// Page 1 is the newest month. Next goes back in time.
|
|
172
|
+
const [page, setPage] = useState(1);
|
|
173
|
+
const month = months[page - 1] ?? months[0];
|
|
174
|
+
return (
|
|
175
|
+
<PageShell>
|
|
176
|
+
<Stack gap="giant">
|
|
177
|
+
<PageHeader level={1} title="Changelog" lede={`${month.label}, newest first.`} />
|
|
178
|
+
<Stack gap="giant">
|
|
179
|
+
{month.entries.map((entry) => (
|
|
180
|
+
<Stack key={entry.id} gap="large">
|
|
181
|
+
<Heading level={2} size="h5" id={entry.id}>{entry.title}</Heading>
|
|
182
|
+
<Cluster>
|
|
183
|
+
<Tag variant="contained" size="small" color={kindColor[entry.kind]} label={entry.kind} />
|
|
184
|
+
<Paragraph tone="secondary" size="body2" measure="none">{entry.date}</Paragraph>
|
|
185
|
+
</Cluster>
|
|
186
|
+
<List marker="dot" size="body1" items={entry.changes} />
|
|
187
|
+
</Stack>
|
|
188
|
+
))}
|
|
189
|
+
</Stack>
|
|
190
|
+
{/* A real site passes an address that works without script, such as '/changelog?month=2026-10'. The example keeps the month in its hash. */}
|
|
191
|
+
<Pagination page={page} pageCount={months.length} onPageChange={setPage} getHref={(p) => `#month-${months[p - 1].key}`} aria-label="Months" />
|
|
192
|
+
</Stack>
|
|
193
|
+
</PageShell>
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Native
|
|
199
|
+
|
|
200
|
+
On Apple show the log in a `List` with a section for each month. On Android use a `LazyColumn` with sticky month headers.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function CodeSampleBlock(): import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import PageShell from '../../components/pageShell';
|
|
3
|
+
import SectionIntro from '../../components/sectionIntro';
|
|
4
|
+
import Paragraph from '../../components/paragraph';
|
|
5
|
+
import CodeBlock from '../../components/codeBlock';
|
|
6
|
+
import { PageSection } from '../../components/layout';
|
|
7
|
+
// Made-up code for a made-up client. A real page shows code that runs.
|
|
8
|
+
var code = "import { createClient } from '@acme/sdk';\n\nconst acme = createClient({ workspace: 'design' });\n\nconst answer = await acme.agent.ask({\n channel: 'launch-plan',\n question: 'What is left before the launch?',\n});\n\nconsole.log(answer.text, answer.sources);";
|
|
9
|
+
export default function CodeSampleBlock() {
|
|
10
|
+
return (<PageShell>
|
|
11
|
+
<PageSection gap="xlarge">
|
|
12
|
+
<SectionIntro id="code-sample-block-intro" name="Ask the agent" statement="Make a client, then ask a question in a channel.">
|
|
13
|
+
<Paragraph tone="secondary">The answer comes back with the notes and messages it used.</Paragraph>
|
|
14
|
+
</SectionIntro>
|
|
15
|
+
{/* The label names the block, its scroll region and its Copy Button. A long line scrolls inside the block, never the page. */}
|
|
16
|
+
<CodeBlock id="code-sample-block" label="ask.ts" language="TypeScript" code={code}/>
|
|
17
|
+
</PageSection>
|
|
18
|
+
</PageShell>);
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function CodeSampleCommand(): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import PageShell from '../../components/pageShell';
|
|
3
|
+
import SectionIntro from '../../components/sectionIntro';
|
|
4
|
+
import Paragraph from '../../components/paragraph';
|
|
5
|
+
import CopyField from '../../components/copyField';
|
|
6
|
+
import { PageSection } from '../../components/layout';
|
|
7
|
+
export default function CodeSampleCommand() {
|
|
8
|
+
return (<PageShell>
|
|
9
|
+
<PageSection gap="xlarge">
|
|
10
|
+
<SectionIntro id="code-sample-command-intro" name="Install" statement="Add the client to your project.">
|
|
11
|
+
<Paragraph tone="secondary">Run this in the folder of your project.</Paragraph>
|
|
12
|
+
</SectionIntro>
|
|
13
|
+
{/* One line to paste. The field shows it whole, the Button copies it, and 'Copied' shows only once the clipboard took it. */}
|
|
14
|
+
<CopyField id="code-sample-command" label="Install command" value="npm install @acme/sdk" mono/>
|
|
15
|
+
</PageSection>
|
|
16
|
+
</PageShell>);
|
|
17
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Code sample
|
|
2
|
+
|
|
3
|
+
A page shows code that a person reads, or copies to run.
|
|
4
|
+
|
|
5
|
+
## Do
|
|
6
|
+
|
|
7
|
+
- Use `CodeBlock` for `block`, with a `label` that names what the code is, such as 'ask.ts' or 'Set up the client'. The label names the block, its scroll region and its Copy Button.
|
|
8
|
+
- Pass `language` as words for the reader ('TypeScript'). It does not color the code.
|
|
9
|
+
- Write the `code` as it will be copied, with its line breaks. Keep a block to about twenty lines; split a longer one under headings.
|
|
10
|
+
- Let a long line scroll inside the block. The block is a region that a keyboard can focus and scroll with the arrow keys; the page never scrolls sideways.
|
|
11
|
+
- Use `wrap` only for a short block of prose, such as a prompt, where every word should stay in view. Code keeps its lines and scrolls.
|
|
12
|
+
- Use `CopyField` for `command`, with `mono` and the `label` 'Install command'. A person sees the whole line and copies it with one Button.
|
|
13
|
+
- Say 'Copied' only after the clipboard took the text. `CodeBlock` and `CopyField` do this, and show a line to copy by hand when the browser refuses.
|
|
14
|
+
- Make each step of a task a `NumberedRow` with its title when the steps have code, and put its `CodeBlock` or `CopyField` under it. The order is clear and every command copies on its own.
|
|
15
|
+
|
|
16
|
+
## Don't
|
|
17
|
+
|
|
18
|
+
- Do not put code in a `Paragraph` or a bare `pre`. It has no name, no Copy Button and no scroll region.
|
|
19
|
+
- Do not put a prompt `$` before a command people copy. It is pasted too.
|
|
20
|
+
- Do not use `CodeBlock` for one line. Use `CopyField`.
|
|
21
|
+
- Do not set the label to a sentence. Name the thing, as a file name or a task does.
|
|
22
|
+
- Do not show a screenshot of code. It cannot be copied, searched or read aloud.
|
|
23
|
+
|
|
24
|
+
## Option: A block of code
|
|
25
|
+
|
|
26
|
+
Use when: Several lines that a person reads or copies.
|
|
27
|
+
|
|
28
|
+
Uses: `CodeBlock`, `PageSection`, `PageShell`, `Paragraph`, `SectionIntro`
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
'use client';
|
|
32
|
+
import PageShell from 'oneslash-design-system/components/pageShell';
|
|
33
|
+
import SectionIntro from 'oneslash-design-system/components/sectionIntro';
|
|
34
|
+
import Paragraph from 'oneslash-design-system/components/paragraph';
|
|
35
|
+
import CodeBlock from 'oneslash-design-system/components/codeBlock';
|
|
36
|
+
import { PageSection } from 'oneslash-design-system/components/layout';
|
|
37
|
+
|
|
38
|
+
// Made-up code for a made-up client. A real page shows code that runs.
|
|
39
|
+
const code = `import { createClient } from '@acme/sdk';
|
|
40
|
+
|
|
41
|
+
const acme = createClient({ workspace: 'design' });
|
|
42
|
+
|
|
43
|
+
const answer = await acme.agent.ask({
|
|
44
|
+
channel: 'launch-plan',
|
|
45
|
+
question: 'What is left before the launch?',
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
console.log(answer.text, answer.sources);`;
|
|
49
|
+
|
|
50
|
+
export default function CodeSampleBlock() {
|
|
51
|
+
return (
|
|
52
|
+
<PageShell>
|
|
53
|
+
<PageSection gap="xlarge">
|
|
54
|
+
<SectionIntro id="code-sample-block-intro" name="Ask the agent" statement="Make a client, then ask a question in a channel.">
|
|
55
|
+
<Paragraph tone="secondary">The answer comes back with the notes and messages it used.</Paragraph>
|
|
56
|
+
</SectionIntro>
|
|
57
|
+
{/* The label names the block, its scroll region and its Copy Button. A long line scrolls inside the block, never the page. */}
|
|
58
|
+
<CodeBlock id="code-sample-block" label="ask.ts" language="TypeScript" code={code} />
|
|
59
|
+
</PageSection>
|
|
60
|
+
</PageShell>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Option: A command to paste
|
|
66
|
+
|
|
67
|
+
Use when: One line to paste in a terminal.
|
|
68
|
+
|
|
69
|
+
Uses: `CopyField`, `PageSection`, `PageShell`, `Paragraph`, `SectionIntro`
|
|
70
|
+
|
|
71
|
+
```tsx
|
|
72
|
+
'use client';
|
|
73
|
+
import PageShell from 'oneslash-design-system/components/pageShell';
|
|
74
|
+
import SectionIntro from 'oneslash-design-system/components/sectionIntro';
|
|
75
|
+
import Paragraph from 'oneslash-design-system/components/paragraph';
|
|
76
|
+
import CopyField from 'oneslash-design-system/components/copyField';
|
|
77
|
+
import { PageSection } from 'oneslash-design-system/components/layout';
|
|
78
|
+
|
|
79
|
+
export default function CodeSampleCommand() {
|
|
80
|
+
return (
|
|
81
|
+
<PageShell>
|
|
82
|
+
<PageSection gap="xlarge">
|
|
83
|
+
<SectionIntro id="code-sample-command-intro" name="Install" statement="Add the client to your project.">
|
|
84
|
+
<Paragraph tone="secondary">Run this in the folder of your project.</Paragraph>
|
|
85
|
+
</SectionIntro>
|
|
86
|
+
{/* One line to paste. The field shows it whole, the Button copies it, and 'Copied' shows only once the clipboard took it. */}
|
|
87
|
+
<CopyField id="code-sample-command" label="Install command" value="npm install @acme/sdk" mono />
|
|
88
|
+
</PageSection>
|
|
89
|
+
</PageShell>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Native
|
|
95
|
+
|
|
96
|
+
On Apple show code in a `Text` with a monospaced font in a horizontal `ScrollView`, and a `Button` that sets the pasteboard. On Android use a text block with a monospace font that scrolls sideways, and a button that copies.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ContactPageForm(): import("react").JSX.Element;
|
|
@@ -0,0 +1,83 @@
|
|
|
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 PageShell from '../../components/pageShell';
|
|
15
|
+
import PageHeader from '../../components/pageHeader';
|
|
16
|
+
import Form from '../../components/form';
|
|
17
|
+
import TextField from '../../components/textField';
|
|
18
|
+
import Textarea from '../../components/textarea';
|
|
19
|
+
import Alert from '../../components/alert';
|
|
20
|
+
import Button from '../../components/button';
|
|
21
|
+
import { Stack } from '../../components/layout';
|
|
22
|
+
// A small check: some text, an @, then some text.
|
|
23
|
+
function looksLikeEmail(value) {
|
|
24
|
+
return /^[^@\s]+@[^@\s]+$/.test(value);
|
|
25
|
+
}
|
|
26
|
+
export default function ContactPageForm() {
|
|
27
|
+
var _a = useState(''), name = _a[0], setName = _a[1];
|
|
28
|
+
var _b = useState(''), email = _b[0], setEmail = _b[1];
|
|
29
|
+
var _c = useState(''), message = _c[0], setMessage = _c[1];
|
|
30
|
+
var _d = useState({ name: '', email: '', message: '' }), errors = _d[0], setErrors = _d[1];
|
|
31
|
+
var _e = useState(false), sent = _e[0], setSent = _e[1];
|
|
32
|
+
var _f = useState(false), sending = _f[0], setSending = _f[1];
|
|
33
|
+
var timer = useRef();
|
|
34
|
+
// Stops the request if the example goes away before it ends.
|
|
35
|
+
useEffect(function () { return function () { return clearTimeout(timer.current); }; }, []);
|
|
36
|
+
// Any edit clears the confirmation and the problem with that field.
|
|
37
|
+
function edit(field, set, value) {
|
|
38
|
+
set(value);
|
|
39
|
+
setSent(false);
|
|
40
|
+
setErrors(function (current) {
|
|
41
|
+
var _a;
|
|
42
|
+
return (__assign(__assign({}, current), (_a = {}, _a[field] = '', _a)));
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function handleSubmit() {
|
|
46
|
+
if (sending)
|
|
47
|
+
return;
|
|
48
|
+
setSent(false);
|
|
49
|
+
var next = {
|
|
50
|
+
name: name.trim() ? '' : 'Enter your name.',
|
|
51
|
+
email: !email.trim() ? 'Enter your email.' : looksLikeEmail(email.trim()) ? '' : 'Enter an email address, like name@example.com.',
|
|
52
|
+
message: message.trim() ? '' : 'Write a message.',
|
|
53
|
+
};
|
|
54
|
+
setErrors(next);
|
|
55
|
+
if (next.name || next.email || next.message)
|
|
56
|
+
return;
|
|
57
|
+
setSending(true);
|
|
58
|
+
// A real page also has a hidden spam-trap input named `website`, in its own code. ODS has no hidden field, so the example leaves it out.
|
|
59
|
+
// Stands in for the request to the server.
|
|
60
|
+
timer.current = setTimeout(function () {
|
|
61
|
+
setSending(false);
|
|
62
|
+
setSent(true);
|
|
63
|
+
setName('');
|
|
64
|
+
setEmail('');
|
|
65
|
+
setMessage('');
|
|
66
|
+
}, 1200);
|
|
67
|
+
}
|
|
68
|
+
return (<PageShell>
|
|
69
|
+
<Stack gap="xxlarge">
|
|
70
|
+
<PageHeader level={1} title="Contact" lede="I read every message and reply within two days."/>
|
|
71
|
+
<Form aria-label="Contact" onSubmit={handleSubmit}>
|
|
72
|
+
{/* The confirmation stays until the next edit, so it has no close button and does not close on its own. */}
|
|
73
|
+
{sent && <Alert type="success" variant="inline" message="Message sent. I reply within two days." autoDismiss={false}/>}
|
|
74
|
+
<TextField id="contact-page-name" label="Name" autoComplete="name" value={name} disabled={sending} error={Boolean(errors.name)} errorText={errors.name} onChange={function (e) { return edit('name', setName, e.target.value); }}/>
|
|
75
|
+
<TextField id="contact-page-email" label="Email" type="email" autoComplete="email" value={email} disabled={sending} error={Boolean(errors.email)} errorText={errors.email} onChange={function (e) { return edit('email', setEmail, e.target.value); }}/>
|
|
76
|
+
<Textarea id="contact-page-message" label="Message" maxRows={8} value={message} disabled={sending} error={Boolean(errors.message)} errorText={errors.message} onChange={function (e) { return edit('message', setMessage, e.target.value); }}/>
|
|
77
|
+
<Stack align="start">
|
|
78
|
+
<Button size="large" type="primary" state="enabled" label="Send" htmlType="submit" loading={sending}/>
|
|
79
|
+
</Stack>
|
|
80
|
+
</Form>
|
|
81
|
+
</Stack>
|
|
82
|
+
</PageShell>);
|
|
83
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ContactPageLinks(): import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import PageShell from '../../components/pageShell';
|
|
3
|
+
import PageHeader from '../../components/pageHeader';
|
|
4
|
+
import Link from '../../components/link';
|
|
5
|
+
import CopyField from '../../components/copyField';
|
|
6
|
+
import { Stack } from '../../components/layout';
|
|
7
|
+
export default function ContactPageLinks() {
|
|
8
|
+
return (<PageShell>
|
|
9
|
+
<Stack gap="xxlarge">
|
|
10
|
+
<PageHeader level={1} title="Contact" lede="Write to me at this address. I reply within two days."/>
|
|
11
|
+
<Stack gap="large">
|
|
12
|
+
{/* A mailto link opens the visitor's own mail app. */}
|
|
13
|
+
<Link href="mailto:hello@acme.example">hello@acme.example</Link>
|
|
14
|
+
{/* For a visitor with no mail app: copy the address. */}
|
|
15
|
+
<CopyField id="contact-page-address" label="Email address" value="hello@acme.example"/>
|
|
16
|
+
</Stack>
|
|
17
|
+
</Stack>
|
|
18
|
+
</PageShell>);
|
|
19
|
+
}
|