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
package/README.md
CHANGED
|
@@ -70,7 +70,7 @@ import SectionIntro from 'oneslash-design-system/components/sectionIntro';
|
|
|
70
70
|
|
|
71
71
|
## Design cases
|
|
72
72
|
|
|
73
|
-
A case is one design situation with oneSlash's answer to it. A rule case has one answer, such as "an agent asks before a risky action". A design case has one to four options, each with a line on when to use it and a working example built only from this package. 2.
|
|
73
|
+
A case is one design situation with oneSlash's answer to it. A rule case has one answer, such as "an agent asks before a risky action". A design case has one to four options, each with a line on when to use it and a working example built only from this package. 2.21.0 has 119: fourteen rules and 105 design cases for auth pages, confirms and modals, states, chat and agent interfaces, settings and menus, shells and navigation, dashboards and billing, marketing and content pages.
|
|
74
74
|
|
|
75
75
|
- `oneslash-design-system/cases.json` lists every case with its rule text, options, Do and Don't lines, and the source of each example.
|
|
76
76
|
- `oneslash-design-system/cases/<id>.md` is one case as text, and `oneslash-design-system/cases/<id>/<option>.jsx` is the example itself.
|
package/dist/DESIGN.md
CHANGED
|
@@ -291,11 +291,13 @@ For each web component, the table gives the native control to use. System contro
|
|
|
291
291
|
|
|
292
292
|
| ODS | SwiftUI | Compose | Note |
|
|
293
293
|
| --- | --- | --- | --- |
|
|
294
|
+
| accordion | `DisclosureGroup` per item, with the title as its label | A `Column` of rows with `AnimatedVisibility` for the panel and `semantics { stateDescription }` on the row | One-open is app state (a selection the groups bind to). Deep links and the heading level are web only. |
|
|
294
295
|
| alert | `ODSBanner` for an inline message; `.alert` for one that needs a decision | `OdsBanner` for an inline message; `AlertDialog` for one that needs a decision | ODS has no native toast: on Android use `Snackbar` in a `SnackbarHost`. |
|
|
295
296
|
| appShell | `NavigationSplitView` with the sidebar, the content and an `.inspector`; on iPhone a `NavigationStack`, or a `TabView` of five places or fewer | `NavigationSuiteScaffold`; on a phone a `ModalNavigationDrawer` around a `Scaffold` | The split view collapses to a stack on iPhone and shows and hides the sidebar itself. The skip link is web only. |
|
|
296
297
|
| button | `Button` with `.odsProminentButton()` for accent (`.odsProminentButton(.glass)` for the glass style), `.bordered` for primary | `Button`, `OutlinedButton` | Tertiary and text-only: `.borderless` / `TextButton`. On Apple, apply `.odsProminentButton()` to every prominent button. Under `odsTheme` the label of a `.borderedProminent` or `.glassProminent` button takes `text.primary`, not the system white, which is below 4.5:1 on the accent in default dark, forest light, forest dark, clay dark, indigo light, indigo dark, wine light, wine dark. In forest light it is the same color as the fill, so the label cannot be seen. The modifier keeps the system style and sets the label to `accent.contrast`. Compose needs nothing: `onPrimary` is `accent.contrast`. |
|
|
297
298
|
| brandIcon | the provider's own button where one exists (`SignInWithAppleButton`), else an asset in the app | an asset in the app | |
|
|
298
299
|
| checkBox | `Toggle` (switch on iOS, `.toggleStyle(.checkbox)` on macOS) | `Checkbox` | |
|
|
300
|
+
| codeBlock | `ScrollView(.horizontal)` with `Text(code).monospaced().textSelection(.enabled)` and a Copy `Button` | `SelectionContainer` around a `Text` in the code family with `horizontalScroll`, and a Copy `TextButton` | Show "Copied" for 2 seconds only after the write succeeds. No highlighting and no line numbers. One line to paste is a `copyField`. |
|
|
299
301
|
| composer | `TextField(_:text:axis: .vertical)` with `.lineLimit(1...6)` over a toolbar `HStack` of the tool `Button`s and a send `Button` | `OutlinedTextField` with `maxLines = 6` over a `Row` of the tool `IconButton`s and a send `IconButton` | On iPhone and Android, Return adds a line and the send button sends. While an agent works, send becomes Stop. |
|
|
300
302
|
| copyField | A `LabeledContent` row with the value in a `Text` (`.textSelection(.enabled)`) and a `Button` that sets `UIPasteboard` / `NSPasteboard` | An `OutlinedTextField` with `readOnly = true` and a `trailingIcon` `TextButton` that calls `LocalClipboard` | Show "Copied" for 2 seconds only after the write succeeds. Announce it for VoiceOver / TalkBack. A secret shown once gets the line under it. |
|
|
301
303
|
| drawer | `.sheet` with `.presentationDetents` on iPhone; `.inspector` on iPad and Mac | `ModalNavigationDrawer` for `side="start"`; `ModalBottomSheet` for `side="end"` | The system sheet, inspector and drawer handle the scrim, swipe to close and focus. `ModalBottomSheet` needs `@OptIn(ExperimentalMaterial3Api::class)`. |
|
|
@@ -310,6 +312,7 @@ For each web component, the table gives the native control to use. System contro
|
|
|
310
312
|
| iconButton | `Button` with a `Label` and `.labelStyle(.iconOnly)` | `IconButton` | |
|
|
311
313
|
| image | `Image` / `AsyncImage` | `Image` with the app's image loader | |
|
|
312
314
|
| layout | Not applicable: web page pattern | Not applicable: web page pattern | In an app screen: `VStack` / `HStack` / `Grid`; Compose `Column` / `Row` / `LazyVerticalGrid`. `Center` and `Split` are for web pages; a native screen is already one column. |
|
|
315
|
+
| lightbox | `.fullScreenCover` holding a `TabView` with `.tabViewStyle(.page)`, one page per image | A full-width `Dialog` (`usePlatformDefaultWidth = false`) holding a `HorizontalPager` | Images only. The system pager gives the swipe; keep a Close button and say "2 of 5" in the title. |
|
|
313
316
|
| line | `Divider` | `HorizontalDivider`, `VerticalDivider` | |
|
|
314
317
|
| link | `Link` | `Text` with a `LinkAnnotation.Url` in its `AnnotatedString` | |
|
|
315
318
|
| linkCard | Not applicable: web page pattern | Not applicable: web page pattern | In an app screen: a `NavigationLink` row in a `List` / a clickable `ListItem`. |
|
|
@@ -318,15 +321,18 @@ For each web component, the table gives the native control to use. System contro
|
|
|
318
321
|
| menu | `Menu` or `.contextMenu` | `DropdownMenu` | |
|
|
319
322
|
| menuItem | `Button` inside a `Menu` | `DropdownMenuItem` | In a sidebar: a `List` row / `NavigationDrawerItem`. |
|
|
320
323
|
| message | An `HStack` with `ODSAvatar` and a `VStack` of the header and the body | A `Row` with `OdsAvatar` and a `Column` of the header and the body | SwiftUI and Compose have no message row. Mark an agent with `ODSTag` / `OdsTag` after its name. |
|
|
321
|
-
| modal | `.sheet` or `.alert` | `ModalBottomSheet` or `AlertDialog` | `ModalBottomSheet` needs `@OptIn(ExperimentalMaterial3Api::class)`. |
|
|
324
|
+
| modal | `.sheet` or `.alert` | `ModalBottomSheet` or `AlertDialog` | `ModalBottomSheet` needs `@OptIn(ExperimentalMaterial3Api::class)`. `size="fill"` is the full-screen cover: `.fullScreenCover` / a full-width `Dialog` (`usePlatformDefaultWidth = false`). |
|
|
322
325
|
| navigation | `NavigationSplitView` with a sidebar `List` | `NavigationRail` or `ModalNavigationDrawer` with `NavigationDrawerItem` | |
|
|
323
326
|
| numberedRow | Not applicable: web page pattern | Not applicable: web page pattern | In an app screen: rows of a `List` / `ListItem`s. |
|
|
324
327
|
| onThisPage | Not applicable: web page pattern | Not applicable: web page pattern | A site is web only. A long screen is a `List` in sections. |
|
|
325
328
|
| pageHeader | Not applicable: web page pattern | Not applicable: web page pattern | In an app screen: `.navigationTitle` / `TopAppBar`. |
|
|
326
329
|
| pageShell | Not applicable: web page pattern | Not applicable: web page pattern | In an app screen: `NavigationStack` / `Scaffold`. |
|
|
327
330
|
| paragraph | `Text` with `.font(.body)` | `Text` with `MaterialTheme.typography.bodyLarge` | |
|
|
331
|
+
| pagination | Not applicable: web page pattern | Not applicable: web page pattern | A list loads more as it scrolls: a `List` with `.onAppear` on the last row on Apple, Paging with a `LazyColumn` on Android. No page buttons in an app. |
|
|
328
332
|
| popover | `.popover` | `DropdownMenu` | Larger anchored content on Android: `ModalBottomSheet`. |
|
|
333
|
+
| progress | `Gauge(value:in:)` with `.gaugeStyle(.accessoryLinearCapacity)`, or `ProgressView(value:)` with a `currentValueLabel` | `LinearProgressIndicator(progress = { … })` with `semantics { progressBarRangeInfo; stateDescription }` | A meter of use against a limit, not a task progress bar. Say "Almost at the limit" and "Limit reached" in words, not by color alone. With no limit show the text only. Numbers: `.number.notation(.compactName)` / `.currency(code:)` / `ByteCountFormatStyle(style: .memory)` on Apple; `CompactDecimalFormat` / `NumberFormat.getCurrencyInstance` / `Formatter.formatShortFileSize` on Android. |
|
|
329
334
|
| radioGroup | `Picker` (`.inline` on iOS, `.radioGroup` on macOS) | `RadioButton`s in a `Column` with `Modifier.selectableGroup()` | `variant="card"`: each option is a bordered card with the radio in it, a `Picker` with custom rows on iOS / selectable `Card`s with a `RadioButton` in a `selectableGroup` on Android. |
|
|
335
|
+
| searchDialog | `.searchable` on the screen that lists the results, with `.searchSuggestions` for recent items | `SearchBar` with its results in the expanded content | The system places the field and moves focus. Say the count, "Searching" and a failure as text, not color alone. |
|
|
330
336
|
| sectionIntro | Not applicable: web page pattern | Not applicable: web page pattern | In an app screen: a `Section` header in a `List` or `Form` / a heading `Text`. |
|
|
331
337
|
| segmentedControl | `Picker` with `.pickerStyle(.segmented)` | `SingleChoiceSegmentedButtonRow` with `SegmentedButton` | It sets a value on the same screen. To switch panels use `TabView` / `PrimaryTabRow`. Give the picker an accessibility label. |
|
|
332
338
|
| select | `Picker` or `Menu` | `ExposedDropdownMenuBox` | |
|
|
@@ -334,15 +340,18 @@ For each web component, the table gives the native control to use. System contro
|
|
|
334
340
|
| sidePane | `.inspector(isPresented:)` with `.inspectorColumnWidth(min:ideal:max:)` | `SupportingPaneScaffold` | The system resizes the inspector on iPad and Mac and shows it as a sheet on iPhone. `SupportingPaneScaffold` is in the Material 3 adaptive library and needs `@OptIn(ExperimentalMaterial3AdaptiveApi::class)`. |
|
|
335
341
|
| siteFooter | Not applicable: web page pattern | Not applicable: web page pattern | A site is web only. An app has no footer: its links live in Settings, as rows. |
|
|
336
342
|
| siteHeader | Not applicable: web page pattern | Not applicable: web page pattern | A site is web only. In an app: `NavigationStack` with a toolbar, and a `TabView` or `NavigationSuiteScaffold` for the places. |
|
|
343
|
+
| skeleton | `.redacted(reason: .placeholder)` on the real view | A `Box` shape filled with `surfaceVariant` | Compose has no stock part. No shimmer: keep it still, or a slow pulse that stops with reduced motion. Hide it from TalkBack and announce the loading once for the region. |
|
|
337
344
|
| sourceCard | `Link` or `Button` with a `Label` (icon, title) and the meta as a secondary line | A `Card` with `onClick`, or a `ListItem` with a leading `Icon` | With no destination it is a plain `Label`, not a button. |
|
|
338
345
|
| stepList | A `List` of `Label`s with an SF Symbol per status (`circle`, `checkmark.circle.fill`, `xmark.circle.fill`, `minus.circle`); `ProgressView` for the running one | A `Column` of `ListItem`s with an `Icon` per status; `CircularProgressIndicator` for the running one | Give each row a status text for VoiceOver / TalkBack, not color alone. |
|
|
339
346
|
| surface | Not applicable: web page pattern | Not applicable: web page pattern | In an app screen: a `Form` section or `GroupBox` / `Card`. |
|
|
340
347
|
| switch | `Toggle` in a `Form` row (`.toggleStyle(.switch)`); the description is the row's secondary line | `Switch` in a `ListItem` with `trailingContent` | While a change saves, disable the control or show a `ProgressView` / `CircularProgressIndicator` beside it and put the value back if it fails. |
|
|
348
|
+
| statTile | A `VStack` of `Text`s with `.accessibilityElement(children: .combine)` | A `Column` with `Modifier.semantics(mergeDescendants = true)` | Not colored by good or bad. Numbers: `.number.notation(.compactName)` / `.currency(code:)` on Apple; `CompactDecimalFormat` / `NumberFormat.getCurrencyInstance` on Android. Loading: `.redacted(reason: .placeholder)`. |
|
|
341
349
|
| tab | `TabView` or segmented `Picker` | `PrimaryTabRow` | One `Tab` inside `TabView` or one segment / one `Tab`. `TabRow` is deprecated in Material 3. |
|
|
350
|
+
| tabPanel | The content view of a `TabView` page, or the view under a segmented `Picker` | The content under a `PrimaryTabRow`, shown for the selected index | The system tab views already pair a tab with its content and name it for VoiceOver / TalkBack. On the web it adds `role="tabpanel"`. |
|
|
342
351
|
| tableCell | A `TableColumn` content view | `Text` in a `Row` with `Modifier.weight` | Material 3 has no table. |
|
|
343
|
-
| tableContainer | `Table` | `LazyColumn` of `Row`s | Material 3 has no table. A compact-width iPhone `Table` shows only its first column. |
|
|
352
|
+
| tableContainer | `Table` | `LazyColumn` of `Row`s | Material 3 has no table. A compact-width iPhone `Table` shows only its first column. `aria-label` names it: `.accessibilityLabel`. `minWidth` makes it scroll sideways inside its region: a horizontal `ScrollView` / `Modifier.horizontalScroll`. A sorted column uses `TableColumn(…, sortUsing:)` / `semantics { stateDescription }`. |
|
|
344
353
|
| tableHeader | The `Table` column headers (`TableColumn` titles) | A header `Row` as the first `LazyColumn` item | Material 3 has no table. |
|
|
345
|
-
| tableHeaderCell | A `TableColumn` title | `Text` in the header `Row` | Material 3 has no table. |
|
|
354
|
+
| tableHeaderCell | A `TableColumn` title | `Text` in the header `Row` | Material 3 has no table. `sort`: `TableColumn(…, sortUsing:)` with a `KeyPathComparator`; on Android a clickable header `Text` with `semantics { stateDescription = "Sorted ascending" }`. |
|
|
346
355
|
| tableRow | `TableRow` | `Row` | Material 3 has no table. |
|
|
347
356
|
| tabsContainer | `TabView` or segmented `Picker` | `PrimaryTabRow` | `TabRow` is deprecated in Material 3. |
|
|
348
357
|
| tag | `ODSTag` | `OdsTag` | A count on a list row or tab stays `.badge` / `Badge`. A tag that acts: wrap `ODSTag` in a `Button` with the plain style; on Android use a Material `AssistChip` or `FilterChip`, which are made to be pressed. |
|
|
@@ -467,6 +476,22 @@ Answer: A problem with one field shows under that field, through the field's `er
|
|
|
467
476
|
|
|
468
477
|
File: cases/form-errors.md
|
|
469
478
|
|
|
479
|
+
### A number shows its unit and never shows 0 for unknown
|
|
480
|
+
|
|
481
|
+
A page shows counts, money, sizes, shares or changes.
|
|
482
|
+
|
|
483
|
+
Answer: Use the helpers in `formatNumber` (`formatCount`, `formatMoney`, `formatPercent`, `formatBytes`, `formatDuration`), `StatTile` and `Progress`. A count is whole and grouped: '1,240'. In a tile, a count or an amount from 10,000 up shows its short form: '12.4K', '$12.4K'. A table shows the exact number, right-aligned. Money has its symbol and two decimals: '$1,240.00'. A cost under a cent reads '< $0.01'. A share is a whole percent, and a small one reads '< 1%'. A size is base 1024: '52 MB', '1.2 GB'. A time reads '340 ms', '1.2 s', '2 h 24 min'. The unit is in the label or after the number in words: 'Responses', '7 of 8 seats', '340 responses, no limit'. A bare number is never shown, and a unit is never only in a tooltip. A change says its direction, its size and what it compares with: 'Up 12% from last week'. It reads 'New this week' when there was nothing before. It has no color, because more is not good or bad by itself. Unknown is never 0. `formatNumber` shows '–' for a value it cannot read. `StatTile` shows 'No data yet'. While a number loads, a `Skeleton` holds its place. On a failure, show the case 'Load failure'. A limit is a `Progress`, which says 'Limit reached' in words.
|
|
484
|
+
|
|
485
|
+
File: cases/number-format.md
|
|
486
|
+
|
|
487
|
+
### A marketing page asks for one main action, in the same words everywhere
|
|
488
|
+
|
|
489
|
+
A marketing page asks the visitor to do something: sign up, open the app, buy a plan.
|
|
490
|
+
|
|
491
|
+
Answer: A page has one main action. It is a primary `Button` with the same label in the header, the hero, the pricing section and the end of the page: 'Sign Up', or 'Sign Up for Pro' on a plan. A second action is a secondary `Button`, or a `Link` that teaches, such as 'See How It Works'. It is never a second primary. Write the label as the move, in Title Case, with short prepositions lowercase. Do not write 'Get Started Free' in one place and 'Try It' in another. The main action and the second action open in the same tab, unless one goes to a store or starts a download. A link to another site, in a list or a footer, uses `external`, as the case 'Site footer' says.
|
|
492
|
+
|
|
493
|
+
File: cases/one-main-action.md
|
|
494
|
+
|
|
470
495
|
### On a phone, a sidebar opens as a drawer and a list opens its detail
|
|
471
496
|
|
|
472
497
|
A layout with a sidebar, a list beside its detail, or a side pane meets a phone screen.
|
|
@@ -493,8 +518,10 @@ File: cases/success-feedback.md
|
|
|
493
518
|
|
|
494
519
|
| Case | When | File |
|
|
495
520
|
| --- | --- | --- |
|
|
521
|
+
| About page | A visitor wants to know who is behind the work and whether to get in touch. | cases/about-page.md |
|
|
496
522
|
| Invite link page | A person opens an invite link to join a workspace. | cases/accept-invite.md |
|
|
497
523
|
| Account menu | A person opens a menu for their own account to change settings, get help or log out. | cases/account-menu.md |
|
|
524
|
+
| Admin inbox | The owner of a site reads the messages that visitors sent through its contact form. | cases/admin-inbox.md |
|
|
498
525
|
| Agent options | The agent sees two to four ways forward and needs the person to pick one. These are ways forward for the agent's own work. For a fact or a decision only the person has, see the case 'Agent question'. | cases/agent-options.md |
|
|
499
526
|
| Agent at work | The agent is working on a request in the thread, and its reply is not ready yet. | cases/agent-pending-reply.md |
|
|
500
527
|
| Plan proposal | The agent is about to change shared work and needs the person to approve it first. | cases/agent-plan-proposal.md |
|
|
@@ -504,29 +531,45 @@ File: cases/success-feedback.md
|
|
|
504
531
|
| App shell | A person opens the product and moves between its places, such as Inbox, Tasks and Settings, from every page. | cases/app-shell.md |
|
|
505
532
|
| Document card | The agent made a document for the person, such as a plan or a report. | cases/artifact-card.md |
|
|
506
533
|
| Login check loading | The app is checking whether the person is logged in, or running a step such as checking an invite, before it knows what to show. | cases/auth-gate-loading.md |
|
|
534
|
+
| Billing page | A workspace pays for a plan. One page says what it pays for, what it has used, how it pays and what it has paid. | cases/billing-page.md |
|
|
535
|
+
| Blog index | A visitor opens the blog to see what was written lately and to pick a post to read. | cases/blog-index.md |
|
|
536
|
+
| Breakdown of a total | A page shows how a total splits into parts, such as responses by model or comments by project. | cases/breakdown-list.md |
|
|
537
|
+
| Changelog | A visitor or a customer wants to know what changed in the product lately, and may be sent to one change from a message. | cases/changelog.md |
|
|
507
538
|
| Check your email | A person signed up, and the product sent a link to confirm their email. | cases/check-your-email.md |
|
|
539
|
+
| Code sample | A page shows code that a person reads, or copies to run. | cases/code-sample.md |
|
|
508
540
|
| Collapsible search | A person filters a list by a word, and the list should keep its room when they are not typing. | cases/collapsible-search.md |
|
|
509
|
-
| Composer at a limit | The agent cannot be called from the composer because the workspace reached a limit, such as its agent
|
|
541
|
+
| Composer at a limit | The agent cannot be called from the composer because the workspace reached a limit, such as its AI agent responses for the month. | cases/composer-limit.md |
|
|
510
542
|
| Delete confirm | A person asks to delete or remove something, and it cannot be undone. | cases/confirm-destructive-action.md |
|
|
543
|
+
| Contact page | A visitor wants to reach the person behind a site. | cases/contact-page.md |
|
|
511
544
|
| Conversation starters | A thread has no messages yet, and the person may not know what to write first. | cases/conversation-starters.md |
|
|
512
545
|
| Create modal | A person creates something new, such as a project or a task, and it needs a name before it exists. | cases/create-modal.md |
|
|
513
546
|
| Danger zone | A settings page offers actions that are hard or impossible to undo, such as deleting an account or a workspace, or leaving one. | cases/danger-zone.md |
|
|
547
|
+
| Dashboard | A page that opens an app and says how things are going and what waits on the person. | cases/dashboard.md |
|
|
548
|
+
| Data table page | A page is one long table of records, such as invoices or customers, that a person searches, sorts and acts on. | cases/data-table-page.md |
|
|
514
549
|
| Device login | A CLI, an editor or another app opened the browser so the person can log in, and the login must reach that app. | cases/device-login.md |
|
|
550
|
+
| Docs component page | A person opens the page of one part of a design system or a code library to see what it looks like, how to write it and what it takes. | cases/docs-component-page.md |
|
|
515
551
|
| Email confirmed | A person opened the link that confirms their email. | cases/email-confirmed.md |
|
|
516
552
|
| Empty list | A list has loaded, and there is nothing in it yet. | cases/empty-list.md |
|
|
517
553
|
| Empty until set up | A pane is empty because something it needs is not set up yet, such as a connected account. | cases/empty-not-set-up.md |
|
|
518
554
|
| Empty search | A search or a filter finds nothing. | cases/empty-search.md |
|
|
519
555
|
| Error page | Something broke while showing a page, and the app cannot show it. | cases/error-page.md |
|
|
556
|
+
| FAQ | A marketing page answers the questions a visitor asks before signing up. | cases/faq.md |
|
|
557
|
+
| Feature grid | A marketing page lists what the product does, so a visitor can see if it fits. | cases/feature-grid.md |
|
|
520
558
|
| Feedback form | A person sends feedback about the product from inside it. | cases/feedback-form.md |
|
|
521
559
|
| Filter menu | A person narrows a list by one choice, such as a date range, or turns the filter off. | cases/filter-menu.md |
|
|
522
560
|
| Forgot password | A person cannot remember their password and asks for a link to set a new one. | cases/forgot-password.md |
|
|
561
|
+
| Image viewer | A page shows images small, and a person wants to see one larger without leaving the page. | cases/image-viewer.md |
|
|
523
562
|
| Import checklist | A person picks which items to bring in from another place, such as pages from a wiki. | cases/import-checklist.md |
|
|
524
563
|
| Form feedback | A person submits a small form, such as a settings field, and the request ends. The three options are the three outcomes of one save: it worked in place, it failed, or the result is elsewhere. | cases/inline-form-feedback.md |
|
|
525
564
|
| Integrations | A person connects the product to other tools, sees which ones are connected and disconnects them. | cases/integrations-list.md |
|
|
526
565
|
| Member invite | A person invites someone to join a workspace. | cases/invite-member.md |
|
|
566
|
+
| Invoices | A billing page lists what the workspace has paid, so an admin can find an invoice, check an amount and keep a copy. | cases/invoice-list.md |
|
|
567
|
+
| Hero | A marketing page opens by saying what the product is and asking for one thing. | cases/landing-hero.md |
|
|
568
|
+
| Legal page | A person reads the terms or the privacy policy to find one answer in it, or reads all of it before they agree. | cases/legal-page.md |
|
|
527
569
|
| Load failure | A list or a section could not load. | cases/load-failure.md |
|
|
528
570
|
| Log-out confirm | A person chooses Log Out. | cases/log-out-confirm.md |
|
|
529
571
|
| Login page | A person who already has an account opens the product and is not logged in. | cases/login-page.md |
|
|
572
|
+
| Long-form page | 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. | cases/long-form-page.md |
|
|
530
573
|
| List and detail | A person opens an item from a list, such as a message or a report, and reads or acts on it. | cases/master-detail.md |
|
|
531
574
|
| Members | An admin sees who is in the workspace, changes their roles, removes people and invites more. | cases/members-list.md |
|
|
532
575
|
| Mention list | A person types @ in the message box to name someone, or the agent. | cases/mention-list.md |
|
|
@@ -543,15 +586,24 @@ File: cases/success-feedback.md
|
|
|
543
586
|
| On and off settings | A person turns things on and off, such as which notifications they get. | cases/on-off-settings.md |
|
|
544
587
|
| On this page | A person reads a long page and wants to see its sections, jump to one and know which one they are in. | cases/on-this-page.md |
|
|
545
588
|
| More menu | A person opens a menu of less common actions, behind one button, for a thing or for the page. | cases/overflow-menu.md |
|
|
589
|
+
| Page end | A page has said what it had to say, and its last block decides what the visitor does next. | cases/page-end.md |
|
|
546
590
|
| Page header with actions | A page names itself at the top and offers what the person can do with it. | cases/page-header.md |
|
|
591
|
+
| Short list on a dashboard | A dashboard section lists things that wait on the person, such as questions or comments, and the list may be longer than the section. | cases/paged-card.md |
|
|
592
|
+
| Password gate | Some work is private. A visitor needs the password to read it, and someone who does not have it needs to know how to ask. | cases/password-gate.md |
|
|
593
|
+
| Payment method | A workspace pays by card. The admin sees which card, changes it or removes it. | cases/payment-method.md |
|
|
594
|
+
| Plan change confirm | An admin chose another plan. Before anything changes they need to know what it costs and when it starts. | cases/plan-change-confirm.md |
|
|
595
|
+
| Plan picker | An admin compares the plans a workspace can be on and chooses one. | cases/plan-picker.md |
|
|
596
|
+
| Pricing section | A visitor to the public site compares the plans and signs up for one. | cases/pricing-section.md |
|
|
597
|
+
| Product cards | A maker lists its products on one page, and each product has its own site. | cases/product-cards.md |
|
|
547
598
|
| Profile | A person changes how they appear and how they sign in: their picture, their name and their password. | cases/profile-form.md |
|
|
548
599
|
| Quick switcher | A person jumps to a channel, task or document by typing part of its name, from anywhere in the product. | cases/quick-switcher.md |
|
|
549
|
-
| Range switch | A person changes the time range of
|
|
600
|
+
| Range switch | A person changes the time range of the numbers or a list on the same page, such as Week, Month or Quarter. | cases/range-switch.md |
|
|
550
601
|
| Rename | A person renames something, such as a project or a channel. | cases/rename.md |
|
|
551
602
|
| Reply feedback | The agent has replied, and the person can say whether the reply helped. | cases/reply-feedback.md |
|
|
552
603
|
| Reply sources | The agent answered from things it read, and the person may want to check them. | cases/reply-sources.md |
|
|
553
604
|
| Page loading | A page or a pane is loading, and there is nothing to show yet. | cases/route-loading.md |
|
|
554
605
|
| Scope picker | A person chooses where a search or a question looks, such as one workspace or all of them. | cases/scope-picker.md |
|
|
606
|
+
| Section index | A section of a site, such as the guides, has its own first page that shows the places inside it, so a person can pick one. | cases/section-index.md |
|
|
555
607
|
| Set new password | A person opened the link to reset their password and now chooses a new one. | cases/set-new-password.md |
|
|
556
608
|
| Settings page | A person opens the settings of the product and looks for one area, such as Profile or Billing. | cases/settings-page.md |
|
|
557
609
|
| Side pane | A person opens more about the page, such as its members, its history or a document, without leaving the page. | cases/side-pane.md |
|
|
@@ -559,10 +611,15 @@ File: cases/success-feedback.md
|
|
|
559
611
|
| Sign-up page | A person who has no account yet opens the product and wants one. | cases/sign-up-page.md |
|
|
560
612
|
| Site footer | A person reaches the end of a site's page and looks for the pages that are not in the header, and who runs the site. | cases/site-footer.md |
|
|
561
613
|
| Site header | A site's pages name the site at the top and show the person where to go and what to do next. | cases/site-header.md |
|
|
614
|
+
| Site search | A site has many pages, and a person wants to reach one by its name or by a word in it, from any page. | cases/site-search.md |
|
|
562
615
|
| Command list | A person types / at the start of the message box to run a command. | cases/slash-command-list.md |
|
|
616
|
+
| Stat row | A page opens with the few numbers that say how things are going, counted over one range. | cases/stat-row.md |
|
|
617
|
+
| Status in a row | A row in a table or a list says what state its thing is in, such as an invoice, a plan or a connection. ODS has no separate Badge part, because `Tag` does a Badge's job. | cases/status-label.md |
|
|
618
|
+
| Tabbed panels | A page shows several views of one thing, and a visitor reads one of them at a time. | cases/tabbed-panels.md |
|
|
563
619
|
| Tag filter | A person filters a list by a tag, and adds, renames and deletes the tags themselves. | cases/tag-filter.md |
|
|
564
620
|
| Theme switcher | A person chooses between a light page, a dark page, or the one their device uses. | cases/theme-switcher.md |
|
|
565
621
|
| Type to confirm | A person asks to delete something large that cannot be brought back, such as a workspace or an account. | cases/type-to-confirm.md |
|
|
566
622
|
| Typing line | Other people in the thread are writing a message that has not arrived yet. | cases/typing-and-status.md |
|
|
567
623
|
| Unsaved changes | A person closes or leaves something they changed and did not save. | cases/unsaved-changes-guard.md |
|
|
568
624
|
| Upgrade prompt | A person reaches something their plan does not include, or a limit of their plan. | cases/upgrade-prompt.md |
|
|
625
|
+
| Usage against limits | A plan limits some things, such as AI agent responses, members and storage. The admin checks how close the workspace is. | cases/usage-meters.md |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function AboutPageProfile(): import("react").JSX.Element;
|
|
@@ -0,0 +1,64 @@
|
|
|
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 Tag from '../../components/tag';
|
|
10
|
+
import List from '../../components/list';
|
|
11
|
+
import Link from '../../components/link';
|
|
12
|
+
import LinkCard from '../../components/linkCard';
|
|
13
|
+
import { Cluster, PageSection, Stack } from '../../components/layout';
|
|
14
|
+
// A stand-in for the portrait. A real page passes its own picture.
|
|
15
|
+
var portrait = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 800'%3E%3Crect width='1200' height='800' fill='%23eef2f6'/%3E%3Ccircle cx='600' cy='330' r='110' fill='%23c2cfdb'/%3E%3Cpath d='M380 700c0-130 100-220 220-220s220 90 220 220z' fill='%23aab8c6'/%3E%3C/svg%3E";
|
|
16
|
+
var skills = ['Forms and errors', 'Billing and plans', 'Settings', 'Writing for interfaces', 'Field research', 'Workshops'];
|
|
17
|
+
export default function AboutPageProfile() {
|
|
18
|
+
return (<PageShell>
|
|
19
|
+
<Stack gap="giant">
|
|
20
|
+
<PageSection>
|
|
21
|
+
<PageHeader level={1} eyebrow="About" title="Dana Lee" lede="Designer at Acme, working on billing and account settings." facts={[
|
|
22
|
+
{ label: 'Role', value: 'Designer' },
|
|
23
|
+
{ label: 'Company', value: 'Acme' },
|
|
24
|
+
{ label: 'Based', value: 'Denver' },
|
|
25
|
+
{ label: 'Experience', value: '9 years' },
|
|
26
|
+
]}/>
|
|
27
|
+
{/* A placeholder, never a photo in the design system. A real page gives the picture a caption. */}
|
|
28
|
+
<Figure crop={3 / 2} caption="Dana at the Acme studio.">
|
|
29
|
+
<Image src={portrait} alt="A portrait of Dana Lee" width={1200} height={800}/>
|
|
30
|
+
</Figure>
|
|
31
|
+
</PageSection>
|
|
32
|
+
<PageSection>
|
|
33
|
+
<SectionIntro id="about-page-work" name="Work" statement="I design the parts of a product that people have to trust."/>
|
|
34
|
+
<Stack gap="xlarge">
|
|
35
|
+
<NumberedRow index={0} title="Designer, Acme, 2023 to now">
|
|
36
|
+
<Paragraph tone="secondary" measure="none">I lead the design of billing, plans and the settings people change most.</Paragraph>
|
|
37
|
+
</NumberedRow>
|
|
38
|
+
<NumberedRow index={1} title="Product designer at a design studio, 2019 to 2023">
|
|
39
|
+
<Paragraph tone="secondary" measure="none">I built a design system for six teams and wrote the rules for forms and errors.</Paragraph>
|
|
40
|
+
</NumberedRow>
|
|
41
|
+
<NumberedRow index={2} title="Interface designer for field tools, 2017 to 2019">
|
|
42
|
+
<Paragraph tone="secondary" measure="none">I designed tools for field crews that worked with a poor connection.</Paragraph>
|
|
43
|
+
</NumberedRow>
|
|
44
|
+
</Stack>
|
|
45
|
+
</PageSection>
|
|
46
|
+
<PageSection>
|
|
47
|
+
<SectionIntro id="about-page-skills" name="Skills"/>
|
|
48
|
+
<Cluster>
|
|
49
|
+
{skills.map(function (skill) { return (<Tag key={skill} variant="contained" size="medium" state="enabled" label={skill}/>); })}
|
|
50
|
+
</Cluster>
|
|
51
|
+
</PageSection>
|
|
52
|
+
<PageSection>
|
|
53
|
+
<SectionIntro id="about-page-reading" name="Further reading"/>
|
|
54
|
+
<List size="body1" items={[
|
|
55
|
+
<Link key="a" href="#how-we-write-errors">How we write error messages</Link>,
|
|
56
|
+
<Link key="b" href="#a-design-system-for-six-teams">A design system for six teams</Link>,
|
|
57
|
+
<Link key="c" href="#designing-for-a-poor-connection">Designing for a poor connection</Link>,
|
|
58
|
+
]}/>
|
|
59
|
+
</PageSection>
|
|
60
|
+
{/* The page ends by pointing to one next step. */}
|
|
61
|
+
<LinkCard href="#contact" title="Write a message" caption="Next: Contact"/>
|
|
62
|
+
</Stack>
|
|
63
|
+
</PageShell>);
|
|
64
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# About page
|
|
2
|
+
|
|
3
|
+
A visitor wants to know who is behind the work and whether to get in touch.
|
|
4
|
+
|
|
5
|
+
## Do
|
|
6
|
+
|
|
7
|
+
- Open with a `PageHeader` whose title is the person's name and whose lede says what they do in one sentence.
|
|
8
|
+
- Put the few facts a visitor asks first in the header's `facts`: role, company, where they are based, years of experience.
|
|
9
|
+
- Show a portrait in a `Figure` with a caption. Give the image an `alt` that says what it shows.
|
|
10
|
+
- Set the work history as `NumberedRow` rows, the newest first, with a plain years range in each title.
|
|
11
|
+
- Set the skills as a `Cluster` of `Tag` with `variant="contained"`. Keep it to the skills the work shows.
|
|
12
|
+
- Put further reading in a `List` of `Link`. Write each link as the name of the piece, not 'Read more'.
|
|
13
|
+
- End the page with one `LinkCard` to the next step, as the case 'Page end' says.
|
|
14
|
+
- Give each section a `SectionIntro`, so every section has a heading and an address.
|
|
15
|
+
|
|
16
|
+
## Don't
|
|
17
|
+
|
|
18
|
+
- Do not write the page in the third person when one person owns the work.
|
|
19
|
+
- Do not list every job. Keep the ones that explain the work.
|
|
20
|
+
- Do not rate skills with bars or stars.
|
|
21
|
+
- Do not add social links that the person does not use.
|
|
22
|
+
- Do not put a resume in a modal that a keyboard cannot reach.
|
|
23
|
+
|
|
24
|
+
## Example: One person introduces their work
|
|
25
|
+
|
|
26
|
+
Uses: `Cluster`, `Figure`, `Image`, `Link`, `LinkCard`, `List`, `NumberedRow`, `PageHeader`, `PageSection`, `PageShell`, `Paragraph`, `SectionIntro`, `Stack`, `Tag`
|
|
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 SectionIntro from 'oneslash-design-system/components/sectionIntro';
|
|
33
|
+
import NumberedRow from 'oneslash-design-system/components/numberedRow';
|
|
34
|
+
import Figure from 'oneslash-design-system/components/figure';
|
|
35
|
+
import Image from 'oneslash-design-system/components/image';
|
|
36
|
+
import Paragraph from 'oneslash-design-system/components/paragraph';
|
|
37
|
+
import Tag from 'oneslash-design-system/components/tag';
|
|
38
|
+
import List from 'oneslash-design-system/components/list';
|
|
39
|
+
import Link from 'oneslash-design-system/components/link';
|
|
40
|
+
import LinkCard from 'oneslash-design-system/components/linkCard';
|
|
41
|
+
import { Cluster, PageSection, Stack } from 'oneslash-design-system/components/layout';
|
|
42
|
+
|
|
43
|
+
// A stand-in for the portrait. A real page passes its own picture.
|
|
44
|
+
const portrait =
|
|
45
|
+
"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 800'%3E%3Crect width='1200' height='800' fill='%23eef2f6'/%3E%3Ccircle cx='600' cy='330' r='110' fill='%23c2cfdb'/%3E%3Cpath d='M380 700c0-130 100-220 220-220s220 90 220 220z' fill='%23aab8c6'/%3E%3C/svg%3E";
|
|
46
|
+
|
|
47
|
+
const skills = ['Forms and errors', 'Billing and plans', 'Settings', 'Writing for interfaces', 'Field research', 'Workshops'];
|
|
48
|
+
|
|
49
|
+
export default function AboutPageProfile() {
|
|
50
|
+
return (
|
|
51
|
+
<PageShell>
|
|
52
|
+
<Stack gap="giant">
|
|
53
|
+
<PageSection>
|
|
54
|
+
<PageHeader
|
|
55
|
+
level={1}
|
|
56
|
+
eyebrow="About"
|
|
57
|
+
title="Dana Lee"
|
|
58
|
+
lede="Designer at Acme, working on billing and account settings."
|
|
59
|
+
facts={[
|
|
60
|
+
{ label: 'Role', value: 'Designer' },
|
|
61
|
+
{ label: 'Company', value: 'Acme' },
|
|
62
|
+
{ label: 'Based', value: 'Denver' },
|
|
63
|
+
{ label: 'Experience', value: '9 years' },
|
|
64
|
+
]}
|
|
65
|
+
/>
|
|
66
|
+
{/* A placeholder, never a photo in the design system. A real page gives the picture a caption. */}
|
|
67
|
+
<Figure crop={3 / 2} caption="Dana at the Acme studio.">
|
|
68
|
+
<Image src={portrait} alt="A portrait of Dana Lee" width={1200} height={800} />
|
|
69
|
+
</Figure>
|
|
70
|
+
</PageSection>
|
|
71
|
+
<PageSection>
|
|
72
|
+
<SectionIntro id="about-page-work" name="Work" statement="I design the parts of a product that people have to trust." />
|
|
73
|
+
<Stack gap="xlarge">
|
|
74
|
+
<NumberedRow index={0} title="Designer, Acme, 2023 to now">
|
|
75
|
+
<Paragraph tone="secondary" measure="none">I lead the design of billing, plans and the settings people change most.</Paragraph>
|
|
76
|
+
</NumberedRow>
|
|
77
|
+
<NumberedRow index={1} title="Product designer at a design studio, 2019 to 2023">
|
|
78
|
+
<Paragraph tone="secondary" measure="none">I built a design system for six teams and wrote the rules for forms and errors.</Paragraph>
|
|
79
|
+
</NumberedRow>
|
|
80
|
+
<NumberedRow index={2} title="Interface designer for field tools, 2017 to 2019">
|
|
81
|
+
<Paragraph tone="secondary" measure="none">I designed tools for field crews that worked with a poor connection.</Paragraph>
|
|
82
|
+
</NumberedRow>
|
|
83
|
+
</Stack>
|
|
84
|
+
</PageSection>
|
|
85
|
+
<PageSection>
|
|
86
|
+
<SectionIntro id="about-page-skills" name="Skills" />
|
|
87
|
+
<Cluster>
|
|
88
|
+
{skills.map((skill) => (
|
|
89
|
+
<Tag key={skill} variant="contained" size="medium" state="enabled" label={skill} />
|
|
90
|
+
))}
|
|
91
|
+
</Cluster>
|
|
92
|
+
</PageSection>
|
|
93
|
+
<PageSection>
|
|
94
|
+
<SectionIntro id="about-page-reading" name="Further reading" />
|
|
95
|
+
<List
|
|
96
|
+
size="body1"
|
|
97
|
+
items={[
|
|
98
|
+
<Link key="a" href="#how-we-write-errors">How we write error messages</Link>,
|
|
99
|
+
<Link key="b" href="#a-design-system-for-six-teams">A design system for six teams</Link>,
|
|
100
|
+
<Link key="c" href="#designing-for-a-poor-connection">Designing for a poor connection</Link>,
|
|
101
|
+
]}
|
|
102
|
+
/>
|
|
103
|
+
</PageSection>
|
|
104
|
+
{/* The page ends by pointing to one next step. */}
|
|
105
|
+
<LinkCard href="#contact" title="Write a message" caption="Next: Contact" />
|
|
106
|
+
</Stack>
|
|
107
|
+
</PageShell>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Native
|
|
113
|
+
|
|
114
|
+
On Apple a profile is a grouped list with the name in a large title. Use a `NavigationLink` for further reading.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function AdminInboxList(): import("react").JSX.Element;
|
|
@@ -0,0 +1,104 @@
|
|
|
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 Surface from '../../components/surface';
|
|
17
|
+
import Heading from '../../components/heading';
|
|
18
|
+
import Paragraph from '../../components/paragraph';
|
|
19
|
+
import Tag from '../../components/tag';
|
|
20
|
+
import IconButton from '../../components/iconButton';
|
|
21
|
+
import Button from '../../components/button';
|
|
22
|
+
import Tooltip from '../../components/tooltip';
|
|
23
|
+
import Skeleton from '../../components/skeleton';
|
|
24
|
+
import EmptyBox from '../../components/emptyBox';
|
|
25
|
+
import { Cluster, Stack } from '../../components/layout';
|
|
26
|
+
var first = [
|
|
27
|
+
{ id: 'm1', from: 'Ben Carter', date: 'Nov 16, 2026', text: 'I saw your page about error messages. Do you give talks? We are planning a day for our design team in January.', read: false },
|
|
28
|
+
{ id: 'm2', from: 'Omar Reyes', date: 'Nov 15, 2026', text: 'Is the plan changes case study open to everyone? I would like to share it with my team.', read: false },
|
|
29
|
+
{ id: 'm3', from: 'Maya Brooks', date: 'Nov 14, 2026', text: 'Thank you for the reading list. I read the piece on poor connections twice.', read: false },
|
|
30
|
+
{ id: 'm4', from: 'Leo Park', date: 'Nov 12, 2026', text: 'Could you share the password for the case studies? I would like to show it to my team.', read: true },
|
|
31
|
+
{ id: 'm5', from: 'Sara Idris', date: 'Nov 10, 2026', text: 'We are hiring a designer in the spring. Would you like to talk?', read: true },
|
|
32
|
+
{ id: 'm6', from: 'Noah Quinn', date: 'Nov 9, 2026', text: 'Your design system notes helped our team. Is there a newsletter?', read: true },
|
|
33
|
+
{ id: 'm7', from: 'Ana Silva', date: 'Nov 7, 2026', text: 'A small thing: the link to the second case study on the About page does not open.', read: true },
|
|
34
|
+
{ id: 'm8', from: 'Tom Hale', date: 'Nov 6, 2026', text: 'Can I use one of your diagrams in a talk? I will credit you.', read: true },
|
|
35
|
+
{ id: 'm9', from: 'Iris Chen', date: 'Nov 4, 2026', text: 'I would like to ask about the tools you use for prototyping.', read: true },
|
|
36
|
+
{ id: 'm10', from: 'Sam Ortiz', date: 'Nov 2, 2026', text: 'Congratulations on the new page. The facts row is very clear.', read: true },
|
|
37
|
+
{ id: 'm11', from: 'Eve Lund', date: 'Oct 29, 2026', text: 'We met at the meetup in October. I would like to stay in touch.', read: true },
|
|
38
|
+
{ id: 'm12', from: 'Raj Patel', date: 'Oct 22, 2026', text: 'Is the About page available as a printable resume?', read: true },
|
|
39
|
+
];
|
|
40
|
+
export default function AdminInboxList() {
|
|
41
|
+
var _a = useState(first), messages = _a[0], setMessages = _a[1];
|
|
42
|
+
var _b = useState(false), failed = _b[0], setFailed = _b[1];
|
|
43
|
+
var _c = useState(false), busy = _c[0], setBusy = _c[1];
|
|
44
|
+
var _d = useState(0), refreshes = _d[0], setRefreshes = _d[1];
|
|
45
|
+
var timer = useRef();
|
|
46
|
+
// Stops the request if the example goes away before it ends.
|
|
47
|
+
useEffect(function () { return function () { return clearTimeout(timer.current); }; }, []);
|
|
48
|
+
var unread = messages.filter(function (m) { return !m.read; }).length;
|
|
49
|
+
function toggle(id) {
|
|
50
|
+
setMessages(function (list) { return list.map(function (m) { return (m.id === id ? __assign(__assign({}, m), { read: !m.read }) : m); }); });
|
|
51
|
+
}
|
|
52
|
+
function load() {
|
|
53
|
+
if (busy)
|
|
54
|
+
return;
|
|
55
|
+
var attempt = refreshes + 1;
|
|
56
|
+
setRefreshes(attempt);
|
|
57
|
+
setBusy(true);
|
|
58
|
+
// Stands in for the request to the server. The second refresh fails, so you can see Try Again.
|
|
59
|
+
timer.current = setTimeout(function () {
|
|
60
|
+
setBusy(false);
|
|
61
|
+
setFailed(attempt === 2);
|
|
62
|
+
}, 1000);
|
|
63
|
+
}
|
|
64
|
+
return (<PageShell>
|
|
65
|
+
<Stack gap="xlarge">
|
|
66
|
+
{/* The header stays while the list loads or fails. */}
|
|
67
|
+
<PageHeader level={1} title="Messages" lede={"".concat(unread, " of ").concat(messages.length, " unread")}/>
|
|
68
|
+
<Cluster>
|
|
69
|
+
<Button size="small" type="secondary" state="enabled" label="Refresh" decoIcon="RefreshCw" loading={busy && !failed} onClickButton={load}/>
|
|
70
|
+
</Cluster>
|
|
71
|
+
{busy && !failed && (<Stack gap="small">
|
|
72
|
+
<Skeleton variant="block" height="large" label="Loading messages"/>
|
|
73
|
+
<Skeleton variant="block" height="large"/>
|
|
74
|
+
<Skeleton variant="block" height="large"/>
|
|
75
|
+
</Stack>)}
|
|
76
|
+
{failed && (
|
|
77
|
+
// The list fails as a region, as the case 'Load failure' shows: it stays until the list loads.
|
|
78
|
+
<Surface minHeight="tall" align="center">
|
|
79
|
+
<EmptyBox size="large" icon="CloudOff" text="Could not load messages" secondText="Check your connection and try again." action={<Button size="medium" type="primary" state="enabled" label="Try Again" loading={busy} onClickButton={load}/>}/>
|
|
80
|
+
</Surface>)}
|
|
81
|
+
{!busy && !failed && messages.length === 0 && <EmptyBox size="large" text="No messages yet" secondText="Messages from the contact form appear here."/>}
|
|
82
|
+
{!busy && !failed && (<Stack gap="small">
|
|
83
|
+
{messages.map(function (m) { return (<Surface key={m.id} padding="small" align="start">
|
|
84
|
+
<Stack gap="small">
|
|
85
|
+
<Cluster justify="between">
|
|
86
|
+
<Cluster gap="small">
|
|
87
|
+
<Heading level={2} size="subtitle1">{m.from}</Heading>
|
|
88
|
+
{!m.read && <Tag variant="dot" size="small" color="info" label="Unread"/>}
|
|
89
|
+
</Cluster>
|
|
90
|
+
<Cluster gap="small">
|
|
91
|
+
<Paragraph tone="secondary" size="caption">{m.date}</Paragraph>
|
|
92
|
+
{/* The icon shows what the Button does: an open envelope marks the message read, a closed one marks it unread. */}
|
|
93
|
+
<Tooltip title={"Mark message from ".concat(m.from, " as ").concat(m.read ? 'unread' : 'read')}>
|
|
94
|
+
<IconButton iconName={m.read ? 'Mail' : 'MailOpen'} ariaLabel={"Mark message from ".concat(m.from, " as ").concat(m.read ? 'unread' : 'read')} color={m.read ? 'iconOnly' : 'primary'} state="enabled" size="medium" onClick={function () { return toggle(m.id); }}/>
|
|
95
|
+
</Tooltip>
|
|
96
|
+
</Cluster>
|
|
97
|
+
</Cluster>
|
|
98
|
+
<Paragraph size="body2" measure="none">{m.text}</Paragraph>
|
|
99
|
+
</Stack>
|
|
100
|
+
</Surface>); })}
|
|
101
|
+
</Stack>)}
|
|
102
|
+
</Stack>
|
|
103
|
+
</PageShell>);
|
|
104
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function AdminInboxSplit(): import("react").JSX.Element;
|
|
@@ -0,0 +1,68 @@
|
|
|
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 { useState } from 'react';
|
|
14
|
+
import PageShell from '../../components/pageShell';
|
|
15
|
+
import PageHeader from '../../components/pageHeader';
|
|
16
|
+
import Navigation from '../../components/navigation';
|
|
17
|
+
import MenuItem from '../../components/menuItem';
|
|
18
|
+
import { SettingsLayout } from '../../components/settingsSection';
|
|
19
|
+
import Heading from '../../components/heading';
|
|
20
|
+
import Paragraph from '../../components/paragraph';
|
|
21
|
+
import Button from '../../components/button';
|
|
22
|
+
import { Cluster, Stack } from '../../components/layout';
|
|
23
|
+
var first = [
|
|
24
|
+
{ id: 'talk', from: 'Ben Carter', subject: 'A talk in January?', date: 'Nov 16, 2026', body: ['I saw your page about error messages. Do you give talks?', 'We are planning a day for our design team in January.'], read: false },
|
|
25
|
+
{ id: 'share', from: 'Omar Reyes', subject: 'Sharing the case study', date: 'Nov 15, 2026', body: ['Is the plan changes case study open to everyone?', 'I would like to share it with my team.'], read: false },
|
|
26
|
+
{ id: 'thanks', from: 'Maya Brooks', subject: 'Thank you for the reading list', date: 'Nov 14, 2026', body: ['I read the piece on poor connections twice.'], read: false },
|
|
27
|
+
{ id: 'password', from: 'Leo Park', subject: 'The case study password', date: 'Nov 12, 2026', body: ['Could you share the password for the case studies?', 'I would like to show it to my team.'], read: true },
|
|
28
|
+
{ id: 'hiring', from: 'Sara Idris', subject: 'We are hiring in the spring', date: 'Nov 10, 2026', body: ['We are hiring a designer in the spring. Would you like to talk?'], read: true },
|
|
29
|
+
{ id: 'newsletter', from: 'Noah Quinn', subject: 'Is there a newsletter?', date: 'Nov 9, 2026', body: ['Your design system notes helped our team.'], read: true },
|
|
30
|
+
];
|
|
31
|
+
export default function AdminInboxSplit() {
|
|
32
|
+
var _a;
|
|
33
|
+
var _b = useState(first), messages = _b[0], setMessages = _b[1];
|
|
34
|
+
// One message is always open, the first at the start.
|
|
35
|
+
var _c = useState(first[0].id), openId = _c[0], setOpenId = _c[1];
|
|
36
|
+
// On a phone the list is the screen until a message is chosen, and Back returns to it.
|
|
37
|
+
var _d = useState(false), showDetail = _d[0], setShowDetail = _d[1];
|
|
38
|
+
var message = (_a = messages.find(function (m) { return m.id === openId; })) !== null && _a !== void 0 ? _a : messages[0];
|
|
39
|
+
var unread = messages.filter(function (m) { return !m.read; }).length;
|
|
40
|
+
function toggle(id) {
|
|
41
|
+
setMessages(function (list) { return list.map(function (m) { return (m.id === id ? __assign(__assign({}, m), { read: !m.read }) : m); }); });
|
|
42
|
+
}
|
|
43
|
+
var list = (<Navigation aria-label="Messages">
|
|
44
|
+
{messages.map(function (m) { return (<MenuItem key={m.id} size="medium" label={m.from} secondLabel={m.subject} tag={m.read ? undefined : { label: 'Unread', color: 'info' }} href={"/admin/messages/".concat(m.id)} isSelected={m.id === message.id} aria-current={m.id === message.id ? 'page' : undefined} onClick={function (event) {
|
|
45
|
+
// A real app lets the link go to the message's own address, so it can be shared and reloaded. The example keeps the choice in state.
|
|
46
|
+
event.preventDefault();
|
|
47
|
+
setOpenId(m.id);
|
|
48
|
+
setShowDetail(true);
|
|
49
|
+
}}/>); })}
|
|
50
|
+
</Navigation>);
|
|
51
|
+
return (<PageShell>
|
|
52
|
+
<Stack gap="xlarge">
|
|
53
|
+
<PageHeader level={1} title="Messages" lede={"".concat(unread, " of ").concat(messages.length, " unread")}/>
|
|
54
|
+
<SettingsLayout navWidth="wide" nav={list} showContent={showDetail} back={<Button size="small" type="tertiary" state="enabled" decoIcon="ChevronLeft" label="Back to Messages" onClickButton={function () { return setShowDetail(false); }}/>}>
|
|
55
|
+
<Stack gap="small">
|
|
56
|
+
<Heading level={2} size="h6">{message.subject}</Heading>
|
|
57
|
+
<Paragraph tone="secondary" size="body2" measure="none">{message.from}, {message.date}</Paragraph>
|
|
58
|
+
</Stack>
|
|
59
|
+
<Stack gap="medium">
|
|
60
|
+
{message.body.map(function (paragraph) { return (<Paragraph key={paragraph} measure="none">{paragraph}</Paragraph>); })}
|
|
61
|
+
</Stack>
|
|
62
|
+
<Cluster>
|
|
63
|
+
<Button size="medium" type="secondary" state="enabled" decoIcon="CircleCheck" label={message.read ? 'Mark as Unread' : 'Mark as Read'} onClickButton={function () { return toggle(message.id); }}/>
|
|
64
|
+
</Cluster>
|
|
65
|
+
</SettingsLayout>
|
|
66
|
+
</Stack>
|
|
67
|
+
</PageShell>);
|
|
68
|
+
}
|