oneslash-design-system 2.24.0 → 2.26.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 (91) 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/on-this-page.md +2 -0
  34. package/dist/cases/people-row/stack.jsx +1 -1
  35. package/dist/cases/people-row.md +2 -2
  36. package/dist/cases/plan-comparison/table.d.ts +1 -0
  37. package/dist/cases/plan-comparison/table.jsx +47 -0
  38. package/dist/cases/plan-comparison.md +94 -0
  39. package/dist/cases/plan-picker.md +1 -0
  40. package/dist/cases/pricing-section.md +1 -1
  41. package/dist/cases/site-footer/columns.jsx +2 -1
  42. package/dist/cases/site-footer.md +3 -1
  43. package/dist/cases/stat-row/tiles.jsx +2 -1
  44. package/dist/cases/stat-row.md +4 -1
  45. package/dist/cases/task-header/agent-sets-status.jsx +1 -1
  46. package/dist/cases/task-header/people-change-status.jsx +1 -1
  47. package/dist/cases/task-header.md +2 -2
  48. package/dist/cases.json +245 -28
  49. package/dist/components/alert.d.ts +3 -1
  50. package/dist/components/alert.jsx +5 -5
  51. package/dist/components/barChart.jsx +4 -2
  52. package/dist/components/dateField.jsx +1 -1
  53. package/dist/components/formatNumber.d.ts +10 -2
  54. package/dist/components/formatNumber.js +44 -9
  55. package/dist/components/layout.d.ts +4 -2
  56. package/dist/components/layout.jsx +13 -2
  57. package/dist/components/markdown.d.ts +24 -0
  58. package/dist/components/markdown.jsx +81 -0
  59. package/dist/components/onThisPage.d.ts +14 -3
  60. package/dist/components/onThisPage.jsx +72 -8
  61. package/dist/components/pageShell.d.ts +3 -3
  62. package/dist/components/pageShell.jsx +6 -5
  63. package/dist/components/popover.d.ts +5 -1
  64. package/dist/components/popover.jsx +3 -2
  65. package/dist/components/progress.jsx +1 -1
  66. package/dist/components/select.jsx +5 -2
  67. package/dist/components/statTile.d.ts +1 -1
  68. package/dist/components/statTile.jsx +7 -2
  69. package/dist/components/tableCell.d.ts +4 -3
  70. package/dist/components/tableCell.jsx +2 -2
  71. package/dist/components/toaster.jsx +81 -11
  72. package/dist/index.d.ts +1 -0
  73. package/dist/index.js +1 -0
  74. package/dist/internal/markdown.d.ts +40 -0
  75. package/dist/internal/markdown.js +577 -0
  76. package/dist/internal/toaster.d.ts +2 -0
  77. package/dist/internal/toaster.js +8 -0
  78. package/dist/native-mapping.json +9 -3
  79. package/dist/stories/Cases.generated.stories.d.ts +6 -0
  80. package/dist/stories/Cases.generated.stories.jsx +12 -0
  81. package/dist/stories/Markdown.stories.d.ts +9 -0
  82. package/dist/stories/Markdown.stories.jsx +66 -0
  83. package/dist/stories/OnThisPage.stories.d.ts +1 -0
  84. package/dist/stories/OnThisPage.stories.jsx +11 -0
  85. package/dist/stories/Popover.stories.d.ts +2 -0
  86. package/dist/stories/Popover.stories.jsx +33 -0
  87. package/dist/stories/StatTile.stories.d.ts +4 -0
  88. package/dist/stories/StatTile.stories.jsx +47 -2
  89. package/dist/stories/Toaster.stories.d.ts +4 -0
  90. package/dist/stories/Toaster.stories.jsx +30 -0
  91. package/package.json +1 -1
@@ -21,6 +21,7 @@ An admin compares the plans a workspace can be on and chooses one.
21
21
  - Do not add a monthly and yearly switch when no plan bills yearly.
22
22
  - Do not change a Button label to show it is busy, such as to 'Checking...'.
23
23
  - Do not charge or change the plan from this page. The confirm does that.
24
+ - Do not change a price or a limit here without changing it in the cases 'Pricing section' and 'Plan comparison' too.
24
25
 
25
26
  ## Option: Cards side by side
26
27
 
@@ -18,7 +18,7 @@ A visitor to the public site compares the plans and signs up for one.
18
18
  - Do not name a Button 'Get Started', 'Choose' or 'Select'. Name the plan it signs up for.
19
19
  - Do not open the sign-up page in a new tab.
20
20
  - Do not give two plans a primary Button.
21
- - Do not change a price or a limit here without changing it in the case 'Plan picker' too. A visitor sees one set of plans.
21
+ - Do not change a price or a limit here without changing it in the cases 'Plan picker' and 'Plan comparison' too. A visitor sees one set of plans.
22
22
  - Do not make a card clickable as a whole. Its Button is the one control.
23
23
 
24
24
  ## Example: Plan cards side by side
@@ -25,7 +25,8 @@ var columns = [
25
25
  title: 'Follow',
26
26
  links: [
27
27
  { label: 'GitHub', href: 'https://github.com/acme/acme', external: true },
28
- { label: 'Newsletter', href: 'https://acme.example/newsletter', external: true },
28
+ // The page with the sign-up form of the case 'Newsletter sign-up'. The footer holds the link, not the form.
29
+ { label: 'Newsletter', href: '#newsletter' },
29
30
  ],
30
31
  },
31
32
  {
@@ -10,6 +10,7 @@ A person reaches the end of a site's page and looks for the pages that are not i
10
10
  - Put the legal line last, in `legal`: the year and the name, and the license if there is one, such as '© 2026 Acme. Released under the MIT License.'
11
11
  - Mark a link to another site with `external`. It opens in a new tab and the icon and the hidden words '(opens in a new tab)' say so.
12
12
  - Keep the footer to links and the legal line. It holds every page the header leaves out, in plain words.
13
+ - Put a newsletter sign-up above the footer, as the case 'Newsletter sign-up' says. The footer holds only its link.
13
14
 
14
15
  ## Don't
15
16
 
@@ -95,7 +96,8 @@ const columns = [
95
96
  title: 'Follow',
96
97
  links: [
97
98
  { label: 'GitHub', href: 'https://github.com/acme/acme', external: true },
98
- { label: 'Newsletter', href: 'https://acme.example/newsletter', external: true },
99
+ // The page with the sign-up form of the case 'Newsletter sign-up'. The footer holds the link, not the form.
100
+ { label: 'Newsletter', href: '#newsletter' },
99
101
  ],
100
102
  },
101
103
  {
@@ -25,7 +25,8 @@ export default function StatRowTiles() {
25
25
  {/* Four tiles at most. Two across on a phone, four from md up. Each counts one thing over the same range. */}
26
26
  <Grid compact columns={4}>
27
27
  <StatTile label="New comments" value={1240} previous={1106} loading={loading}/>
28
- <StatTile label="Marked done" value={312} previous={280} loading={loading}/>
28
+ {/* A percent is a fraction, and so is its previous value. The change reads in points: 'Up 3 pts'. */}
29
+ <StatTile label="Share marked done" value={0.25} format="percent" previous={0.22} loading={loading}/>
29
30
  <StatTile label="People engaged" value={18} previous={18} loading={loading}/>
30
31
  <StatTile label="Average reply time" value={8640000} format="duration" previous={9200000} loading={loading}/>
31
32
  </Grid>
@@ -6,10 +6,12 @@ A page opens with the few numbers that say how things are going, counted over on
6
6
 
7
7
  - Follow the rule 'A number shows its unit and never shows 0 for unknown'. Use `StatTile`, which does.
8
8
  - Put the tiles in `<Grid compact columns={4}>`: two across on a phone, up to four from md up.
9
+ - Give the row `from="lg"` inside an `AppShell`. From md the sidebar takes the room four tiles need.
9
10
  - Use four tiles at most. A fifth number goes in a table.
10
11
  - Make each tile count one thing, with its unit in the label or the `unit` prop: 'New comments', 'Responses'.
11
12
  - Count every tile over the same range, and say the range in the heading above the row: 'This week'.
12
13
  - Pass `previous` and `period` to get the change line, such as 'Up 12% from last week'. Leave `previous` out when there is nothing to compare with.
14
+ - Give a percent tile `previous` as a fraction too. Its change reads in points.
13
15
  - Pass `loading` while the numbers load, so a `Skeleton` holds each place. Pass `value={null}` when there is no data: the tile says 'No data yet'.
14
16
  - Pass `format` for money, a percent, a size or a time, such as `format="money"`. Do not format a number by hand.
15
17
  - Give the one number that matters most `size="large"` and a row of its own, with the others under it.
@@ -60,7 +62,8 @@ export default function StatRowTiles() {
60
62
  {/* Four tiles at most. Two across on a phone, four from md up. Each counts one thing over the same range. */}
61
63
  <Grid compact columns={4}>
62
64
  <StatTile label="New comments" value={1240} previous={1106} loading={loading} />
63
- <StatTile label="Marked done" value={312} previous={280} loading={loading} />
65
+ {/* A percent is a fraction, and so is its previous value. The change reads in points: 'Up 3 pts'. */}
66
+ <StatTile label="Share marked done" value={0.25} format="percent" previous={0.22} loading={loading} />
64
67
  <StatTile label="People engaged" value={18} previous={18} loading={loading} />
65
68
  <StatTile label="Average reply time" value={8_640_000} format="duration" previous={9_200_000} loading={loading} />
66
69
  </Grid>
@@ -136,7 +136,7 @@ export default function TaskHeaderAgentSetsStatus() {
136
136
  </>}/>
137
137
  <Paragraph tone="secondary" measure="none">Acme Agent sets the status as the work moves. It is updating the home page, and Omar Reyes is writing the copy.</Paragraph>
138
138
  </Stack>
139
- <Popover id="task-header-agent-people" open={peopleAnchor !== null} anchorEl={peopleAnchor} onClose={function () { return setPeopleAnchor(null); }} returnFocus>
139
+ <Popover id="task-header-agent-people" open={peopleAnchor !== null} anchorEl={peopleAnchor} onClose={function () { return setPeopleAnchor(null); }} returnFocus aria-label={"People on ".concat(task)}>
140
140
  <List items={people.map(function (p) { return "".concat(p.name, ", ").concat(p.role); })}/>
141
141
  </Popover>
142
142
  <Popover id="task-header-agent-more" open={moreOpen} anchorEl={moreAnchor} onClose={function () { return setMoreOpen(false); }} returnFocus>
@@ -151,7 +151,7 @@ export default function TaskHeaderPeopleChangeStatus() {
151
151
  {statuses.map(function (s) { return (<MenuItem key={s.id} size="small" label={s.label} isSelected={s.id === status} onClick={function () { return chooseStatus(s.id); }}/>); })}
152
152
  </Menu>
153
153
  </Popover>
154
- <Popover id="task-header-people" open={peopleAnchor !== null} anchorEl={peopleAnchor} onClose={function () { return setPeopleAnchor(null); }} returnFocus>
154
+ <Popover id="task-header-people" open={peopleAnchor !== null} anchorEl={peopleAnchor} onClose={function () { return setPeopleAnchor(null); }} returnFocus aria-label={"People on ".concat(task)}>
155
155
  <List items={people.map(function (p) { return "".concat(p.name, ", ").concat(p.role); })}/>
156
156
  </Popover>
157
157
  <Popover id="task-header-more" open={moreOpen} anchorEl={moreAnchor} onClose={function () { return setMoreOpen(false); }} returnFocus>
@@ -276,7 +276,7 @@ export default function TaskHeaderPeopleChangeStatus() {
276
276
  ))}
277
277
  </Menu>
278
278
  </Popover>
279
- <Popover id="task-header-people" open={peopleAnchor !== null} anchorEl={peopleAnchor} onClose={() => setPeopleAnchor(null)} returnFocus>
279
+ <Popover id="task-header-people" open={peopleAnchor !== null} anchorEl={peopleAnchor} onClose={() => setPeopleAnchor(null)} returnFocus aria-label={`People on ${task}`}>
280
280
  <List items={people.map((p) => `${p.name}, ${p.role}`)} />
281
281
  </Popover>
282
282
  <Popover id="task-header-more" open={moreOpen} anchorEl={moreAnchor} onClose={() => setMoreOpen(false)} returnFocus>
@@ -532,7 +532,7 @@ export default function TaskHeaderAgentSetsStatus() {
532
532
  />
533
533
  <Paragraph tone="secondary" measure="none">Acme Agent sets the status as the work moves. It is updating the home page, and Omar Reyes is writing the copy.</Paragraph>
534
534
  </Stack>
535
- <Popover id="task-header-agent-people" open={peopleAnchor !== null} anchorEl={peopleAnchor} onClose={() => setPeopleAnchor(null)} returnFocus>
535
+ <Popover id="task-header-agent-people" open={peopleAnchor !== null} anchorEl={peopleAnchor} onClose={() => setPeopleAnchor(null)} returnFocus aria-label={`People on ${task}`}>
536
536
  <List items={people.map((p) => `${p.name}, ${p.role}`)} />
537
537
  </Popover>
538
538
  <Popover id="task-header-agent-more" open={moreOpen} anchorEl={moreAnchor} onClose={() => setMoreOpen(false)} returnFocus>