oneslash-design-system 2.16.0 → 2.18.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 (301) hide show
  1. package/README.md +2 -2
  2. package/dist/DESIGN.md +56 -17
  3. package/dist/cases/accept-invite/signed-in.jsx +1 -1
  4. package/dist/cases/accept-invite/signed-out.jsx +1 -1
  5. package/dist/cases/accept-invite.md +3 -7
  6. package/dist/cases/account-menu/menu.d.ts +1 -0
  7. package/dist/cases/account-menu/menu.jsx +99 -0
  8. package/dist/cases/account-menu.md +164 -0
  9. package/dist/cases/agent-asks-before-risky-action.md +0 -4
  10. package/dist/cases/agent-cancels-when-unanswered.md +0 -4
  11. package/dist/cases/agent-options/cards.d.ts +1 -0
  12. package/dist/cases/agent-options/cards.jsx +91 -0
  13. package/dist/cases/agent-options.md +164 -0
  14. package/dist/cases/agent-pending-reply/steps.d.ts +1 -0
  15. package/dist/cases/agent-pending-reply/steps.jsx +149 -0
  16. package/dist/cases/agent-pending-reply/streaming.d.ts +1 -0
  17. package/dist/cases/agent-pending-reply/streaming.jsx +146 -0
  18. package/dist/cases/agent-pending-reply.md +428 -0
  19. package/dist/cases/agent-plan-proposal/changes.d.ts +1 -0
  20. package/dist/cases/agent-plan-proposal/changes.jsx +224 -0
  21. package/dist/cases/agent-plan-proposal/steps.d.ts +1 -0
  22. package/dist/cases/agent-plan-proposal/steps.jsx +211 -0
  23. package/dist/cases/agent-plan-proposal.md +652 -0
  24. package/dist/cases/agent-question/choices.d.ts +1 -0
  25. package/dist/cases/agent-question/choices.jsx +132 -0
  26. package/dist/cases/agent-question/free-text.d.ts +1 -0
  27. package/dist/cases/agent-question/free-text.jsx +81 -0
  28. package/dist/cases/agent-question.md +334 -0
  29. package/dist/cases/agent-refuses-clearly.md +0 -4
  30. package/dist/cases/agent-says-what-it-is.md +0 -2
  31. package/dist/cases/agent-settings/form.d.ts +1 -0
  32. package/dist/cases/agent-settings/form.jsx +164 -0
  33. package/dist/cases/agent-settings.md +259 -0
  34. package/dist/cases/agent-shows-progress.md +0 -2
  35. package/dist/cases/agent-shows-sources.md +2 -4
  36. package/dist/cases/api-keys/list.d.ts +1 -0
  37. package/dist/cases/api-keys/list.jsx +162 -0
  38. package/dist/cases/api-keys.md +229 -0
  39. package/dist/cases/artifact-card/card.d.ts +1 -0
  40. package/dist/cases/artifact-card/card.jsx +45 -0
  41. package/dist/cases/artifact-card.md +99 -0
  42. package/dist/cases/auth-gate-loading.md +0 -4
  43. package/dist/cases/check-your-email.md +0 -4
  44. package/dist/cases/collapsible-search/popover.d.ts +1 -0
  45. package/dist/cases/collapsible-search/popover.jsx +74 -0
  46. package/dist/cases/collapsible-search.md +143 -0
  47. package/dist/cases/composer-limit/notice-with-action.d.ts +1 -0
  48. package/dist/cases/composer-limit/notice-with-action.jsx +87 -0
  49. package/dist/cases/composer-limit/notice.d.ts +1 -0
  50. package/dist/cases/composer-limit/notice.jsx +84 -0
  51. package/dist/cases/composer-limit.md +282 -0
  52. package/dist/cases/confirm-destructive-action.md +0 -4
  53. package/dist/cases/confirm-dialogs.md +0 -4
  54. package/dist/cases/conversation-starters/chips.d.ts +1 -0
  55. package/dist/cases/conversation-starters/chips.jsx +69 -0
  56. package/dist/cases/conversation-starters/none.d.ts +1 -0
  57. package/dist/cases/conversation-starters/none.jsx +45 -0
  58. package/dist/cases/conversation-starters.md +204 -0
  59. package/dist/cases/create-modal.md +0 -4
  60. package/dist/cases/danger-zone/collapsed.d.ts +1 -0
  61. package/dist/cases/danger-zone/collapsed.jsx +75 -0
  62. package/dist/cases/danger-zone/shown.d.ts +1 -0
  63. package/dist/cases/danger-zone/shown.jsx +95 -0
  64. package/dist/cases/danger-zone.md +263 -0
  65. package/dist/cases/device-login.md +0 -4
  66. package/dist/cases/email-confirmed.md +0 -4
  67. package/dist/cases/empty-list.md +0 -4
  68. package/dist/cases/empty-lists.md +0 -4
  69. package/dist/cases/empty-not-set-up.md +0 -4
  70. package/dist/cases/empty-search.md +0 -4
  71. package/dist/cases/error-page.md +0 -4
  72. package/dist/cases/feedback-form.md +0 -4
  73. package/dist/cases/filter-menu/presets.d.ts +1 -0
  74. package/dist/cases/filter-menu/presets.jsx +53 -0
  75. package/dist/cases/filter-menu/with-clear.d.ts +1 -0
  76. package/dist/cases/filter-menu/with-clear.jsx +56 -0
  77. package/dist/cases/filter-menu.md +204 -0
  78. package/dist/cases/forgot-password.md +0 -4
  79. package/dist/cases/form-errors.md +0 -4
  80. package/dist/cases/import-checklist.md +0 -4
  81. package/dist/cases/inline-form-feedback.md +0 -4
  82. package/dist/cases/integrations-list/nested.d.ts +1 -0
  83. package/dist/cases/integrations-list/nested.jsx +164 -0
  84. package/dist/cases/integrations-list/rows.d.ts +1 -0
  85. package/dist/cases/integrations-list/rows.jsx +134 -0
  86. package/dist/cases/integrations-list.md +379 -0
  87. package/dist/cases/invite-member.md +0 -4
  88. package/dist/cases/load-failure.md +0 -4
  89. package/dist/cases/log-out-confirm.md +0 -4
  90. package/dist/cases/login-page.md +0 -4
  91. package/dist/cases/members-list/rows.d.ts +1 -0
  92. package/dist/cases/members-list/rows.jsx +318 -0
  93. package/dist/cases/members-list/table.d.ts +1 -0
  94. package/dist/cases/members-list/table.jsx +351 -0
  95. package/dist/cases/members-list.md +799 -0
  96. package/dist/cases/mention-list/in-composer.d.ts +1 -0
  97. package/dist/cases/mention-list/in-composer.jsx +169 -0
  98. package/dist/cases/mention-list.md +248 -0
  99. package/dist/cases/message-actions/hover-toolbar.d.ts +1 -0
  100. package/dist/cases/message-actions/hover-toolbar.jsx +229 -0
  101. package/dist/cases/message-actions/menu.d.ts +1 -0
  102. package/dist/cases/message-actions/menu.jsx +258 -0
  103. package/dist/cases/message-actions.md +647 -0
  104. package/dist/cases/message-attachments/in-composer.d.ts +1 -0
  105. package/dist/cases/message-attachments/in-composer.jsx +134 -0
  106. package/dist/cases/message-attachments/in-message.d.ts +1 -0
  107. package/dist/cases/message-attachments/in-message.jsx +46 -0
  108. package/dist/cases/message-attachments.md +306 -0
  109. package/dist/cases/message-composer/plain.d.ts +1 -0
  110. package/dist/cases/message-composer/plain.jsx +57 -0
  111. package/dist/cases/message-composer/with-tools.d.ts +1 -0
  112. package/dist/cases/message-composer/with-tools.jsx +182 -0
  113. package/dist/cases/message-composer.md +352 -0
  114. package/dist/cases/message-edit/in-place.d.ts +1 -0
  115. package/dist/cases/message-edit/in-place.jsx +99 -0
  116. package/dist/cases/message-edit.md +175 -0
  117. package/dist/cases/message-reactions/chips.d.ts +1 -0
  118. package/dist/cases/message-reactions/chips.jsx +118 -0
  119. package/dist/cases/message-reactions/quick-pick.d.ts +1 -0
  120. package/dist/cases/message-reactions/quick-pick.jsx +155 -0
  121. package/dist/cases/message-reactions.md +367 -0
  122. package/dist/cases/message-row/grouped.d.ts +1 -0
  123. package/dist/cases/message-row/grouped.jsx +56 -0
  124. package/dist/cases/message-row/person-and-agent.d.ts +1 -0
  125. package/dist/cases/message-row/person-and-agent.jsx +41 -0
  126. package/dist/cases/message-row.md +185 -0
  127. package/dist/cases/not-found-page.md +0 -4
  128. package/dist/cases/notification-menu/menu.d.ts +1 -0
  129. package/dist/cases/notification-menu/menu.jsx +74 -0
  130. package/dist/cases/notification-menu.md +135 -0
  131. package/dist/cases/oauth-consent.md +0 -4
  132. package/dist/cases/on-off-settings/list.d.ts +1 -0
  133. package/dist/cases/on-off-settings/list.jsx +97 -0
  134. package/dist/cases/on-off-settings.md +116 -0
  135. package/dist/cases/overflow-menu/in-a-header.d.ts +1 -0
  136. package/dist/cases/overflow-menu/in-a-header.jsx +128 -0
  137. package/dist/cases/overflow-menu/on-a-row.d.ts +1 -0
  138. package/dist/cases/overflow-menu/on-a-row.jsx +183 -0
  139. package/dist/cases/overflow-menu.md +410 -0
  140. package/dist/cases/profile-form/form.d.ts +1 -0
  141. package/dist/cases/profile-form/form.jsx +153 -0
  142. package/dist/cases/profile-form.md +236 -0
  143. package/dist/cases/quick-switcher/modal.d.ts +1 -0
  144. package/dist/cases/quick-switcher/modal.jsx +114 -0
  145. package/dist/cases/quick-switcher.md +205 -0
  146. package/dist/cases/range-switch/segmented.d.ts +1 -0
  147. package/dist/cases/range-switch/segmented.jsx +30 -0
  148. package/dist/cases/range-switch.md +67 -0
  149. package/dist/cases/rename.md +0 -4
  150. package/dist/cases/reply-feedback/thumbs.d.ts +1 -0
  151. package/dist/cases/reply-feedback/thumbs.jsx +191 -0
  152. package/dist/cases/reply-feedback/with-reason.d.ts +1 -0
  153. package/dist/cases/reply-feedback/with-reason.jsx +221 -0
  154. package/dist/cases/reply-feedback.md +548 -0
  155. package/dist/cases/reply-sources/cards.d.ts +1 -0
  156. package/dist/cases/reply-sources/cards.jsx +83 -0
  157. package/dist/cases/reply-sources/tag-only.d.ts +1 -0
  158. package/dist/cases/reply-sources/tag-only.jsx +45 -0
  159. package/dist/cases/reply-sources.md +243 -0
  160. package/dist/cases/route-loading.md +0 -2
  161. package/dist/cases/scope-picker/menu.d.ts +1 -0
  162. package/dist/cases/scope-picker/menu.jsx +47 -0
  163. package/dist/cases/scope-picker.md +97 -0
  164. package/dist/cases/set-new-password.md +0 -4
  165. package/dist/cases/settings-page/side-nav.d.ts +1 -0
  166. package/dist/cases/settings-page/side-nav.jsx +171 -0
  167. package/dist/cases/settings-page/top-tabs.d.ts +1 -0
  168. package/dist/cases/settings-page/top-tabs.jsx +129 -0
  169. package/dist/cases/settings-page.md +378 -0
  170. package/dist/cases/settings-save.md +35 -0
  171. package/dist/cases/sign-up-page.md +1 -5
  172. package/dist/cases/slash-command-list/in-composer.d.ts +1 -0
  173. package/dist/cases/slash-command-list/in-composer.jsx +162 -0
  174. package/dist/cases/slash-command-list.md +243 -0
  175. package/dist/cases/success-feedback.md +1 -5
  176. package/dist/cases/tag-filter/tags.d.ts +1 -0
  177. package/dist/cases/tag-filter/tags.jsx +226 -0
  178. package/dist/cases/tag-filter.md +298 -0
  179. package/dist/cases/type-to-confirm.md +0 -4
  180. package/dist/cases/typing-and-status/line.d.ts +1 -0
  181. package/dist/cases/typing-and-status/line.jsx +50 -0
  182. package/dist/cases/typing-and-status.md +92 -0
  183. package/dist/cases/unsaved-changes-guard.md +0 -4
  184. package/dist/cases/upgrade-prompt.md +0 -4
  185. package/dist/cases.json +2331 -294
  186. package/dist/components/alert.d.ts +3 -1
  187. package/dist/components/alert.jsx +2 -2
  188. package/dist/components/button.d.ts +3 -2
  189. package/dist/components/button.jsx +14 -9
  190. package/dist/components/checkBox.d.ts +5 -1
  191. package/dist/components/checkBox.jsx +2 -2
  192. package/dist/components/composer.d.ts +74 -0
  193. package/dist/components/composer.jsx +122 -0
  194. package/dist/components/copyField.d.ts +20 -0
  195. package/dist/components/copyField.jsx +99 -0
  196. package/dist/components/fileChip.d.ts +33 -0
  197. package/dist/components/fileChip.jsx +61 -0
  198. package/dist/components/formField.d.ts +34 -0
  199. package/dist/components/formField.jsx +28 -0
  200. package/dist/components/heading.d.ts +3 -1
  201. package/dist/components/heading.jsx +2 -2
  202. package/dist/components/iconButton.d.ts +3 -3
  203. package/dist/components/iconButton.jsx +9 -7
  204. package/dist/components/layout.d.ts +7 -1
  205. package/dist/components/layout.jsx +5 -2
  206. package/dist/components/menu.d.ts +21 -0
  207. package/dist/components/menu.jsx +27 -3
  208. package/dist/components/menuItem.d.ts +12 -2
  209. package/dist/components/menuItem.jsx +6 -5
  210. package/dist/components/message.d.ts +28 -0
  211. package/dist/components/message.jsx +25 -0
  212. package/dist/components/navigation.d.ts +9 -1
  213. package/dist/components/navigation.jsx +15 -3
  214. package/dist/components/paragraph.d.ts +3 -1
  215. package/dist/components/paragraph.jsx +2 -2
  216. package/dist/components/popover.d.ts +7 -1
  217. package/dist/components/popover.jsx +35 -9
  218. package/dist/components/radioGroup.d.ts +12 -1
  219. package/dist/components/radioGroup.jsx +20 -9
  220. package/dist/components/segmentedControl.d.ts +22 -0
  221. package/dist/components/segmentedControl.jsx +54 -0
  222. package/dist/components/select.d.ts +5 -1
  223. package/dist/components/select.jsx +2 -2
  224. package/dist/components/settingsSection.d.ts +31 -0
  225. package/dist/components/settingsSection.jsx +58 -0
  226. package/dist/components/slidingIndicator.d.ts +50 -0
  227. package/dist/components/slidingIndicator.jsx +102 -0
  228. package/dist/components/sourceCard.d.ts +23 -0
  229. package/dist/components/sourceCard.jsx +56 -0
  230. package/dist/components/stepList.d.ts +17 -0
  231. package/dist/components/stepList.jsx +79 -0
  232. package/dist/components/switch.d.ts +25 -0
  233. package/dist/components/switch.jsx +55 -0
  234. package/dist/components/tab.jsx +5 -11
  235. package/dist/components/tabsContainer.jsx +5 -67
  236. package/dist/components/tag.d.ts +9 -1
  237. package/dist/components/tag.jsx +6 -4
  238. package/dist/components/textField.d.ts +12 -2
  239. package/dist/components/textField.jsx +11 -4
  240. package/dist/components/textarea.d.ts +5 -1
  241. package/dist/components/textarea.jsx +6 -21
  242. package/dist/components/useHotkey.d.ts +7 -0
  243. package/dist/components/useHotkey.js +24 -0
  244. package/dist/components/userImage.d.ts +9 -1
  245. package/dist/components/userImage.jsx +10 -3
  246. package/dist/index.d.ts +6 -0
  247. package/dist/index.js +6 -0
  248. package/dist/internal/autoGrow.d.ts +11 -0
  249. package/dist/internal/autoGrow.js +28 -0
  250. package/dist/internal/composer.d.ts +16 -0
  251. package/dist/internal/composer.js +18 -0
  252. package/dist/internal/copyField.d.ts +5 -0
  253. package/dist/internal/copyField.js +61 -0
  254. package/dist/internal/hotkey.d.ts +16 -0
  255. package/dist/internal/hotkey.js +20 -0
  256. package/dist/internal/menu.d.ts +6 -0
  257. package/dist/internal/menu.js +31 -0
  258. package/dist/internal/switch.d.ts +5 -0
  259. package/dist/internal/switch.js +9 -0
  260. package/dist/native-mapping.json +62 -1
  261. package/dist/stories/Button.stories.d.ts +1 -0
  262. package/dist/stories/Button.stories.jsx +17 -1
  263. package/dist/stories/Cases.generated.stories.d.ts +53 -0
  264. package/dist/stories/Cases.generated.stories.jsx +106 -0
  265. package/dist/stories/Composer.stories.d.ts +23 -0
  266. package/dist/stories/Composer.stories.jsx +121 -0
  267. package/dist/stories/CopyField.stories.d.ts +11 -0
  268. package/dist/stories/CopyField.stories.jsx +65 -0
  269. package/dist/stories/FileChip.stories.d.ts +7 -0
  270. package/dist/stories/FileChip.stories.jsx +35 -0
  271. package/dist/stories/FormField.stories.d.ts +6 -0
  272. package/dist/stories/FormField.stories.jsx +44 -0
  273. package/dist/stories/IconButton.stories.d.ts +1 -0
  274. package/dist/stories/IconButton.stories.jsx +18 -1
  275. package/dist/stories/Menu.stories.d.ts +4 -0
  276. package/dist/stories/Menu.stories.jsx +46 -1
  277. package/dist/stories/MenuItem.stories.d.ts +1 -0
  278. package/dist/stories/MenuItem.stories.jsx +8 -0
  279. package/dist/stories/Message.stories.d.ts +10 -0
  280. package/dist/stories/Message.stories.jsx +77 -0
  281. package/dist/stories/Navigation.stories.d.ts +1 -0
  282. package/dist/stories/Navigation.stories.jsx +17 -1
  283. package/dist/stories/PageComponents.stories.d.ts +1 -0
  284. package/dist/stories/PageComponents.stories.jsx +21 -0
  285. package/dist/stories/RadioGroup.stories.d.ts +2 -0
  286. package/dist/stories/RadioGroup.stories.jsx +40 -1
  287. package/dist/stories/SegmentedControl.stories.d.ts +8 -0
  288. package/dist/stories/SegmentedControl.stories.jsx +33 -0
  289. package/dist/stories/SettingsSection.stories.d.ts +11 -0
  290. package/dist/stories/SettingsSection.stories.jsx +64 -0
  291. package/dist/stories/SourceCard.stories.d.ts +8 -0
  292. package/dist/stories/SourceCard.stories.jsx +33 -0
  293. package/dist/stories/StepList.stories.d.ts +8 -0
  294. package/dist/stories/StepList.stories.jsx +35 -0
  295. package/dist/stories/Switch.stories.d.ts +14 -0
  296. package/dist/stories/Switch.stories.jsx +87 -0
  297. package/dist/stories/TextField.stories.d.ts +1 -0
  298. package/dist/stories/TextField.stories.jsx +13 -0
  299. package/dist/stories/UserImage.stories.d.ts +2 -0
  300. package/dist/stories/UserImage.stories.jsx +19 -0
  301. package/package.json +8 -3
@@ -2,8 +2,6 @@
2
2
 
3
3
  A CLI, an editor or another app opened the browser so the person can log in, and the login must reach that app.
4
4
 
5
- **Not built yet:** Scindo's CLI login shows 'Login successful!' as soon as its request to the CLI gets any reply. It sends that request in a way that leaves the page unable to read the CLI's reply, so it cannot tell whether the CLI took the login. Its provider Buttons read 'GitHub' and 'Google'. Commentify's popup shows nothing while it finishes.
6
-
7
5
  ## Do
8
6
 
9
7
  - Say in one line what the login connects: 'This connects Acme CLI on your computer to your account.'
@@ -167,5 +165,3 @@ export default function DeviceLoginPopup() {
167
165
  );
168
166
  }
169
167
  ```
170
-
171
- Seen in: Commentify, Scindo.
@@ -2,8 +2,6 @@
2
2
 
3
3
  A person opened the link that confirms their email.
4
4
 
5
- **Not built yet:** Scindo on the web shows its success Alert above the login form with a close button. Commentify has no confirmed page and no Alert for it: the link goes straight to the dashboard.
6
-
7
5
  ## Do
8
6
 
9
7
  - Name the page 'Email confirmed' in a `Heading` with `level={1}`.
@@ -147,5 +145,3 @@ export default function EmailConfirmedAlertOnLogin() {
147
145
  );
148
146
  }
149
147
  ```
150
-
151
- Seen in: Commentify, Scindo.
@@ -2,8 +2,6 @@
2
2
 
3
3
  A list has loaded, and there is nothing in it yet.
4
4
 
5
- **Not built yet:** Commentify writes most of its empty lists in Title Case, such as 'No Comments Available', and gives them no `secondText`.
6
-
7
5
  ## Do
8
6
 
9
7
  - Use `size="large"` when the list is the whole pane, and `size="small"` inside a section.
@@ -73,5 +71,3 @@ export default function EmptyListSection() {
73
71
  ## Native
74
72
 
75
73
  On Apple use `ContentUnavailableView`, with the same words.
76
-
77
- Seen in: Commentify, Scindo.
@@ -6,8 +6,6 @@ A list, table or pane has nothing to show.
6
6
 
7
7
  Use `EmptyBox`, never a bare line of text. Its `size` is `large` when the list fills the whole region and `small` inside a section. The `text` says what is empty, in the person's words and in sentence case: 'No saved comments'. The `secondText` says what will appear here or what to do. When the person can fix it, pass the Button as `action`. The action Button is primary when it fills the list or tries again, and secondary when it is 'Clear Search'. An empty search shows the words searched for and a 'Clear Search' Button. A failed load is not an empty list: say that loading failed and offer a 'Try Again' Button. `EmptyBox` may hold that message, with 'Try Again' as its `action`, but never the empty text.
8
8
 
9
- **Not built yet:** Scindo on the web uses `EmptyBox` in three places and bare text elsewhere, such as 'No API keys yet.' Commentify uses `EmptyBox` in most lists and bare text in a few. Commentify admin and jinhwankim.com show bare text. No product passes an `action` yet.
10
-
11
9
  ## Why
12
10
 
13
11
  An empty space looks like something is broken. Saying what is missing and what will fill it tells the person nothing is wrong and what to do next.
@@ -31,5 +29,3 @@ An empty space looks like something is broken. Saying what is missing and what w
31
29
  ## Native
32
30
 
33
31
  On Apple use `ContentUnavailableView`, with the same words.
34
-
35
- Seen in: Commentify, Commentify admin, Scindo, jinhwankim.com.
@@ -2,8 +2,6 @@
2
2
 
3
3
  A pane is empty because something it needs is not set up yet, such as a connected account.
4
4
 
5
- **Not built yet:** Commentify puts its 'Open Settings' Button under `EmptyBox`, not in its `action`, and writes the text in Title Case: 'No App, Team, or User Connected'.
6
-
7
5
  ## Do
8
6
 
9
7
  - Say what is missing: 'No calendar connected'.
@@ -84,5 +82,3 @@ export default function EmptyNotSetUpPointer() {
84
82
  ## Native
85
83
 
86
84
  On Apple use `ContentUnavailableView`, with the Button in its `actions`.
87
-
88
- Seen in: Commentify, Scindo.
@@ -2,8 +2,6 @@
2
2
 
3
3
  A search or a filter finds nothing.
4
4
 
5
- **Not built yet:** Scindo on the web shows a bare line, 'No results found', with no words and no way to clear them. Scindo on Apple shows 'No results found' in a `ContentUnavailableView`, without the words. Commentify shows the words in an `EmptyBox`, with no Clear Search Button.
6
-
7
5
  ## Do
8
6
 
9
7
  - Use `icon="Search"`, so it reads as a search and not an empty list.
@@ -73,5 +71,3 @@ export default function EmptySearchClearSearch() {
73
71
  ## Native
74
72
 
75
73
  On Apple use `ContentUnavailableView.search(text:)`.
76
-
77
- Seen in: Commentify, Scindo.
@@ -2,8 +2,6 @@
2
2
 
3
3
  Something broke while showing a page, and the app cannot show it.
4
4
 
5
- **Not built yet:** Scindo on the web shows the error's own message and its id. Commentify shows one line and 'Try again', with no heading and no way home. jinhwankim.com shows an `EmptyBox` with no Button.
6
-
7
5
  ## Do
8
6
 
9
7
  - Name the page in a `Heading` with `level={1}`: 'Something went wrong'.
@@ -103,5 +101,3 @@ export default function ErrorPageInShell() {
103
101
  );
104
102
  }
105
103
  ```
106
-
107
- Seen in: Commentify, Scindo, jinhwankim.com.
@@ -2,8 +2,6 @@
2
2
 
3
3
  A person sends feedback about the product from inside it.
4
4
 
5
- **Not built yet:** Scindo's feedback form labels the Button 'Sending...' while it runs, shows no error when sending fails, and replaces the form with a thank-you that closes after 1.5 seconds. It labels its fields with captions written by hand.
6
-
7
5
  ## Do
8
6
 
9
7
  - Title the Modal 'Send Feedback' and label its action 'Send', after 'Cancel'.
@@ -135,5 +133,3 @@ export default function FeedbackFormModal() {
135
133
  );
136
134
  }
137
135
  ```
138
-
139
- Seen in: Scindo.
@@ -0,0 +1 @@
1
+ export default function FilterMenuPresets(): import("react").JSX.Element;
@@ -0,0 +1,53 @@
1
+ 'use client';
2
+ import { useState } from 'react';
3
+ import Heading from '../../components/heading';
4
+ import Paragraph from '../../components/paragraph';
5
+ import IconButton from '../../components/iconButton';
6
+ import Tooltip from '../../components/tooltip';
7
+ import Popover from '../../components/popover';
8
+ import Menu from '../../components/menu';
9
+ import MenuItem from '../../components/menuItem';
10
+ import { Center, Cluster, Stack } from '../../components/layout';
11
+ // A real app counts these on the server. `label` is the menu item, in Title Case. `current` names the
12
+ // choice in the button's name, its tooltip and the line, in sentence case.
13
+ var filters = [
14
+ { value: 'day', label: 'Last 24 Hours', current: 'Last 24 hours', count: 4 },
15
+ { value: 'week', label: 'Last 7 Days', current: 'Last 7 days', count: 18 },
16
+ { value: 'month', label: 'Last 30 Days', current: 'Last 30 days', count: 64 },
17
+ { value: 'quarter', label: 'Last 90 Days', current: 'Last 90 days', count: 171 },
18
+ { value: 'all', label: 'All Time', current: 'All time', count: 240 },
19
+ ];
20
+ export default function FilterMenuPresets() {
21
+ var _a;
22
+ var _b = useState('week'), value = _b[0], setValue = _b[1];
23
+ var _c = useState(null), anchor = _c[0], setAnchor = _c[1];
24
+ var _d = useState(false), open = _d[0], setOpen = _d[1];
25
+ var current = (_a = filters.find(function (f) { return f.value === value; })) !== null && _a !== void 0 ? _a : filters[1];
26
+ // The trigger toggles the menu. Popover's returnFocus gives focus back to it on close.
27
+ function toggle(anchorEl) {
28
+ setAnchor(anchorEl);
29
+ setOpen(function (o) { return !o; });
30
+ }
31
+ function choose(next) {
32
+ setValue(next);
33
+ setOpen(false);
34
+ }
35
+ return (<Center width="page">
36
+ <Stack gap="large">
37
+ <Cluster justify="between">
38
+ <Heading level={1} size="h5">Comments</Heading>
39
+ {/* The tooltip names the current filter, and so does the button's name. A filter that is on
40
+ shows in a filled button; 'All Time' filters nothing, so the button is plain. */}
41
+ <Tooltip title={current.current}>
42
+ <IconButton color={value === 'all' ? 'iconOnly' : 'secondary'} state={open ? 'selected' : 'enabled'} size="small" iconName="ListFilter" ariaLabel={"Filter by date: ".concat(current.current)} aria-haspopup="menu" aria-expanded={open} onClick={function (e) { return toggle(e.currentTarget); }}/>
43
+ </Tooltip>
44
+ </Cluster>
45
+ <Paragraph tone="secondary" size="body2" measure="none">{current.count} comments, {current.current.toLowerCase()}.</Paragraph>
46
+ </Stack>
47
+ <Popover open={open} anchorEl={anchor} onClose={function () { return setOpen(false); }} returnFocus>
48
+ <Menu navigable aria-label="Filter by date" width={200}>
49
+ {filters.map(function (f) { return (<MenuItem key={f.value} size="small" label={f.label} isSelected={f.value === value} role="menuitemradio" onClick={function () { return choose(f.value); }}/>); })}
50
+ </Menu>
51
+ </Popover>
52
+ </Center>);
53
+ }
@@ -0,0 +1 @@
1
+ export default function FilterMenuWithClear(): import("react").JSX.Element;
@@ -0,0 +1,56 @@
1
+ 'use client';
2
+ import { useState } from 'react';
3
+ import Heading from '../../components/heading';
4
+ import Paragraph from '../../components/paragraph';
5
+ import IconButton from '../../components/iconButton';
6
+ import Tooltip from '../../components/tooltip';
7
+ import Popover from '../../components/popover';
8
+ import Menu from '../../components/menu';
9
+ import MenuItem from '../../components/menuItem';
10
+ import Line from '../../components/line';
11
+ import { Center, Cluster, Stack } from '../../components/layout';
12
+ // A real app reads these from the server. `label` is the menu item, in Title Case. `current` names the
13
+ // choice in the button's name, its tooltip and the line, in sentence case.
14
+ var filters = [
15
+ { value: 'mentions', label: 'Mentions', current: 'Mentions', count: 3 },
16
+ { value: 'unread', label: 'Unread', current: 'Unread', count: 5 },
17
+ { value: 'assigned', label: 'Assigned to Me', current: 'Assigned to me', count: 2 },
18
+ ];
19
+ var total = 12;
20
+ export default function FilterMenuWithClear() {
21
+ // null means the filter is off.
22
+ var _a = useState('unread'), value = _a[0], setValue = _a[1];
23
+ var _b = useState(null), anchor = _b[0], setAnchor = _b[1];
24
+ var _c = useState(false), open = _c[0], setOpen = _c[1];
25
+ var current = filters.find(function (f) { return f.value === value; });
26
+ function toggle(anchorEl) {
27
+ setAnchor(anchorEl);
28
+ setOpen(function (o) { return !o; });
29
+ }
30
+ function choose(next) {
31
+ setValue(next);
32
+ setOpen(false);
33
+ }
34
+ return (<Center width="page">
35
+ <Stack gap="large">
36
+ <Cluster justify="between">
37
+ <Heading level={1} size="h5">Inbox</Heading>
38
+ {/* A filter that is on shows in a filled button. When it is off the button is plain. */}
39
+ <Tooltip title={current ? current.current : 'Filter messages'}>
40
+ <IconButton color={current ? 'secondary' : 'iconOnly'} state={open ? 'selected' : 'enabled'} size="small" iconName="ListFilter" ariaLabel={current ? "Filter messages: ".concat(current.current) : 'Filter messages'} aria-haspopup="menu" aria-expanded={open} onClick={function (e) { return toggle(e.currentTarget); }}/>
41
+ </Tooltip>
42
+ </Cluster>
43
+ <Paragraph tone="secondary" size="body2" measure="none">
44
+ {current ? "".concat(current.count, " of ").concat(total, " messages, ").concat(current.current.toLowerCase(), ".") : "All ".concat(total, " messages.")}
45
+ </Paragraph>
46
+ </Stack>
47
+ <Popover open={open} anchorEl={anchor} onClose={function () { return setOpen(false); }} returnFocus>
48
+ <Menu navigable aria-label="Filter messages" width={200}>
49
+ {filters.map(function (f) { return (<MenuItem key={f.value} size="small" label={f.label} isSelected={f.value === value} role="menuitemradio" onClick={function () { return choose(f.value); }}/>); })}
50
+ {/* Clear is last, and shows only while a filter is on. */}
51
+ {current && <Line />}
52
+ {current && <MenuItem size="small" iconName="X" label="Clear Filter" onClick={function () { return choose(null); }}/>}
53
+ </Menu>
54
+ </Popover>
55
+ </Center>);
56
+ }
@@ -0,0 +1,204 @@
1
+ # Filter menu
2
+
3
+ A person narrows a list by one choice, such as a date range, or turns the filter off.
4
+
5
+ ## Do
6
+
7
+ - Open a navigable menu from an `IconButton`: `<Popover returnFocus>` around `<Menu navigable aria-label="Filter by date">` with `onClick` items.
8
+ - Pass `event.currentTarget` to the Popover as `anchorEl`, and set `state="selected"` on the button while the menu is open.
9
+ - Give the button `color="secondary"` while a filter is on.
10
+ - Say the current filter in the button's `ariaLabel`: 'Filter by date: Last 7 days'.
11
+ - Show the current filter in a `Tooltip` on the button, such as 'Last 7 days'.
12
+ - Give each item `role="menuitemradio"` and mark the current one with `isSelected`. It sets `aria-checked`, so a screen reader says which one is on.
13
+ - Write each choice in Title Case, such as 'Last 24 Hours', and close the menu when one is chosen.
14
+ - Add 'Clear Filter' last, after a `Line`, when the filter can be off. Show it only while a filter is on.
15
+ - Show what the list holds under the heading, such as how many comments the filter leaves.
16
+ - Use the case 'Range switch' instead when two to four ranges are the page's main view and the header has room.
17
+
18
+ ## Don't
19
+
20
+ - Do not use a Tooltip as the only place that names the current filter.
21
+ - Do not mark the current choice with color only.
22
+ - Do not keep the menu open after a choice.
23
+ - Do not add a custom date range in a menu. ODS has no date picker yet.
24
+ - Do not put a destructive item in a filter menu.
25
+
26
+ ## Option: Presets
27
+
28
+ Use when: The choices are dates or a few fixed choices, and one is always on.
29
+
30
+ Uses: `Center`, `Cluster`, `Heading`, `IconButton`, `Menu`, `MenuItem`, `Paragraph`, `Popover`, `Stack`, `Tooltip`
31
+
32
+ ```tsx
33
+ 'use client';
34
+ import { useState } from 'react';
35
+ import Heading from 'oneslash-design-system/components/heading';
36
+ import Paragraph from 'oneslash-design-system/components/paragraph';
37
+ import IconButton from 'oneslash-design-system/components/iconButton';
38
+ import Tooltip from 'oneslash-design-system/components/tooltip';
39
+ import Popover from 'oneslash-design-system/components/popover';
40
+ import Menu from 'oneslash-design-system/components/menu';
41
+ import MenuItem from 'oneslash-design-system/components/menuItem';
42
+ import { Center, Cluster, Stack } from 'oneslash-design-system/components/layout';
43
+
44
+ // A real app counts these on the server. `label` is the menu item, in Title Case. `current` names the
45
+ // choice in the button's name, its tooltip and the line, in sentence case.
46
+ const filters = [
47
+ { value: 'day', label: 'Last 24 Hours', current: 'Last 24 hours', count: 4 },
48
+ { value: 'week', label: 'Last 7 Days', current: 'Last 7 days', count: 18 },
49
+ { value: 'month', label: 'Last 30 Days', current: 'Last 30 days', count: 64 },
50
+ { value: 'quarter', label: 'Last 90 Days', current: 'Last 90 days', count: 171 },
51
+ { value: 'all', label: 'All Time', current: 'All time', count: 240 },
52
+ ];
53
+
54
+ export default function FilterMenuPresets() {
55
+ const [value, setValue] = useState('week');
56
+ const [anchor, setAnchor] = useState<HTMLElement | null>(null);
57
+ const [open, setOpen] = useState(false);
58
+ const current = filters.find((f) => f.value === value) ?? filters[1];
59
+
60
+ // The trigger toggles the menu. Popover's returnFocus gives focus back to it on close.
61
+ function toggle(anchorEl: HTMLElement) {
62
+ setAnchor(anchorEl);
63
+ setOpen((o) => !o);
64
+ }
65
+
66
+ function choose(next: string) {
67
+ setValue(next);
68
+ setOpen(false);
69
+ }
70
+
71
+ return (
72
+ <Center width="page">
73
+ <Stack gap="large">
74
+ <Cluster justify="between">
75
+ <Heading level={1} size="h5">Comments</Heading>
76
+ {/* The tooltip names the current filter, and so does the button's name. A filter that is on
77
+ shows in a filled button; 'All Time' filters nothing, so the button is plain. */}
78
+ <Tooltip title={current.current}>
79
+ <IconButton
80
+ color={value === 'all' ? 'iconOnly' : 'secondary'}
81
+ state={open ? 'selected' : 'enabled'}
82
+ size="small"
83
+ iconName="ListFilter"
84
+ ariaLabel={`Filter by date: ${current.current}`}
85
+ aria-haspopup="menu"
86
+ aria-expanded={open}
87
+ onClick={(e: { currentTarget: HTMLElement }) => toggle(e.currentTarget)}
88
+ />
89
+ </Tooltip>
90
+ </Cluster>
91
+ <Paragraph tone="secondary" size="body2" measure="none">{current.count} comments, {current.current.toLowerCase()}.</Paragraph>
92
+ </Stack>
93
+ <Popover open={open} anchorEl={anchor} onClose={() => setOpen(false)} returnFocus>
94
+ <Menu navigable aria-label="Filter by date" width={200}>
95
+ {filters.map((f) => (
96
+ <MenuItem
97
+ key={f.value}
98
+ size="small"
99
+ label={f.label}
100
+ isSelected={f.value === value}
101
+ role="menuitemradio"
102
+ onClick={() => choose(f.value)}
103
+ />
104
+ ))}
105
+ </Menu>
106
+ </Popover>
107
+ </Center>
108
+ );
109
+ }
110
+ ```
111
+
112
+ ## Option: Presets with Clear Filter
113
+
114
+ Use when: The filter can be off, so the list shows everything until the person picks a choice.
115
+
116
+ Uses: `Center`, `Cluster`, `Heading`, `IconButton`, `Line`, `Menu`, `MenuItem`, `Paragraph`, `Popover`, `Stack`, `Tooltip`
117
+
118
+ ```tsx
119
+ 'use client';
120
+ import { useState } from 'react';
121
+ import Heading from 'oneslash-design-system/components/heading';
122
+ import Paragraph from 'oneslash-design-system/components/paragraph';
123
+ import IconButton from 'oneslash-design-system/components/iconButton';
124
+ import Tooltip from 'oneslash-design-system/components/tooltip';
125
+ import Popover from 'oneslash-design-system/components/popover';
126
+ import Menu from 'oneslash-design-system/components/menu';
127
+ import MenuItem from 'oneslash-design-system/components/menuItem';
128
+ import Line from 'oneslash-design-system/components/line';
129
+ import { Center, Cluster, Stack } from 'oneslash-design-system/components/layout';
130
+
131
+ // A real app reads these from the server. `label` is the menu item, in Title Case. `current` names the
132
+ // choice in the button's name, its tooltip and the line, in sentence case.
133
+ const filters = [
134
+ { value: 'mentions', label: 'Mentions', current: 'Mentions', count: 3 },
135
+ { value: 'unread', label: 'Unread', current: 'Unread', count: 5 },
136
+ { value: 'assigned', label: 'Assigned to Me', current: 'Assigned to me', count: 2 },
137
+ ];
138
+ const total = 12;
139
+
140
+ export default function FilterMenuWithClear() {
141
+ // null means the filter is off.
142
+ const [value, setValue] = useState<string | null>('unread');
143
+ const [anchor, setAnchor] = useState<HTMLElement | null>(null);
144
+ const [open, setOpen] = useState(false);
145
+ const current = filters.find((f) => f.value === value);
146
+
147
+ function toggle(anchorEl: HTMLElement) {
148
+ setAnchor(anchorEl);
149
+ setOpen((o) => !o);
150
+ }
151
+
152
+ function choose(next: string | null) {
153
+ setValue(next);
154
+ setOpen(false);
155
+ }
156
+
157
+ return (
158
+ <Center width="page">
159
+ <Stack gap="large">
160
+ <Cluster justify="between">
161
+ <Heading level={1} size="h5">Inbox</Heading>
162
+ {/* A filter that is on shows in a filled button. When it is off the button is plain. */}
163
+ <Tooltip title={current ? current.current : 'Filter messages'}>
164
+ <IconButton
165
+ color={current ? 'secondary' : 'iconOnly'}
166
+ state={open ? 'selected' : 'enabled'}
167
+ size="small"
168
+ iconName="ListFilter"
169
+ ariaLabel={current ? `Filter messages: ${current.current}` : 'Filter messages'}
170
+ aria-haspopup="menu"
171
+ aria-expanded={open}
172
+ onClick={(e: { currentTarget: HTMLElement }) => toggle(e.currentTarget)}
173
+ />
174
+ </Tooltip>
175
+ </Cluster>
176
+ <Paragraph tone="secondary" size="body2" measure="none">
177
+ {current ? `${current.count} of ${total} messages, ${current.current.toLowerCase()}.` : `All ${total} messages.`}
178
+ </Paragraph>
179
+ </Stack>
180
+ <Popover open={open} anchorEl={anchor} onClose={() => setOpen(false)} returnFocus>
181
+ <Menu navigable aria-label="Filter messages" width={200}>
182
+ {filters.map((f) => (
183
+ <MenuItem
184
+ key={f.value}
185
+ size="small"
186
+ label={f.label}
187
+ isSelected={f.value === value}
188
+ role="menuitemradio"
189
+ onClick={() => choose(f.value)}
190
+ />
191
+ ))}
192
+ {/* Clear is last, and shows only while a filter is on. */}
193
+ {current && <Line />}
194
+ {current && <MenuItem size="small" iconName="X" label="Clear Filter" onClick={() => choose(null)} />}
195
+ </Menu>
196
+ </Popover>
197
+ </Center>
198
+ );
199
+ }
200
+ ```
201
+
202
+ ## Native
203
+
204
+ On Apple use a `Menu` with a `Picker` inside it, so the current choice gets a check mark. On Android use a dropdown menu with radio items.
@@ -2,8 +2,6 @@
2
2
 
3
3
  A person cannot remember their password and asks for a link to set a new one.
4
4
 
5
- **Not built yet:** Commentify and Scindo on the web replace the form with a spinner while sending the link. Both then say 'We sent a password reset link to' the address, even when it has no account.
6
-
7
5
  ## Do
8
6
 
9
7
  - Name the page 'Reset password' in a `Heading` with `level={1}`, and say in one line what happens next.
@@ -324,5 +322,3 @@ export default function ForgotPasswordOwnPage() {
324
322
  ## Native
325
323
 
326
324
  On Apple, put 'Forgot Password?' under the 'Log In' Button and open the web reset form from it.
327
-
328
- Seen in: Commentify, Scindo.
@@ -6,8 +6,6 @@ A form was submitted and something is wrong.
6
6
 
7
7
  A problem with one field shows under that field, through the field's `error` and `errorText`. A problem with the whole request shows above the fields in `<Alert type="error" variant="inline" showCloseButton>`, so it stays until the person closes it or submits again. Its `onClose` clears the message; if it does not, the Alert comes back. While the request runs, the submit Button is `loading` and keeps its label. The form keeps what the person typed. The next submit clears the old messages. Messages are in sentence case. It is never a colored caption written by hand, and never the browser's `alert()`.
8
8
 
9
- **Not built yet:** Commentify writes red captions by hand on its consent screen and in its Figma import dialog. Scindo on the web does the same in its dialogs, such as renaming a workspace or a task. Commentify uses the browser's `alert()` in three files, and Scindo on the web in one.
10
-
11
9
  ## Why
12
10
 
13
11
  A message next to the problem tells the person what to fix without searching for it. Keeping what they typed means they fix one thing instead of starting again.
@@ -28,5 +26,3 @@ A message next to the problem tells the person what to fix without searching for
28
26
  - Do not use the browser's `alert()`.
29
27
  - Do not clear the form after a failed submit.
30
28
  - Do not change the submit Button's label while it is loading, such as to 'Saving…'.
31
-
32
- Seen in: Commentify, Scindo, jinhwankim.com.
@@ -2,8 +2,6 @@
2
2
 
3
3
  A person picks which items to bring in from another place, such as pages from a wiki.
4
4
 
5
- **Not built yet:** Scindo's Notion import labels its Buttons 'Select all' and 'Import', changes the action to 'Importing… 1/2' while it runs, and shows bare text when nothing matches.
6
-
7
5
  ## Do
8
6
 
9
7
  - Put a search field at the top, then a count line, then the list of `Checkbox`es.
@@ -184,5 +182,3 @@ export default function ImportChecklistModal() {
184
182
  );
185
183
  }
186
184
  ```
187
-
188
- Seen in: Scindo.
@@ -2,8 +2,6 @@
2
2
 
3
3
  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.
4
4
 
5
- **Not built yet:** Scindo on the web labels its save Buttons 'Saving...' while they save. Its profile settings show nothing when a save fails. Its instructions settings show the error's own message in an inline Alert with no close button.
6
-
7
5
  ## Do
8
6
 
9
7
  - Show `loading` on the submit Button while the request runs, and keep its label.
@@ -233,5 +231,3 @@ export default function InlineFormFeedbackToast() {
233
231
  ## Native
234
232
 
235
233
  On Apple there is no toast. Show the result in place.
236
-
237
- Seen in: Scindo.
@@ -0,0 +1 @@
1
+ export default function IntegrationsListNested(): import("react").JSX.Element;