oneslash-design-system 2.24.0 → 2.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/README.md +1 -1
  2. package/dist/DESIGN.md +8 -4
  3. package/dist/cases/ask-page/answered.jsx +10 -2
  4. package/dist/cases/ask-page.md +12 -3
  5. package/dist/cases/billing-page/self-serve.jsx +4 -4
  6. package/dist/cases/billing-page/trial.d.ts +1 -0
  7. package/dist/cases/billing-page/trial.jsx +115 -0
  8. package/dist/cases/billing-page.md +166 -5
  9. package/dist/cases/collapsible-search/popover.jsx +1 -1
  10. package/dist/cases/collapsible-search.md +2 -2
  11. package/dist/cases/cookie-choice/banner.d.ts +1 -0
  12. package/dist/cases/cookie-choice/banner.jsx +82 -0
  13. package/dist/cases/cookie-choice/settings.d.ts +1 -0
  14. package/dist/cases/cookie-choice/settings.jsx +75 -0
  15. package/dist/cases/cookie-choice.md +234 -0
  16. package/dist/cases/dashboard/numbers-first.jsx +1 -1
  17. package/dist/cases/dashboard/work-first.jsx +1 -1
  18. package/dist/cases/dashboard.md +2 -2
  19. package/dist/cases/data-table-page/all-rows.jsx +1 -1
  20. package/dist/cases/data-table-page/paged.jsx +1 -1
  21. package/dist/cases/data-table-page.md +2 -2
  22. package/dist/cases/invoice-list/table.jsx +21 -9
  23. package/dist/cases/invoice-list.md +27 -12
  24. package/dist/cases/message-reactions/picker.jsx +1 -1
  25. package/dist/cases/message-reactions.md +2 -2
  26. package/dist/cases/message-row.md +2 -1
  27. package/dist/cases/newsletter-signup/inline.d.ts +1 -0
  28. package/dist/cases/newsletter-signup/inline.jsx +72 -0
  29. package/dist/cases/newsletter-signup/section.d.ts +1 -0
  30. package/dist/cases/newsletter-signup/section.jsx +72 -0
  31. package/dist/cases/newsletter-signup.md +234 -0
  32. package/dist/cases/number-format.md +6 -2
  33. package/dist/cases/people-row/stack.jsx +1 -1
  34. package/dist/cases/people-row.md +2 -2
  35. package/dist/cases/plan-comparison/table.d.ts +1 -0
  36. package/dist/cases/plan-comparison/table.jsx +47 -0
  37. package/dist/cases/plan-comparison.md +94 -0
  38. package/dist/cases/plan-picker.md +1 -0
  39. package/dist/cases/pricing-section.md +1 -1
  40. package/dist/cases/site-footer/columns.jsx +2 -1
  41. package/dist/cases/site-footer.md +3 -1
  42. package/dist/cases/stat-row/tiles.jsx +2 -1
  43. package/dist/cases/stat-row.md +4 -1
  44. package/dist/cases/task-header/agent-sets-status.jsx +1 -1
  45. package/dist/cases/task-header/people-change-status.jsx +1 -1
  46. package/dist/cases/task-header.md +2 -2
  47. package/dist/cases.json +243 -28
  48. package/dist/components/alert.d.ts +3 -1
  49. package/dist/components/alert.jsx +5 -5
  50. package/dist/components/barChart.jsx +4 -2
  51. package/dist/components/dateField.jsx +1 -1
  52. package/dist/components/formatNumber.d.ts +10 -2
  53. package/dist/components/formatNumber.js +44 -9
  54. package/dist/components/layout.d.ts +4 -2
  55. package/dist/components/layout.jsx +13 -2
  56. package/dist/components/markdown.d.ts +24 -0
  57. package/dist/components/markdown.jsx +81 -0
  58. package/dist/components/pageShell.d.ts +3 -3
  59. package/dist/components/pageShell.jsx +6 -5
  60. package/dist/components/popover.d.ts +5 -1
  61. package/dist/components/popover.jsx +3 -2
  62. package/dist/components/progress.jsx +1 -1
  63. package/dist/components/select.jsx +5 -2
  64. package/dist/components/statTile.d.ts +1 -1
  65. package/dist/components/statTile.jsx +7 -2
  66. package/dist/components/tableCell.d.ts +4 -3
  67. package/dist/components/tableCell.jsx +2 -2
  68. package/dist/components/toaster.jsx +81 -11
  69. package/dist/index.d.ts +1 -0
  70. package/dist/index.js +1 -0
  71. package/dist/internal/markdown.d.ts +40 -0
  72. package/dist/internal/markdown.js +577 -0
  73. package/dist/internal/toaster.d.ts +2 -0
  74. package/dist/internal/toaster.js +8 -0
  75. package/dist/native-mapping.json +9 -3
  76. package/dist/stories/Cases.generated.stories.d.ts +6 -0
  77. package/dist/stories/Cases.generated.stories.jsx +12 -0
  78. package/dist/stories/Markdown.stories.d.ts +9 -0
  79. package/dist/stories/Markdown.stories.jsx +66 -0
  80. package/dist/stories/Popover.stories.d.ts +2 -0
  81. package/dist/stories/Popover.stories.jsx +33 -0
  82. package/dist/stories/StatTile.stories.d.ts +4 -0
  83. package/dist/stories/StatTile.stories.jsx +47 -2
  84. package/dist/stories/Toaster.stories.d.ts +4 -0
  85. package/dist/stories/Toaster.stories.jsx +30 -0
  86. package/package.json +1 -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.24.0 has 131: fourteen rules and 117 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, forms with dates and files, onboarding, history and charts.
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.25.0 has 134: fourteen rules and 120 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, forms with dates and files, onboarding, history and charts, cookies, newsletters and plan comparison.
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
@@ -327,6 +327,7 @@ For each web component, the table gives the native control to use. System contro
327
327
  | linkCard | Not applicable: web page pattern | Not applicable: web page pattern | In an app screen: a `NavigationLink` row in a `List` / a clickable `ListItem`. |
328
328
  | list | `List` | `LazyColumn` of `ListItem` | A short bulleted passage inside text stays `Text` lines. |
329
329
  | loadingScreen | `ProgressView` | `CircularProgressIndicator` | |
330
+ | markdown | A `VStack` of the same subset of blocks, each line of text a `Text(AttributedString(markdown:options: .init(interpretedSyntax: .inlineOnlyPreservingWhitespace)))`, code in `codeBlock` | A `Column` of the same subset, parsed by hand (Compose has no system markdown), each line of text a `Text` with an `AnnotatedString` whose links are `LinkAnnotation.Url` | Headings to three levels, lists one level deep, fenced code, rules, bold, italic, inline code and links. Only http, https and mailto links open; a table shows as code and an image as its alt text. |
330
331
  | menu | `Menu` or `.contextMenu` | `DropdownMenu` | |
331
332
  | menuItem | `Button` inside a `Menu` | `DropdownMenuItem` | In a sidebar: a `List` row / `NavigationDrawerItem`. |
332
333
  | 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. |
@@ -354,10 +355,10 @@ For each web component, the table gives the native control to use. System contro
354
355
  | 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. |
355
356
  | surface | Not applicable: web page pattern | Not applicable: web page pattern | In an app screen: a `Form` section or `GroupBox` / `Card`. |
356
357
  | 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. |
357
- | 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)`. |
358
+ | statTile | A `VStack` of `Text`s with `.accessibilityElement(children: .combine)` | A `Column` with `Modifier.semantics(mergeDescendants = true)` | Not colored by good or bad. A percent's change is in points ('Up 3 pts'), not a percent of a percent, and its accessibility label says 'percentage points'. Money uses the currency's own decimals. Numbers: `.number.notation(.compactName)` / `.currency(code:)` on Apple; `CompactDecimalFormat` / `NumberFormat.getCurrencyInstance` on Android. Loading: `.redacted(reason: .placeholder)`. |
358
359
  | tab | `TabView` or segmented `Picker` | `PrimaryTabRow` | One `Tab` inside `TabView` or one segment / one `Tab`. `TabRow` is deprecated in Material 3. |
359
360
  | 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"`. |
360
- | tableCell | A `TableColumn` content view | `Text` in a `Row` with `Modifier.weight` | Material 3 has no table. |
361
+ | tableCell | A `TableColumn` content view | `Text` in a `Row` with `Modifier.weight` | Material 3 has no table. `rowHeader` makes the first cell name its row: the first `TableColumn` on Apple, and `semantics { heading() }` on that cell on Android. |
361
362
  | 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 }`. |
362
363
  | tableHeader | The `Table` column headers (`TableColumn` titles) | A header `Row` as the first `LazyColumn` item | Material 3 has no table. |
363
364
  | 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" }`. |
@@ -369,7 +370,7 @@ For each web component, the table gives the native control to use. System contro
369
370
  | timeStamp | `Text(_:style:)` (`.relative`) or `Text(_:format:)` (`.dateTime`) | `Text` with `DateUtils.getRelativeTimeSpanString` or `DateTimeFormatter.ofLocalizedDateTime` | |
370
371
  | timeline | A `List` of rows with a leading `Circle` and a connecting `Rectangle` in an `.overlay`; a selectable row is a `Button` | A `LazyColumn` of rows with the dot and the connecting line drawn in `Modifier.drawBehind`; a selectable row is `Modifier.clickable` | The dot is the same for every row: color carries nothing. No line after the last row. Mark the selected row with `.accessibilityAddTraits(.isSelected)` / `semantics { selected = true }`. Format the time with `Text(_:format:)` / `DateTimeFormatter.ofLocalizedDateTime`. |
371
372
  | titleBar | `.navigationTitle` with `.toolbar` items | `TopAppBar` with `navigationIcon` and `actions` | The main action stays in the toolbar; the rest go in a `Menu` / an overflow `DropdownMenu`. The `meta` line is a `.navigationSubtitle` on Mac and a toolbar `principal` item on iPhone; on Android a second `Text` in the top bar's `title` slot. |
372
- | toaster | `ODSBanner` for an inline message; a system banner (a local notification) when the app is not in front | `Snackbar` in a `SnackbarHost` | SwiftUI has no toast, so ODS adds none: show the message in the screen. |
373
+ | toaster | `ODSBanner` for an inline message; a system banner (a local notification) when the app is not in front | `Snackbar` in a `SnackbarHost` | SwiftUI has no toast, so ODS adds none: show the message in the screen. SwiftUI posts `AccessibilityNotification.Announcement`; Compose sets `liveRegion` on the snackbar host. |
373
374
  | tooltip | `.help` | `TooltipBox` | `.help` shows on pointer hover only. `TooltipBox` needs `@OptIn(ExperimentalMaterial3Api::class)`. |
374
375
  | userImage | `ODSAvatar` | `OdsAvatar` | Load the picture yourself and pass it as an `Image` / a `Painter`. |
375
376
 
@@ -490,7 +491,7 @@ File: cases/form-errors.md
490
491
 
491
492
  A page shows counts, money, sizes, shares or changes.
492
493
 
493
- 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. On a chart's axis, a number from 10,000 up shows its short form too: '12.4K'. The chart's readout and its table show the exact number. Money has its symbol and 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.
494
+ 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. On a chart's axis, a number from 10,000 up shows its short form too: '12.4K'. The chart's readout and its table show the exact number. Money has its symbol and its currency's decimals: '$1,240.00', '¥1,240', 'KWD 1,240.000'. A cost under the smallest unit reads '< $0.01'. A share is a whole percent, and a small one reads '< 1%'. A size is base 1024: '52 MB', '1.2 GB'. A time reads '340 ms', '1.2 s', '2 h 24 min'. The unit is in the label or after the number in words: 'Responses', '7 of 8 seats', '340 responses, no limit'. A bare number is never shown, and a unit is never only in a tooltip. A change says its direction, its size and what it compares with: 'Up 12% from last week'. It reads 'New this week' when there was nothing before. A change in a percent is in points: 'Up 3 pts from last week'. A refund in a list of charges has a minus: '-$12.00'. In a sentence, say the word: 'Refunded $12.00'. A change has no color, because more is not good or bad by itself. Unknown is never 0. `formatNumber` shows '–' for a value it cannot read. `StatTile` shows 'No data yet'. While a number loads, a `Skeleton` holds its place. On a failure, show the case 'Load failure'. A limit is a `Progress`, which says 'Limit reached' in words.
494
495
 
495
496
  File: cases/number-format.md
496
497
 
@@ -557,6 +558,7 @@ File: cases/success-feedback.md
557
558
  | Delete confirm | A person asks to delete or remove something, and it cannot be undone. | cases/confirm-destructive-action.md |
558
559
  | Contact page | A visitor wants to reach the person behind a site. | cases/contact-page.md |
559
560
  | Conversation starters | A thread has no messages yet, and the person may not know what to write first. | cases/conversation-starters.md |
561
+ | Cookie choice | A site sets cookies it does not need to run, and asks the visitor whether it may. | cases/cookie-choice.md |
560
562
  | 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 |
561
563
  | 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 |
562
564
  | Dashboard | A page that opens an app and says how things are going and what waits on the person. | cases/dashboard.md |
@@ -598,6 +600,7 @@ File: cases/success-feedback.md
598
600
  | Reactions | People answer a message with an emoji instead of a reply. | cases/message-reactions.md |
599
601
  | Message row | A thread shows messages from people, and sometimes from an agent. | cases/message-row.md |
600
602
  | Menu on a phone | A site's links and actions do not fit in the bar on a phone, and the person still needs to reach every one. | cases/mobile-menu.md |
603
+ | Newsletter sign-up | A reader of the public site wants to hear about the product by email, without making an account. | cases/newsletter-signup.md |
601
604
  | Page not found | A person opens a link to a page that does not exist. | cases/not-found-page.md |
602
605
  | Notification setting | A person chooses how much a channel or a thread notifies them. | cases/notification-menu.md |
603
606
  | OAuth consent | Another app, such as a CLI or an MCP client, asks to act for a person who is logged in, and the person must allow it. | cases/oauth-consent.md |
@@ -612,6 +615,7 @@ File: cases/success-feedback.md
612
615
  | Payment method | A workspace pays by card. The admin sees which card, changes it or removes it. | cases/payment-method.md |
613
616
  | People on an item | A thread or a task shows who is on it, and the person can find out who they all are. | cases/people-row.md |
614
617
  | 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 |
618
+ | Plan comparison | A visitor to the public site wants to see every limit of every plan side by side before signing up. | cases/plan-comparison.md |
615
619
  | Plan picker | An admin compares the plans a workspace can be on and chooses one. | cases/plan-picker.md |
616
620
  | Plan sign-off | The agent wrote a plan for a task, and people approve it before the agent starts the work. | cases/plan-sign-off.md |
617
621
  | Pricing section | A visitor to the public site compares the plans and signs up for one. | cases/pricing-section.md |
@@ -35,6 +35,7 @@ import UserImage from '../../components/userImage';
35
35
  import TimeStamp from '../../components/timeStamp';
36
36
  import Tag from '../../components/tag';
37
37
  import Paragraph from '../../components/paragraph';
38
+ import Markdown from '../../components/markdown';
38
39
  import SourceCard from '../../components/sourceCard';
39
40
  import Composer from '../../components/composer';
40
41
  import StepList from '../../components/stepList';
@@ -46,7 +47,14 @@ var workspaces = ['Acme Design', 'Acme Engineering', 'Acme Marketing'];
46
47
  var all = "All ".concat(workspaces.length, " Workspaces");
47
48
  var question = { from: me, at: new Date('2026-11-16T14:40:00Z'), text: 'Who owns the press kit for the launch?' };
48
49
  var answeredAt = new Date('2026-11-16T14:41:00Z');
49
- var answer = 'Mia Park owns the press kit. Ben Carter handed it to her in #launch on Nov 12, 2026, and the launch plan lists her as its owner. It is due Nov 19, 2026.';
50
+ // The agent writes markdown. Markdown sets it in ODS parts, so no mark shows as raw text.
51
+ var answer = [
52
+ '**Mia Park** owns the press kit. Here is how it came to her:',
53
+ '',
54
+ '1. Ben Carter handed it to her in #launch on Nov 12, 2026.',
55
+ '2. The [launch plan](https://acme.example/docs/launch-plan) lists her as its owner.',
56
+ '3. It is due Nov 19, 2026.',
57
+ ].join('\n');
50
58
  var kinds = {
51
59
  chat: { label: 'Chat', icon: MessageSquare },
52
60
  docs: { label: 'Docs', icon: BookOpen },
@@ -185,7 +193,7 @@ export default function AskPageAnswered() {
185
193
  {saved ? (<Button ref={openButton} size="small" type="tertiary" state="enabled" label="Open in Docs" decoIcon="FileText" href="/docs/press-kit-owner"/>) : (<Button size="small" type="secondary" state="enabled" label="Save to Docs" decoIcon="BookmarkPlus" loading={saving} onClickButton={saveToDocs}/>)}
186
194
  </Cluster>
187
195
  </Stack>}>
188
- <Paragraph measure="none">{answer}</Paragraph>
196
+ <Markdown id="ask-page-answered-answer" text={answer} headingLevel={3}/>
189
197
  </Message>
190
198
  {turns.map(function (t) {
191
199
  var _a;
@@ -11,6 +11,7 @@ A page where a person asks the agent about their work across one or more workspa
11
11
  - Say where the agent looks above the `Composer`: 'Acme Agent looks in the docs, chats and tasks of all 3 of your workspaces.' Change it with the scope.
12
12
  - Name the `Composer` for who reads it: 'Ask Acme Agent'.
13
13
  - Show the question as the person's `Message`, and the answer as the agent's, with its sources as cards under it, as the case 'Reply sources' says.
14
+ - Render an agent's markdown with `Markdown`, never as raw text with its marks.
14
15
  - Offer 'Save to Docs' under an answer when the product keeps answers as docs. While it saves it is `loading`. Then a toast says 'Answer saved to Docs.', a link 'Open in Docs' takes its place, and focus goes to the link.
15
16
  - Keep the conversation when the person leaves the page, and show it again when they come back.
16
17
  - Show the agent's progress row where the answer will appear while it works, with a Stop Button, as the rule 'An agent shows its progress' says. Once the run has ended, Stop gives way to 'Stopped. Nothing was changed.' and focus goes back to the `Composer`.
@@ -213,7 +214,7 @@ export default function AskPageFirstVisit() {
213
214
 
214
215
  Use when: A question has its answer and sources, and the person can ask the next one.
215
216
 
216
- Uses: `AppShell`, `Button`, `Cluster`, `Composer`, `Grid`, `Line`, `Menu`, `MenuItem`, `Message`, `Navigation`, `Paragraph`, `Popover`, `SourceCard`, `Stack`, `StepList`, `Tag`, `TimeStamp`, `TitleBar`, `Toaster`, `UserImage`, `dismissToast`, `toast`
217
+ Uses: `AppShell`, `Button`, `Cluster`, `Composer`, `Grid`, `Line`, `Markdown`, `Menu`, `MenuItem`, `Message`, `Navigation`, `Paragraph`, `Popover`, `SourceCard`, `Stack`, `StepList`, `Tag`, `TimeStamp`, `TitleBar`, `Toaster`, `UserImage`, `dismissToast`, `toast`
217
218
 
218
219
  ```tsx
219
220
  'use client';
@@ -233,6 +234,7 @@ import UserImage from 'oneslash-design-system/components/userImage';
233
234
  import TimeStamp from 'oneslash-design-system/components/timeStamp';
234
235
  import Tag from 'oneslash-design-system/components/tag';
235
236
  import Paragraph from 'oneslash-design-system/components/paragraph';
237
+ import Markdown from 'oneslash-design-system/components/markdown';
236
238
  import SourceCard from 'oneslash-design-system/components/sourceCard';
237
239
  import Composer from 'oneslash-design-system/components/composer';
238
240
  import StepList from 'oneslash-design-system/components/stepList';
@@ -246,7 +248,14 @@ const all = `All ${workspaces.length} Workspaces`;
246
248
 
247
249
  const question = { from: me, at: new Date('2026-11-16T14:40:00Z'), text: 'Who owns the press kit for the launch?' };
248
250
  const answeredAt = new Date('2026-11-16T14:41:00Z');
249
- const answer = 'Mia Park owns the press kit. Ben Carter handed it to her in #launch on Nov 12, 2026, and the launch plan lists her as its owner. It is due Nov 19, 2026.';
251
+ // The agent writes markdown. Markdown sets it in ODS parts, so no mark shows as raw text.
252
+ const answer = [
253
+ '**Mia Park** owns the press kit. Here is how it came to her:',
254
+ '',
255
+ '1. Ben Carter handed it to her in #launch on Nov 12, 2026.',
256
+ '2. The [launch plan](https://acme.example/docs/launch-plan) lists her as its owner.',
257
+ '3. It is due Nov 19, 2026.',
258
+ ].join('\n');
250
259
 
251
260
  type Kind = 'chat' | 'docs' | 'tasks';
252
261
  const kinds = {
@@ -449,7 +458,7 @@ export default function AskPageAnswered() {
449
458
  </Stack>
450
459
  }
451
460
  >
452
- <Paragraph measure="none">{answer}</Paragraph>
461
+ <Markdown id="ask-page-answered-answer" text={answer} headingLevel={3} />
453
462
  </Message>
454
463
  {turns.map((t) => {
455
464
  const place = t.scope ?? `all ${workspaces.length} of your workspaces`;
@@ -25,9 +25,9 @@ var isAdmin = true;
25
25
  // A real app reads this from the server: set when the last payment failed.
26
26
  var failedPayment = { fixBy: 'Nov 30, 2026' };
27
27
  var invoices = [
28
- { id: 'inv-0', date: 'Nov 1, 2026', amount: 24, status: 'Paid' },
29
- { id: 'inv-1', date: 'Oct 1, 2026', amount: 24, status: 'Paid' },
30
- { id: 'inv-2', date: 'Sep 1, 2026', amount: 24, status: 'Paid' },
28
+ { id: 'inv-0', kind: 'charge', date: 'Nov 1, 2026', amount: 24, status: 'Paid' },
29
+ { id: 'ref-1', kind: 'refund', date: 'Oct 16, 2026', amount: -12, status: 'Issued' },
30
+ { id: 'inv-1', kind: 'charge', date: 'Oct 1, 2026', amount: 24, status: 'Paid' },
31
31
  ];
32
32
  export default function BillingPageSelfServe() {
33
33
  var _a = useState(false), canceling = _a[0], setCanceling = _a[1];
@@ -108,7 +108,7 @@ export default function BillingPageSelfServe() {
108
108
  <TableCell><Tag variant="textOnly" size="small" label={inv.status}/></TableCell>
109
109
  <TableCell width="130px">
110
110
  {/* A real app links to the file on its own server. */}
111
- <Button size="small" type="tertiary" state="enabled" label="Download" aria-label={"Download invoice for ".concat(inv.date, ", opens in a new tab")} actionIcon="ExternalLink" href={"https://acme.example/invoices/".concat(inv.id, ".pdf")} openInNewTab/>
111
+ <Button size="small" type="tertiary" state="enabled" label="Download" aria-label={"Download ".concat(inv.kind === 'refund' ? 'refund' : 'invoice', " for ").concat(inv.date, ", opens in a new tab")} actionIcon="ExternalLink" href={"https://acme.example/invoices/".concat(inv.id, ".pdf")} openInNewTab/>
112
112
  </TableCell>
113
113
  </TableRow>); })}
114
114
  </TableContainer>
@@ -0,0 +1 @@
1
+ export default function BillingPageTrial(): import("react").JSX.Element;
@@ -0,0 +1,115 @@
1
+ 'use client';
2
+ import { useEffect, useRef, useState } from 'react';
3
+ import Modal from '../../components/modal';
4
+ import Surface from '../../components/surface';
5
+ import Heading from '../../components/heading';
6
+ import Paragraph from '../../components/paragraph';
7
+ import Progress from '../../components/progress';
8
+ import Tag from '../../components/tag';
9
+ import Button from '../../components/button';
10
+ import EmptyBox from '../../components/emptyBox';
11
+ import SettingsSection from '../../components/settingsSection';
12
+ import TitleBar from '../../components/titleBar';
13
+ import { formatMoney } from '../../components/formatNumber';
14
+ import { Center, Cluster, Stack } from '../../components/layout';
15
+ // A real app passes the router from its framework, such as Next's useRouter().
16
+ var router = { push: function (url) { return console.info("Go to ".concat(url)); } };
17
+ // A real app reads these from the server. The price and the members match the case 'Plan picker'.
18
+ var members = 3;
19
+ var pricePerMember = 8;
20
+ var trialEnds = 'Dec 1, 2026';
21
+ // A real app reads this from the server: null when no card is on file.
22
+ var card = 'Visa ending in 4821';
23
+ export default function BillingPageTrial() {
24
+ var _a = useState(true), trial = _a[0], setTrial = _a[1];
25
+ var _b = useState(false), confirmOpen = _b[0], setConfirmOpen = _b[1];
26
+ var _c = useState(false), busy = _c[0], setBusy = _c[1];
27
+ var timer = useRef();
28
+ var planHeading = useRef(null);
29
+ // Where focus goes after the next render, once the element it goes to is on screen.
30
+ var focusNext = useRef();
31
+ // Stops the request if the example goes away before it ends.
32
+ useEffect(function () { return function () { return clearTimeout(timer.current); }; }, []);
33
+ useEffect(function () {
34
+ var move = focusNext.current;
35
+ focusNext.current = undefined;
36
+ move === null || move === void 0 ? void 0 : move();
37
+ });
38
+ // Escape, a click outside and Cancel all close it, except while the request runs.
39
+ function handleClose() {
40
+ if (busy)
41
+ return;
42
+ setConfirmOpen(false);
43
+ }
44
+ // Stands in for the request to the server. End Trial is gone after it, so focus goes to the plan, which now reads Free.
45
+ function endTrial() {
46
+ if (busy)
47
+ return;
48
+ setBusy(true);
49
+ timer.current = setTimeout(function () {
50
+ setBusy(false);
51
+ setConfirmOpen(false);
52
+ setTrial(false);
53
+ focusNext.current = function () { var _a; return (_a = planHeading.current) === null || _a === void 0 ? void 0 : _a.focus({ preventScroll: true }); };
54
+ }, 1200);
55
+ }
56
+ return (<Center width="page">
57
+ <Stack gap="xlarge">
58
+ <TitleBar title="Billing"/>
59
+ <SettingsSection id="billing-page-trial-plan" title="Plan" description="What Acme pays for.">
60
+ {trial ? (<Stack gap="small">
61
+ <Cluster gap="small">
62
+ <Heading ref={planHeading} tabIndex={-1} level={3} size="h6">Pro</Heading>
63
+ <Tag variant="dot" size="small" label="Trial"/>
64
+ </Cluster>
65
+ <Paragraph size="body2" measure="none">{"Acme is on a free trial of Pro until ".concat(trialEnds, ".")}</Paragraph>
66
+ {/* The day it ends, the amount then, and how it is counted. */}
67
+ <Paragraph size="body2" measure="none">
68
+ {"Then Acme pays ".concat(formatMoney(members * pricePerMember), " each month: ").concat(members, " members at ").concat(formatMoney(pricePerMember), " per member per month.")}
69
+ </Paragraph>
70
+ {card && (<Paragraph tone="secondary" size="body2" measure="none">{"Your card is charged ".concat(formatMoney(members * pricePerMember), " on ").concat(trialEnds, ".")}</Paragraph>)}
71
+ </Stack>) : (<Stack gap="small">
72
+ <Heading ref={planHeading} tabIndex={-1} level={3} size="h6">Free</Heading>
73
+ <Paragraph size="body2" measure="none">{"".concat(formatMoney(0), " per month")}</Paragraph>
74
+ <Paragraph tone="secondary" size="body2" measure="none">The trial ended. Nothing was charged.</Paragraph>
75
+ </Stack>)}
76
+ <Cluster gap="small">
77
+ {!trial ? (<Button size="small" type="secondary" state="enabled" label="Change Plan" onClickButton={function () { return router.push('/settings/billing/plans'); }}/>) : card ? (<Button size="small" type="tertiary" state="enabled" label="End Trial" onClickButton={function () { return setConfirmOpen(true); }}/>) : (
78
+ // A real app hands off to its payment provider's own page here. The page never takes card details.
79
+ <Button size="small" type="primary" state="enabled" label="Add Payment Method" aria-label="Add payment method, opens in a new tab" actionIcon="ExternalLink" href="https://acme.example/billing/payment-method" openInNewTab/>)}
80
+ </Cluster>
81
+ </SettingsSection>
82
+ <SettingsSection id="billing-page-trial-usage" title="Usage" description="This month.">
83
+ <Stack gap="medium">
84
+ <Progress label="AI agent responses" value={312} max={1000} unit="responses"/>
85
+ <Paragraph tone="secondary" size="body2" measure="none">Resets on Dec 1.</Paragraph>
86
+ <Progress label="Members" value={members} max={null} unit="members"/>
87
+ </Stack>
88
+ </SettingsSection>
89
+ <SettingsSection id="billing-page-trial-payment" title="Payment method" description="Pays for Acme's plan.">
90
+ {card ? (<Surface padding="small">
91
+ <Cluster justify="between" gap="medium">
92
+ <Stack gap="small">
93
+ <Paragraph measure="none">{card}</Paragraph>
94
+ <Paragraph tone="secondary" size="body2" measure="none">Expires 08/28</Paragraph>
95
+ </Stack>
96
+ {/* A real app hands off to its payment provider's own page here. */}
97
+ <Button size="small" type="tertiary" state="enabled" label="Update" aria-label={"Update ".concat(card, ", opens in a new tab")} actionIcon="ExternalLink" href="https://acme.example/billing/payment-method" openInNewTab/>
98
+ </Cluster>
99
+ </Surface>) : (<Paragraph measure="none">No payment method.</Paragraph>)}
100
+ </SettingsSection>
101
+ <SettingsSection id="billing-page-trial-invoices" title="Invoices" description="The last three.">
102
+ {/* A trial has paid nothing yet. The line says when the first invoice arrives. */}
103
+ <EmptyBox size="small" text="No invoices yet" secondText="Your first invoice appears here after your first payment."/>
104
+ </SettingsSection>
105
+ </Stack>
106
+ <Modal isOpen={confirmOpen} size="small" title="End Trial" onClose={handleClose} actions={<>
107
+ {/* 'Cancel' comes first, as in every confirm. */}
108
+ <Button size="small" type="tertiary" state={busy ? 'disabled' : 'enabled'} label="Cancel" onClickButton={handleClose}/>
109
+ <Button size="small" type="primary" state="enabled" label="End Trial" loading={busy} onClickButton={endTrial}/>
110
+ </>}>
111
+ <Paragraph measure="none">Acme moves to Free now. Nothing is charged.</Paragraph>
112
+ <Paragraph tone="secondary" size="body2" measure="none">Its members and messages stay.</Paragraph>
113
+ </Modal>
114
+ </Center>);
115
+ }
@@ -17,6 +17,10 @@ A workspace pays for a plan. One page says what it pays for, what it has used, h
17
17
  - Say who pays and where for a plan billed elsewhere: 'Ben Carter pays for this plan through an app store.' Say who can change it.
18
18
  - Leave out every control, price, card and invoice on a plan billed elsewhere.
19
19
  - Show a status as the case 'Status in a row' says: 'Past due' and 'Canceling' as dots, 'Paid' as text.
20
+ - Say the day a trial ends and the amount charged then, with how it is counted.
21
+ - Show a trial as a grey dot `Tag` 'Trial' by the plan name, as the case 'Status in a row' says. Then say 'Acme is on a free trial of Pro until Dec 1, 2026.' and 'Then Acme pays $24.00 each month: 3 members at $8.00 per member per month.'
22
+ - Offer a primary 'Add Payment Method' when a trial has no card. With a card, say 'Your card is charged $24.00 on Dec 1, 2026.' and offer a tertiary 'End Trial'.
23
+ - Confirm 'End Trial' in a small `Modal` titled 'End Trial': 'Acme moves to Free now. Nothing is charged.' 'Cancel' comes first, as the rule 'A confirm says exactly what will happen' says.
20
24
 
21
25
  ## Don't
22
26
 
@@ -24,9 +28,10 @@ A workspace pays for a plan. One page says what it pays for, what it has used, h
24
28
  - Do not show Change Plan, Update or End Plan to someone who cannot use them. Show the text and the line that says who can.
25
29
  - Do not leave a failed payment without the date it must be fixed by.
26
30
  - Do not end the plan on the first click. Ask in a Modal first.
27
- - Do not name the action 'Cancel Plan'. It would sit beside 'Cancel' in the confirm.
31
+ - Do not name the action 'Cancel Plan' or 'Cancel Trial'. It would sit beside 'Cancel' in the confirm.
28
32
  - Do not show a plan billed elsewhere with a 'Change Plan' Button that does nothing. Say where to change it.
29
33
  - Do not write 'Canceled' for a plan that is still on. Say 'Canceling' and when it ends.
34
+ - Do not say 'Your trial ends soon' with no date or no amount.
30
35
 
31
36
  ## Option: An admin pays here
32
37
 
@@ -66,9 +71,9 @@ const isAdmin = true;
66
71
  const failedPayment: { fixBy: string } | null = { fixBy: 'Nov 30, 2026' };
67
72
 
68
73
  const invoices = [
69
- { id: 'inv-0', date: 'Nov 1, 2026', amount: 24, status: 'Paid' },
70
- { id: 'inv-1', date: 'Oct 1, 2026', amount: 24, status: 'Paid' },
71
- { id: 'inv-2', date: 'Sep 1, 2026', amount: 24, status: 'Paid' },
74
+ { id: 'inv-0', kind: 'charge', date: 'Nov 1, 2026', amount: 24, status: 'Paid' },
75
+ { id: 'ref-1', kind: 'refund', date: 'Oct 16, 2026', amount: -12, status: 'Issued' },
76
+ { id: 'inv-1', kind: 'charge', date: 'Oct 1, 2026', amount: 24, status: 'Paid' },
72
77
  ];
73
78
 
74
79
  export default function BillingPageSelfServe() {
@@ -165,7 +170,7 @@ export default function BillingPageSelfServe() {
165
170
  <TableCell><Tag variant="textOnly" size="small" label={inv.status} /></TableCell>
166
171
  <TableCell width="130px">
167
172
  {/* A real app links to the file on its own server. */}
168
- <Button size="small" type="tertiary" state="enabled" label="Download" aria-label={`Download invoice for ${inv.date}, opens in a new tab`} actionIcon="ExternalLink" href={`https://acme.example/invoices/${inv.id}.pdf`} openInNewTab />
173
+ <Button size="small" type="tertiary" state="enabled" label="Download" aria-label={`Download ${inv.kind === 'refund' ? 'refund' : 'invoice'} for ${inv.date}, opens in a new tab`} actionIcon="ExternalLink" href={`https://acme.example/invoices/${inv.id}.pdf`} openInNewTab />
169
174
  </TableCell>
170
175
  </TableRow>
171
176
  ))}
@@ -242,6 +247,162 @@ export default function BillingPageBilledElsewhere() {
242
247
  }
243
248
  ```
244
249
 
250
+ ## Option: A free trial
251
+
252
+ Use when: The workspace is in a free trial of a paid plan.
253
+
254
+ Uses: `Button`, `Center`, `Cluster`, `EmptyBox`, `Heading`, `Modal`, `Paragraph`, `Progress`, `SettingsSection`, `Stack`, `Surface`, `Tag`, `TitleBar`, `formatMoney`
255
+
256
+ ```tsx
257
+ 'use client';
258
+ import { useEffect, useRef, useState } from 'react';
259
+ import Modal from 'oneslash-design-system/components/modal';
260
+ import Surface from 'oneslash-design-system/components/surface';
261
+ import Heading from 'oneslash-design-system/components/heading';
262
+ import Paragraph from 'oneslash-design-system/components/paragraph';
263
+ import Progress from 'oneslash-design-system/components/progress';
264
+ import Tag from 'oneslash-design-system/components/tag';
265
+ import Button from 'oneslash-design-system/components/button';
266
+ import EmptyBox from 'oneslash-design-system/components/emptyBox';
267
+ import SettingsSection from 'oneslash-design-system/components/settingsSection';
268
+ import TitleBar from 'oneslash-design-system/components/titleBar';
269
+ import { formatMoney } from 'oneslash-design-system/components/formatNumber';
270
+ import { Center, Cluster, Stack } from 'oneslash-design-system/components/layout';
271
+
272
+ // A real app passes the router from its framework, such as Next's useRouter().
273
+ const router = { push: (url: string) => console.info(`Go to ${url}`) };
274
+
275
+ // A real app reads these from the server. The price and the members match the case 'Plan picker'.
276
+ const members = 3;
277
+ const pricePerMember = 8;
278
+ const trialEnds = 'Dec 1, 2026';
279
+
280
+ // A real app reads this from the server: null when no card is on file.
281
+ const card: string | null = 'Visa ending in 4821';
282
+
283
+ export default function BillingPageTrial() {
284
+ const [trial, setTrial] = useState(true);
285
+ const [confirmOpen, setConfirmOpen] = useState(false);
286
+ const [busy, setBusy] = useState(false);
287
+ const timer = useRef<ReturnType<typeof setTimeout>>();
288
+ const planHeading = useRef<HTMLHeadingElement>(null);
289
+ // Where focus goes after the next render, once the element it goes to is on screen.
290
+ const focusNext = useRef<() => void>();
291
+
292
+ // Stops the request if the example goes away before it ends.
293
+ useEffect(() => () => clearTimeout(timer.current), []);
294
+
295
+ useEffect(() => {
296
+ const move = focusNext.current;
297
+ focusNext.current = undefined;
298
+ move?.();
299
+ });
300
+
301
+ // Escape, a click outside and Cancel all close it, except while the request runs.
302
+ function handleClose() {
303
+ if (busy) return;
304
+ setConfirmOpen(false);
305
+ }
306
+
307
+ // Stands in for the request to the server. End Trial is gone after it, so focus goes to the plan, which now reads Free.
308
+ function endTrial() {
309
+ if (busy) return;
310
+ setBusy(true);
311
+ timer.current = setTimeout(() => {
312
+ setBusy(false);
313
+ setConfirmOpen(false);
314
+ setTrial(false);
315
+ focusNext.current = () => planHeading.current?.focus({ preventScroll: true });
316
+ }, 1200);
317
+ }
318
+
319
+ return (
320
+ <Center width="page">
321
+ <Stack gap="xlarge">
322
+ <TitleBar title="Billing" />
323
+ <SettingsSection id="billing-page-trial-plan" title="Plan" description="What Acme pays for.">
324
+ {trial ? (
325
+ <Stack gap="small">
326
+ <Cluster gap="small">
327
+ <Heading ref={planHeading} tabIndex={-1} level={3} size="h6">Pro</Heading>
328
+ <Tag variant="dot" size="small" label="Trial" />
329
+ </Cluster>
330
+ <Paragraph size="body2" measure="none">{`Acme is on a free trial of Pro until ${trialEnds}.`}</Paragraph>
331
+ {/* The day it ends, the amount then, and how it is counted. */}
332
+ <Paragraph size="body2" measure="none">
333
+ {`Then Acme pays ${formatMoney(members * pricePerMember)} each month: ${members} members at ${formatMoney(pricePerMember)} per member per month.`}
334
+ </Paragraph>
335
+ {card && (
336
+ <Paragraph tone="secondary" size="body2" measure="none">{`Your card is charged ${formatMoney(members * pricePerMember)} on ${trialEnds}.`}</Paragraph>
337
+ )}
338
+ </Stack>
339
+ ) : (
340
+ <Stack gap="small">
341
+ <Heading ref={planHeading} tabIndex={-1} level={3} size="h6">Free</Heading>
342
+ <Paragraph size="body2" measure="none">{`${formatMoney(0)} per month`}</Paragraph>
343
+ <Paragraph tone="secondary" size="body2" measure="none">The trial ended. Nothing was charged.</Paragraph>
344
+ </Stack>
345
+ )}
346
+ <Cluster gap="small">
347
+ {!trial ? (
348
+ <Button size="small" type="secondary" state="enabled" label="Change Plan" onClickButton={() => router.push('/settings/billing/plans')} />
349
+ ) : card ? (
350
+ <Button size="small" type="tertiary" state="enabled" label="End Trial" onClickButton={() => setConfirmOpen(true)} />
351
+ ) : (
352
+ // A real app hands off to its payment provider's own page here. The page never takes card details.
353
+ <Button size="small" type="primary" state="enabled" label="Add Payment Method" aria-label="Add payment method, opens in a new tab" actionIcon="ExternalLink" href="https://acme.example/billing/payment-method" openInNewTab />
354
+ )}
355
+ </Cluster>
356
+ </SettingsSection>
357
+ <SettingsSection id="billing-page-trial-usage" title="Usage" description="This month.">
358
+ <Stack gap="medium">
359
+ <Progress label="AI agent responses" value={312} max={1000} unit="responses" />
360
+ <Paragraph tone="secondary" size="body2" measure="none">Resets on Dec 1.</Paragraph>
361
+ <Progress label="Members" value={members} max={null} unit="members" />
362
+ </Stack>
363
+ </SettingsSection>
364
+ <SettingsSection id="billing-page-trial-payment" title="Payment method" description="Pays for Acme's plan.">
365
+ {card ? (
366
+ <Surface padding="small">
367
+ <Cluster justify="between" gap="medium">
368
+ <Stack gap="small">
369
+ <Paragraph measure="none">{card}</Paragraph>
370
+ <Paragraph tone="secondary" size="body2" measure="none">Expires 08/28</Paragraph>
371
+ </Stack>
372
+ {/* A real app hands off to its payment provider's own page here. */}
373
+ <Button size="small" type="tertiary" state="enabled" label="Update" aria-label={`Update ${card}, opens in a new tab`} actionIcon="ExternalLink" href="https://acme.example/billing/payment-method" openInNewTab />
374
+ </Cluster>
375
+ </Surface>
376
+ ) : (
377
+ <Paragraph measure="none">No payment method.</Paragraph>
378
+ )}
379
+ </SettingsSection>
380
+ <SettingsSection id="billing-page-trial-invoices" title="Invoices" description="The last three.">
381
+ {/* A trial has paid nothing yet. The line says when the first invoice arrives. */}
382
+ <EmptyBox size="small" text="No invoices yet" secondText="Your first invoice appears here after your first payment." />
383
+ </SettingsSection>
384
+ </Stack>
385
+ <Modal
386
+ isOpen={confirmOpen}
387
+ size="small"
388
+ title="End Trial"
389
+ onClose={handleClose}
390
+ actions={
391
+ <>
392
+ {/* 'Cancel' comes first, as in every confirm. */}
393
+ <Button size="small" type="tertiary" state={busy ? 'disabled' : 'enabled'} label="Cancel" onClickButton={handleClose} />
394
+ <Button size="small" type="primary" state="enabled" label="End Trial" loading={busy} onClickButton={endTrial} />
395
+ </>
396
+ }
397
+ >
398
+ <Paragraph measure="none">Acme moves to Free now. Nothing is charged.</Paragraph>
399
+ <Paragraph tone="secondary" size="body2" measure="none">Its members and messages stay.</Paragraph>
400
+ </Modal>
401
+ </Center>
402
+ );
403
+ }
404
+ ```
405
+
245
406
  ## Native
246
407
 
247
408
  On Apple a plan bought in the app is managed in the system subscription sheet. Show who pays and open that sheet from one Button, never a card form.
@@ -64,7 +64,7 @@ export default function CollapsibleSearchPopover() {
64
64
  <EmptyBox size="large" icon="Search" text={"No invoices match \"".concat(words, "\"")} secondText="Check the spelling, or search for fewer words." action={<Button size="medium" type="secondary" state="enabled" label="Clear Search" onClickButton={clearSearch}/>}/>
65
65
  </Surface>)}
66
66
  </Stack>
67
- <Popover open={open} anchorEl={anchor} onClose={function () { return setOpen(false); }} returnFocus>
67
+ <Popover open={open} anchorEl={anchor} onClose={function () { return setOpen(false); }} returnFocus aria-label="Search">
68
68
  {/* Menu gives the Popover its surface and a width. It holds a field here, not items. */}
69
69
  <Menu width={288}>
70
70
  <TextField id="collapsible-search-query" type="search" size="small" autoFocus aria-label="Search invoices" placeholder="Search invoices" value={query} onChange={function (e) { return setQuery(e.target.value); }} onKeyDown={keyDown}/>
@@ -4,7 +4,7 @@ A person filters a list by a word, and the list should keep its room when they a
4
4
 
5
5
  ## Do
6
6
 
7
- - Use an `IconButton` with `iconName="Search"` beside the list's heading, and open a `<Popover returnFocus>` with a search `TextField` from it.
7
+ - Use an `IconButton` with `iconName="Search"` beside the list's heading, and open a `<Popover returnFocus aria-label="Search">` with a search `TextField` from it.
8
8
  - Keep the words in the page, not in the Popover. The list stays filtered while the Popover is closed.
9
9
  - Show that a search is on: `color="secondary"` on the button, and a line such as '2 of 5 invoices match "north".'.
10
10
  - Say the current search in the button's `ariaLabel`: 'Search: north'. It is plain 'Search' when no search is on.
@@ -117,7 +117,7 @@ export default function CollapsibleSearchPopover() {
117
117
  </Surface>
118
118
  )}
119
119
  </Stack>
120
- <Popover open={open} anchorEl={anchor} onClose={() => setOpen(false)} returnFocus>
120
+ <Popover open={open} anchorEl={anchor} onClose={() => setOpen(false)} returnFocus aria-label="Search">
121
121
  {/* Menu gives the Popover its surface and a width. It holds a field here, not items. */}
122
122
  <Menu width={288}>
123
123
  <TextField
@@ -0,0 +1 @@
1
+ export default function CookieChoiceBanner(): import("react").JSX.Element;