oneslash-design-system 2.17.0 → 2.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/DESIGN.md +55 -14
- package/dist/cases/accept-invite.md +1 -5
- package/dist/cases/account-menu/menu.d.ts +1 -0
- package/dist/cases/account-menu/menu.jsx +99 -0
- package/dist/cases/account-menu.md +164 -0
- package/dist/cases/agent-asks-before-risky-action.md +0 -4
- package/dist/cases/agent-cancels-when-unanswered.md +0 -4
- package/dist/cases/agent-options.md +0 -4
- package/dist/cases/agent-pending-reply.md +0 -4
- package/dist/cases/agent-plan-proposal.md +0 -4
- package/dist/cases/agent-question.md +0 -4
- package/dist/cases/agent-refuses-clearly.md +0 -4
- package/dist/cases/agent-says-what-it-is.md +0 -2
- package/dist/cases/agent-settings/form.d.ts +1 -0
- package/dist/cases/agent-settings/form.jsx +164 -0
- package/dist/cases/agent-settings.md +259 -0
- package/dist/cases/agent-shows-progress.md +0 -2
- package/dist/cases/agent-shows-sources.md +0 -2
- package/dist/cases/api-keys/list.d.ts +1 -0
- package/dist/cases/api-keys/list.jsx +162 -0
- package/dist/cases/api-keys.md +229 -0
- package/dist/cases/app-shell/sidebar.d.ts +1 -0
- package/dist/cases/app-shell/sidebar.jsx +124 -0
- package/dist/cases/app-shell/top-tabs.d.ts +1 -0
- package/dist/cases/app-shell/top-tabs.jsx +106 -0
- package/dist/cases/app-shell.md +364 -0
- package/dist/cases/artifact-card/card.jsx +32 -6
- package/dist/cases/artifact-card.md +55 -11
- package/dist/cases/auth-gate-loading.md +0 -4
- package/dist/cases/check-your-email.md +0 -4
- package/dist/cases/collapsible-search/popover.d.ts +1 -0
- package/dist/cases/collapsible-search/popover.jsx +74 -0
- package/dist/cases/collapsible-search.md +143 -0
- package/dist/cases/composer-limit.md +0 -4
- package/dist/cases/confirm-destructive-action.md +0 -4
- package/dist/cases/confirm-dialogs.md +0 -4
- package/dist/cases/conversation-starters.md +0 -4
- package/dist/cases/create-modal.md +0 -4
- package/dist/cases/danger-zone/collapsed.d.ts +1 -0
- package/dist/cases/danger-zone/collapsed.jsx +75 -0
- package/dist/cases/danger-zone/shown.d.ts +1 -0
- package/dist/cases/danger-zone/shown.jsx +95 -0
- package/dist/cases/danger-zone.md +263 -0
- package/dist/cases/device-login.md +0 -4
- package/dist/cases/email-confirmed.md +0 -4
- package/dist/cases/empty-list.md +0 -4
- package/dist/cases/empty-lists.md +0 -4
- package/dist/cases/empty-not-set-up.md +0 -4
- package/dist/cases/empty-search.md +0 -4
- package/dist/cases/error-page/in-shell.jsx +26 -17
- package/dist/cases/error-page.md +42 -25
- package/dist/cases/feedback-form.md +0 -4
- package/dist/cases/filter-menu/presets.d.ts +1 -0
- package/dist/cases/filter-menu/presets.jsx +53 -0
- package/dist/cases/filter-menu/with-clear.d.ts +1 -0
- package/dist/cases/filter-menu/with-clear.jsx +56 -0
- package/dist/cases/filter-menu.md +204 -0
- package/dist/cases/forgot-password.md +0 -4
- package/dist/cases/form-errors.md +0 -4
- package/dist/cases/import-checklist.md +0 -4
- package/dist/cases/inline-form-feedback.md +0 -4
- package/dist/cases/integrations-list/nested.d.ts +1 -0
- package/dist/cases/integrations-list/nested.jsx +164 -0
- package/dist/cases/integrations-list/rows.d.ts +1 -0
- package/dist/cases/integrations-list/rows.jsx +134 -0
- package/dist/cases/integrations-list.md +379 -0
- package/dist/cases/invite-member.md +0 -4
- package/dist/cases/load-failure.md +0 -4
- package/dist/cases/log-out-confirm.md +0 -4
- package/dist/cases/login-page.md +0 -4
- package/dist/cases/master-detail/list-then-page.d.ts +1 -0
- package/dist/cases/master-detail/list-then-page.jsx +65 -0
- package/dist/cases/master-detail/split.d.ts +1 -0
- package/dist/cases/master-detail/split.jsx +49 -0
- package/dist/cases/master-detail.md +213 -0
- package/dist/cases/members-list/rows.d.ts +1 -0
- package/dist/cases/members-list/rows.jsx +318 -0
- package/dist/cases/members-list/table.d.ts +1 -0
- package/dist/cases/members-list/table.jsx +351 -0
- package/dist/cases/members-list.md +799 -0
- package/dist/cases/mention-list.md +0 -4
- package/dist/cases/message-actions.md +0 -4
- package/dist/cases/message-attachments.md +0 -4
- package/dist/cases/message-composer.md +0 -4
- package/dist/cases/message-edit.md +0 -4
- package/dist/cases/message-reactions.md +0 -4
- package/dist/cases/message-row.md +0 -4
- package/dist/cases/mobile-menu/links.d.ts +1 -0
- package/dist/cases/mobile-menu/links.jsx +24 -0
- package/dist/cases/mobile-menu/sections.d.ts +1 -0
- package/dist/cases/mobile-menu/sections.jsx +61 -0
- package/dist/cases/mobile-menu.md +170 -0
- package/dist/cases/not-found-page/in-shell.jsx +26 -17
- package/dist/cases/not-found-page.md +41 -24
- package/dist/cases/notification-menu/menu.d.ts +1 -0
- package/dist/cases/notification-menu/menu.jsx +74 -0
- package/dist/cases/notification-menu.md +135 -0
- package/dist/cases/oauth-consent.md +0 -4
- package/dist/cases/on-off-settings/list.d.ts +1 -0
- package/dist/cases/on-off-settings/list.jsx +97 -0
- package/dist/cases/on-off-settings.md +116 -0
- package/dist/cases/on-this-page/aside.d.ts +1 -0
- package/dist/cases/on-this-page/aside.jsx +39 -0
- package/dist/cases/on-this-page.md +80 -0
- package/dist/cases/overflow-menu/in-a-header.d.ts +1 -0
- package/dist/cases/overflow-menu/in-a-header.jsx +128 -0
- package/dist/cases/overflow-menu/on-a-row.d.ts +1 -0
- package/dist/cases/overflow-menu/on-a-row.jsx +183 -0
- package/dist/cases/overflow-menu.md +410 -0
- package/dist/cases/page-header/actions.d.ts +1 -0
- package/dist/cases/page-header/actions.jsx +65 -0
- package/dist/cases/page-header/sub-page.d.ts +1 -0
- package/dist/cases/page-header/sub-page.jsx +37 -0
- package/dist/cases/page-header.md +195 -0
- package/dist/cases/phone-navigation.md +32 -0
- package/dist/cases/profile-form/form.d.ts +1 -0
- package/dist/cases/profile-form/form.jsx +153 -0
- package/dist/cases/profile-form.md +236 -0
- package/dist/cases/quick-switcher/modal.d.ts +1 -0
- package/dist/cases/quick-switcher/modal.jsx +114 -0
- package/dist/cases/quick-switcher.md +205 -0
- package/dist/cases/range-switch/segmented.d.ts +1 -0
- package/dist/cases/range-switch/segmented.jsx +30 -0
- package/dist/cases/range-switch.md +67 -0
- package/dist/cases/rename.md +0 -4
- package/dist/cases/reply-feedback.md +0 -4
- package/dist/cases/reply-sources.md +0 -4
- package/dist/cases/route-loading/region.jsx +27 -18
- package/dist/cases/route-loading.md +42 -23
- package/dist/cases/scope-picker/menu.d.ts +1 -0
- package/dist/cases/scope-picker/menu.jsx +47 -0
- package/dist/cases/scope-picker.md +97 -0
- package/dist/cases/set-new-password.md +0 -4
- package/dist/cases/settings-page/side-nav.d.ts +1 -0
- package/dist/cases/settings-page/side-nav.jsx +171 -0
- package/dist/cases/settings-page/top-tabs.d.ts +1 -0
- package/dist/cases/settings-page/top-tabs.jsx +129 -0
- package/dist/cases/settings-page.md +378 -0
- package/dist/cases/settings-save.md +35 -0
- package/dist/cases/side-pane/beside.d.ts +1 -0
- package/dist/cases/side-pane/beside.jsx +79 -0
- package/dist/cases/side-pane/over.d.ts +1 -0
- package/dist/cases/side-pane/over.jsx +58 -0
- package/dist/cases/side-pane.md +238 -0
- package/dist/cases/sidebar-nav/flat.d.ts +1 -0
- package/dist/cases/sidebar-nav/flat.jsx +81 -0
- package/dist/cases/sidebar-nav/nested.d.ts +1 -0
- package/dist/cases/sidebar-nav/nested.jsx +122 -0
- package/dist/cases/sidebar-nav.md +261 -0
- package/dist/cases/sign-up-page.md +1 -5
- package/dist/cases/site-footer/columns.d.ts +1 -0
- package/dist/cases/site-footer/columns.jsx +51 -0
- package/dist/cases/site-footer/simple.d.ts +1 -0
- package/dist/cases/site-footer/simple.jsx +24 -0
- package/dist/cases/site-footer.md +133 -0
- package/dist/cases/site-header/links.d.ts +1 -0
- package/dist/cases/site-header/links.jsx +26 -0
- package/dist/cases/site-header/sections.d.ts +1 -0
- package/dist/cases/site-header/sections.jsx +64 -0
- package/dist/cases/site-header.md +183 -0
- package/dist/cases/slash-command-list.md +0 -4
- package/dist/cases/success-feedback.md +0 -4
- package/dist/cases/tag-filter/tags.d.ts +1 -0
- package/dist/cases/tag-filter/tags.jsx +226 -0
- package/dist/cases/tag-filter.md +298 -0
- package/dist/cases/theme-switcher/menu.d.ts +1 -0
- package/dist/cases/theme-switcher/menu.jsx +47 -0
- package/dist/cases/theme-switcher/segmented.d.ts +1 -0
- package/dist/cases/theme-switcher/segmented.jsx +26 -0
- package/dist/cases/theme-switcher.md +149 -0
- package/dist/cases/type-to-confirm.md +0 -4
- package/dist/cases/typing-and-status.md +0 -4
- package/dist/cases/unsaved-changes-guard.md +0 -4
- package/dist/cases/upgrade-prompt.md +0 -4
- package/dist/cases.json +1737 -315
- package/dist/components/alert.d.ts +3 -1
- package/dist/components/alert.jsx +2 -2
- package/dist/components/appShell.d.ts +44 -0
- package/dist/components/appShell.jsx +121 -0
- package/dist/components/button.jsx +5 -2
- package/dist/components/checkBox.d.ts +5 -1
- package/dist/components/checkBox.jsx +2 -2
- package/dist/components/copyField.d.ts +20 -0
- package/dist/components/copyField.jsx +99 -0
- package/dist/components/drawer.d.ts +31 -0
- package/dist/components/drawer.jsx +121 -0
- package/dist/components/formField.d.ts +34 -0
- package/dist/components/formField.jsx +28 -0
- package/dist/components/heading.d.ts +5 -1
- package/dist/components/heading.jsx +2 -2
- package/dist/components/link.d.ts +6 -1
- package/dist/components/link.jsx +11 -3
- package/dist/components/menu.jsx +2 -2
- package/dist/components/menuItem.d.ts +10 -2
- package/dist/components/menuItem.jsx +4 -3
- package/dist/components/modal.jsx +12 -23
- package/dist/components/navigation.d.ts +9 -1
- package/dist/components/navigation.jsx +15 -3
- package/dist/components/onThisPage.d.ts +29 -0
- package/dist/components/onThisPage.jsx +151 -0
- package/dist/components/pageShell.d.ts +7 -1
- package/dist/components/pageShell.jsx +14 -1
- package/dist/components/popover.jsx +4 -0
- package/dist/components/radioGroup.d.ts +5 -1
- package/dist/components/radioGroup.jsx +2 -2
- package/dist/components/segmentedControl.d.ts +22 -0
- package/dist/components/segmentedControl.jsx +54 -0
- package/dist/components/select.d.ts +5 -1
- package/dist/components/select.jsx +2 -2
- package/dist/components/settingsSection.d.ts +36 -0
- package/dist/components/settingsSection.jsx +65 -0
- package/dist/components/sidePane.d.ts +32 -0
- package/dist/components/sidePane.jsx +128 -0
- package/dist/components/siteFooter.d.ts +24 -0
- package/dist/components/siteFooter.jsx +48 -0
- package/dist/components/siteHeader.d.ts +55 -0
- package/dist/components/siteHeader.jsx +125 -0
- package/dist/components/slidingIndicator.d.ts +50 -0
- package/dist/components/slidingIndicator.jsx +102 -0
- package/dist/components/switch.d.ts +25 -0
- package/dist/components/switch.jsx +55 -0
- package/dist/components/tab.jsx +5 -11
- package/dist/components/tabsContainer.jsx +5 -67
- package/dist/components/textField.d.ts +12 -2
- package/dist/components/textField.jsx +11 -4
- package/dist/components/textarea.d.ts +5 -1
- package/dist/components/textarea.jsx +3 -3
- package/dist/components/titleBar.d.ts +17 -0
- package/dist/components/titleBar.jsx +17 -0
- package/dist/components/useHotkey.d.ts +7 -0
- package/dist/components/useHotkey.js +24 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +13 -0
- package/dist/internal/copyField.d.ts +5 -0
- package/dist/internal/copyField.js +61 -0
- package/dist/internal/hotkey.d.ts +16 -0
- package/dist/internal/hotkey.js +20 -0
- package/dist/internal/overlayStack.d.ts +24 -0
- package/dist/internal/overlayStack.js +71 -0
- package/dist/internal/resize.d.ts +9 -0
- package/dist/internal/resize.js +31 -0
- package/dist/internal/scrollSpy.d.ts +24 -0
- package/dist/internal/scrollSpy.js +53 -0
- package/dist/internal/siteBrand.d.ts +6 -0
- package/dist/internal/siteBrand.jsx +11 -0
- package/dist/internal/switch.d.ts +5 -0
- package/dist/internal/switch.js +9 -0
- package/dist/native-mapping.json +72 -0
- package/dist/stories/AppShell.stories.d.ts +15 -0
- package/dist/stories/AppShell.stories.jsx +137 -0
- package/dist/stories/Cases.generated.stories.d.ts +42 -0
- package/dist/stories/Cases.generated.stories.jsx +84 -0
- package/dist/stories/CopyField.stories.d.ts +11 -0
- package/dist/stories/CopyField.stories.jsx +65 -0
- package/dist/stories/Drawer.stories.d.ts +10 -0
- package/dist/stories/Drawer.stories.jsx +123 -0
- package/dist/stories/FormField.stories.d.ts +6 -0
- package/dist/stories/FormField.stories.jsx +44 -0
- package/dist/stories/Link.stories.d.ts +1 -0
- package/dist/stories/Link.stories.jsx +8 -0
- package/dist/stories/Navigation.stories.d.ts +1 -0
- package/dist/stories/Navigation.stories.jsx +17 -1
- package/dist/stories/OnThisPage.stories.d.ts +10 -0
- package/dist/stories/OnThisPage.stories.jsx +105 -0
- package/dist/stories/SegmentedControl.stories.d.ts +8 -0
- package/dist/stories/SegmentedControl.stories.jsx +33 -0
- package/dist/stories/SettingsSection.stories.d.ts +12 -0
- package/dist/stories/SettingsSection.stories.jsx +91 -0
- package/dist/stories/SidePane.stories.d.ts +6 -0
- package/dist/stories/SidePane.stories.jsx +37 -0
- package/dist/stories/SiteFooter.stories.d.ts +7 -0
- package/dist/stories/SiteFooter.stories.jsx +63 -0
- package/dist/stories/SiteHeader.stories.d.ts +10 -0
- package/dist/stories/SiteHeader.stories.jsx +94 -0
- package/dist/stories/Switch.stories.d.ts +14 -0
- package/dist/stories/Switch.stories.jsx +87 -0
- package/dist/stories/TextField.stories.d.ts +1 -0
- package/dist/stories/TextField.stories.jsx +13 -0
- package/dist/stories/TitleBar.stories.d.ts +6 -0
- package/dist/stories/TitleBar.stories.jsx +34 -0
- package/package.json +5 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import Heading from '../../components/heading';
|
|
4
|
+
import Paragraph from '../../components/paragraph';
|
|
5
|
+
import Button from '../../components/button';
|
|
6
|
+
import Popover from '../../components/popover';
|
|
7
|
+
import Menu from '../../components/menu';
|
|
8
|
+
import MenuItem from '../../components/menuItem';
|
|
9
|
+
import Line from '../../components/line';
|
|
10
|
+
import { Center, Cluster, Stack } from '../../components/layout';
|
|
11
|
+
var workspaces = ['Acme Design', 'Acme Engineering', 'Acme Marketing'];
|
|
12
|
+
var all = 'All Workspaces';
|
|
13
|
+
export default function ScopePickerMenu() {
|
|
14
|
+
// null means every workspace.
|
|
15
|
+
var _a = useState(null), scope = _a[0], setScope = _a[1];
|
|
16
|
+
var _b = useState(null), anchor = _b[0], setAnchor = _b[1];
|
|
17
|
+
var _c = useState(false), open = _c[0], setOpen = _c[1];
|
|
18
|
+
var label = scope !== null && scope !== void 0 ? scope : all;
|
|
19
|
+
function toggle(anchorEl) {
|
|
20
|
+
setAnchor(anchorEl);
|
|
21
|
+
setOpen(function (o) { return !o; });
|
|
22
|
+
}
|
|
23
|
+
function choose(next) {
|
|
24
|
+
setScope(next);
|
|
25
|
+
setOpen(false);
|
|
26
|
+
}
|
|
27
|
+
return (<Center width="page">
|
|
28
|
+
<Stack gap="large">
|
|
29
|
+
<Heading level={1} size="h5">Ask Acme</Heading>
|
|
30
|
+
<Cluster gap="small">
|
|
31
|
+
<Paragraph tone="secondary" size="body2" measure="none">Searching in</Paragraph>
|
|
32
|
+
{/* The label is the scope. The chevron says it opens a menu. */}
|
|
33
|
+
<Button size="small" type="tertiary" state={open ? 'selected' : 'enabled'} label={label} actionIcon="ChevronDown" aria-label={"".concat(label, ", change where to search")} aria-haspopup="menu" aria-expanded={open} onClickButton={function (e) { return toggle(e.currentTarget); }}/>
|
|
34
|
+
</Cluster>
|
|
35
|
+
<Paragraph tone="secondary" size="body2" measure="none">
|
|
36
|
+
{scope ? "Answers use only ".concat(scope, ".") : "Answers use all ".concat(workspaces.length, " of your workspaces.")}
|
|
37
|
+
</Paragraph>
|
|
38
|
+
</Stack>
|
|
39
|
+
<Popover open={open} anchorEl={anchor} onClose={function () { return setOpen(false); }} returnFocus>
|
|
40
|
+
<Menu navigable aria-label="Where to search" width={220}>
|
|
41
|
+
<MenuItem size="small" label={all} isSelected={scope === null} role="menuitemradio" onClick={function () { return choose(null); }}/>
|
|
42
|
+
<Line />
|
|
43
|
+
{workspaces.map(function (w) { return (<MenuItem key={w} size="small" label={w} isSelected={scope === w} role="menuitemradio" onClick={function () { return choose(w); }}/>); })}
|
|
44
|
+
</Menu>
|
|
45
|
+
</Popover>
|
|
46
|
+
</Center>);
|
|
47
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Scope picker
|
|
2
|
+
|
|
3
|
+
A person chooses where a search or a question looks, such as one workspace or all of them.
|
|
4
|
+
|
|
5
|
+
## Do
|
|
6
|
+
|
|
7
|
+
- Use a small tertiary `Button` whose label is the current scope, with `actionIcon="ChevronDown"` so it looks like it opens a menu.
|
|
8
|
+
- Open a navigable menu from it: `<Popover returnFocus>` around `<Menu navigable aria-label="Where to search">` with `onClick` items.
|
|
9
|
+
- Put 'All Workspaces' first, then a `Line`, then one item for each workspace.
|
|
10
|
+
- Give each item `role="menuitemradio"` and mark the current scope with `isSelected`, which sets `aria-checked`.
|
|
11
|
+
- Give the Button an `aria-label` that starts with its label and says what it does: 'Acme Design, change where to search'.
|
|
12
|
+
- Set `aria-haspopup="menu"` and `aria-expanded` on the Button, and `state="selected"` while the menu is open.
|
|
13
|
+
- Say what the scope means under the control, such as which workspaces the answers use.
|
|
14
|
+
|
|
15
|
+
## Don't
|
|
16
|
+
|
|
17
|
+
- Do not use a `Select` for a scope that sits in a toolbar.
|
|
18
|
+
- Do not put the scope in the Button without a chevron.
|
|
19
|
+
- Do not open the menu when the page loads.
|
|
20
|
+
- Do not keep the menu open after a choice.
|
|
21
|
+
|
|
22
|
+
## Example: Button with a menu
|
|
23
|
+
|
|
24
|
+
Uses: `Button`, `Center`, `Cluster`, `Heading`, `Line`, `Menu`, `MenuItem`, `Paragraph`, `Popover`, `Stack`
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
'use client';
|
|
28
|
+
import { useState } from 'react';
|
|
29
|
+
import Heading from 'oneslash-design-system/components/heading';
|
|
30
|
+
import Paragraph from 'oneslash-design-system/components/paragraph';
|
|
31
|
+
import Button from 'oneslash-design-system/components/button';
|
|
32
|
+
import Popover from 'oneslash-design-system/components/popover';
|
|
33
|
+
import Menu from 'oneslash-design-system/components/menu';
|
|
34
|
+
import MenuItem from 'oneslash-design-system/components/menuItem';
|
|
35
|
+
import Line from 'oneslash-design-system/components/line';
|
|
36
|
+
import { Center, Cluster, Stack } from 'oneslash-design-system/components/layout';
|
|
37
|
+
|
|
38
|
+
const workspaces = ['Acme Design', 'Acme Engineering', 'Acme Marketing'];
|
|
39
|
+
const all = 'All Workspaces';
|
|
40
|
+
|
|
41
|
+
export default function ScopePickerMenu() {
|
|
42
|
+
// null means every workspace.
|
|
43
|
+
const [scope, setScope] = useState<string | null>(null);
|
|
44
|
+
const [anchor, setAnchor] = useState<HTMLElement | null>(null);
|
|
45
|
+
const [open, setOpen] = useState(false);
|
|
46
|
+
const label = scope ?? all;
|
|
47
|
+
|
|
48
|
+
function toggle(anchorEl: HTMLElement) {
|
|
49
|
+
setAnchor(anchorEl);
|
|
50
|
+
setOpen((o) => !o);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function choose(next: string | null) {
|
|
54
|
+
setScope(next);
|
|
55
|
+
setOpen(false);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<Center width="page">
|
|
60
|
+
<Stack gap="large">
|
|
61
|
+
<Heading level={1} size="h5">Ask Acme</Heading>
|
|
62
|
+
<Cluster gap="small">
|
|
63
|
+
<Paragraph tone="secondary" size="body2" measure="none">Searching in</Paragraph>
|
|
64
|
+
{/* The label is the scope. The chevron says it opens a menu. */}
|
|
65
|
+
<Button
|
|
66
|
+
size="small"
|
|
67
|
+
type="tertiary"
|
|
68
|
+
state={open ? 'selected' : 'enabled'}
|
|
69
|
+
label={label}
|
|
70
|
+
actionIcon="ChevronDown"
|
|
71
|
+
aria-label={`${label}, change where to search`}
|
|
72
|
+
aria-haspopup="menu"
|
|
73
|
+
aria-expanded={open}
|
|
74
|
+
onClickButton={(e: { currentTarget: HTMLElement }) => toggle(e.currentTarget)}
|
|
75
|
+
/>
|
|
76
|
+
</Cluster>
|
|
77
|
+
<Paragraph tone="secondary" size="body2" measure="none">
|
|
78
|
+
{scope ? `Answers use only ${scope}.` : `Answers use all ${workspaces.length} of your workspaces.`}
|
|
79
|
+
</Paragraph>
|
|
80
|
+
</Stack>
|
|
81
|
+
<Popover open={open} anchorEl={anchor} onClose={() => setOpen(false)} returnFocus>
|
|
82
|
+
<Menu navigable aria-label="Where to search" width={220}>
|
|
83
|
+
<MenuItem size="small" label={all} isSelected={scope === null} role="menuitemradio" onClick={() => choose(null)} />
|
|
84
|
+
<Line />
|
|
85
|
+
{workspaces.map((w) => (
|
|
86
|
+
<MenuItem key={w} size="small" label={w} isSelected={scope === w} role="menuitemradio" onClick={() => choose(w)} />
|
|
87
|
+
))}
|
|
88
|
+
</Menu>
|
|
89
|
+
</Popover>
|
|
90
|
+
</Center>
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Native
|
|
96
|
+
|
|
97
|
+
On Apple use a toolbar `Menu` with a `Picker` inside it, and on Android a dropdown menu.
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
A person opened the link to reset their password and now chooses a new one.
|
|
4
4
|
|
|
5
|
-
**Not built yet:** Commentify and Scindo on the web replace the form with a spinner while updating, and show field problems in an Alert above the fields. Both accept 6 characters, and say 'Password must be at least 6 characters.' only after it is broken. Scindo's reset page has no invalid-link state.
|
|
6
|
-
|
|
7
5
|
## Do
|
|
8
6
|
|
|
9
7
|
- Name the page 'Set new password' in a `Heading` with `level={1}`, and name the account it is for.
|
|
@@ -243,5 +241,3 @@ export default function SetNewPasswordInvalidLink() {
|
|
|
243
241
|
);
|
|
244
242
|
}
|
|
245
243
|
```
|
|
246
|
-
|
|
247
|
-
Seen in: Commentify, Scindo.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function SettingsPageSideNav(): import("react").JSX.Element;
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
import { useEffect, useRef, useState } from 'react';
|
|
14
|
+
import Modal from '../../components/modal';
|
|
15
|
+
import Heading from '../../components/heading';
|
|
16
|
+
import Paragraph from '../../components/paragraph';
|
|
17
|
+
import Form from '../../components/form';
|
|
18
|
+
import FormField from '../../components/formField';
|
|
19
|
+
import TextField from '../../components/textField';
|
|
20
|
+
import Switch from '../../components/switch';
|
|
21
|
+
import Button from '../../components/button';
|
|
22
|
+
import Navigation, { NavigationGroup } from '../../components/navigation';
|
|
23
|
+
import MenuItem from '../../components/menuItem';
|
|
24
|
+
import SettingsSection, { SettingsLayout } from '../../components/settingsSection';
|
|
25
|
+
import { Center, Cluster, Stack } from '../../components/layout';
|
|
26
|
+
// Areas in groups, as the side nav lists them. Each is a page of its own in a real app, so it has an `href`.
|
|
27
|
+
var areas = [
|
|
28
|
+
{ id: 'profile', label: 'Profile', icon: 'User', group: 'Account', description: 'How people see you in Acme.' },
|
|
29
|
+
{ id: 'notifications', label: 'Notifications', icon: 'Bell', group: 'Account', description: 'Choose what reaches you.' },
|
|
30
|
+
{ id: 'general', label: 'General', icon: 'Settings', group: 'Workspace', description: 'The name and defaults of the Acme workspace.' },
|
|
31
|
+
{ id: 'members', label: 'Members', icon: 'Users', group: 'Workspace', description: 'Who is in Acme, and what they can do.' },
|
|
32
|
+
{ id: 'billing', label: 'Billing', icon: 'CreditCard', group: 'Workspace', description: 'Your plan and invoices.' },
|
|
33
|
+
{ id: 'api-keys', label: 'API Keys', icon: 'Key', group: 'Developers', description: 'Keys for tools that use Acme.' },
|
|
34
|
+
{ id: 'webhooks', label: 'Webhooks', icon: 'Webhook', group: 'Developers', description: 'Send Acme events to other tools.' },
|
|
35
|
+
];
|
|
36
|
+
var groups = ['Account', 'Workspace', 'Developers'];
|
|
37
|
+
export default function SettingsPageSideNav() {
|
|
38
|
+
var _a;
|
|
39
|
+
var _b = useState('profile'), areaId = _b[0], setAreaId = _b[1];
|
|
40
|
+
// On a phone the nav is the page: it shows until the person opens an area, and 'Back to Settings' returns to it.
|
|
41
|
+
var _c = useState(false), opened = _c[0], setOpened = _c[1];
|
|
42
|
+
var _d = useState('Dana Lee'), savedName = _d[0], setSavedName = _d[1];
|
|
43
|
+
var _e = useState('Dana Lee'), name = _e[0], setName = _e[1];
|
|
44
|
+
var _f = useState(''), nameError = _f[0], setNameError = _f[1];
|
|
45
|
+
var _g = useState(false), saving = _g[0], setSaving = _g[1];
|
|
46
|
+
var _h = useState(false), saved = _h[0], setSaved = _h[1];
|
|
47
|
+
var _j = useState({ mentions: true, digest: false }), values = _j[0], setValues = _j[1];
|
|
48
|
+
var _k = useState({ mentions: false, digest: false }), busy = _k[0], setBusy = _k[1];
|
|
49
|
+
var _l = useState(false), confirmingLogOut = _l[0], setConfirmingLogOut = _l[1];
|
|
50
|
+
var _m = useState(false), loggingOut = _m[0], setLoggingOut = _m[1];
|
|
51
|
+
var _o = useState(false), loggedOut = _o[0], setLoggedOut = _o[1];
|
|
52
|
+
var timers = useRef([]);
|
|
53
|
+
// Cleared before a new 'Saved' starts, so an old timer cannot end it early.
|
|
54
|
+
var savedTimer = useRef();
|
|
55
|
+
// Stops every request and the 'Saved' if the example goes away before they end.
|
|
56
|
+
useEffect(function () { return function () {
|
|
57
|
+
timers.current.forEach(clearTimeout);
|
|
58
|
+
clearTimeout(savedTimer.current);
|
|
59
|
+
}; }, []);
|
|
60
|
+
var area = (_a = areas.find(function (a) { return a.id === areaId; })) !== null && _a !== void 0 ? _a : areas[0];
|
|
61
|
+
function handleOpen(id) {
|
|
62
|
+
setAreaId(id);
|
|
63
|
+
setOpened(true);
|
|
64
|
+
}
|
|
65
|
+
// Escape, a click outside and Cancel all close it, except while the request runs.
|
|
66
|
+
function handleLogOutClose() {
|
|
67
|
+
if (loggingOut)
|
|
68
|
+
return;
|
|
69
|
+
setConfirmingLogOut(false);
|
|
70
|
+
}
|
|
71
|
+
function handleLogOut() {
|
|
72
|
+
if (loggingOut)
|
|
73
|
+
return;
|
|
74
|
+
setLoggingOut(true);
|
|
75
|
+
timers.current.push(setTimeout(function () {
|
|
76
|
+
setLoggingOut(false);
|
|
77
|
+
setConfirmingLogOut(false);
|
|
78
|
+
setLoggedOut(true);
|
|
79
|
+
}, 1200));
|
|
80
|
+
}
|
|
81
|
+
// A group of fields has one Save Button: `loading`, then 'Saved' for 2 seconds.
|
|
82
|
+
function handleSave() {
|
|
83
|
+
if (saving)
|
|
84
|
+
return;
|
|
85
|
+
if (!name.trim()) {
|
|
86
|
+
setNameError('Enter your name.');
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
setNameError('');
|
|
90
|
+
setSaving(true);
|
|
91
|
+
// Stands in for the request to the server.
|
|
92
|
+
timers.current.push(setTimeout(function () {
|
|
93
|
+
setSavedName(name.trim());
|
|
94
|
+
setName(name.trim());
|
|
95
|
+
setSaving(false);
|
|
96
|
+
setSaved(true);
|
|
97
|
+
clearTimeout(savedTimer.current);
|
|
98
|
+
savedTimer.current = setTimeout(function () { return setSaved(false); }, 2000);
|
|
99
|
+
}, 1200));
|
|
100
|
+
}
|
|
101
|
+
// A switch on its own saves as soon as it changes, and shows nothing when it works.
|
|
102
|
+
function handleSwitch(key, next) {
|
|
103
|
+
setBusy(function (current) {
|
|
104
|
+
var _a;
|
|
105
|
+
return (__assign(__assign({}, current), (_a = {}, _a[key] = true, _a)));
|
|
106
|
+
});
|
|
107
|
+
setValues(function (current) {
|
|
108
|
+
var _a;
|
|
109
|
+
return (__assign(__assign({}, current), (_a = {}, _a[key] = next, _a)));
|
|
110
|
+
});
|
|
111
|
+
timers.current.push(setTimeout(function () { return setBusy(function (current) {
|
|
112
|
+
var _a;
|
|
113
|
+
return (__assign(__assign({}, current), (_a = {}, _a[key] = false, _a)));
|
|
114
|
+
}); }, 900));
|
|
115
|
+
}
|
|
116
|
+
var profile = (<SettingsSection id="settings-page-nav-name" title="Name" description="How people see you in messages and on tasks.">
|
|
117
|
+
<Form aria-label="Name" gap="medium" onSubmit={handleSave}>
|
|
118
|
+
<FormField id="settings-page-nav-name-field" label="Name" error={nameError}>
|
|
119
|
+
{function (f) { return <TextField id={f.id} aria-describedby={f['aria-describedby']} aria-invalid={f['aria-invalid']} value={name} disabled={saving} onChange={function (e) { setName(e.target.value); setNameError(''); setSaved(false); }}/>; }}
|
|
120
|
+
</FormField>
|
|
121
|
+
<Cluster>
|
|
122
|
+
<Button size="medium" type="primary" state={name !== savedName || saving ? 'enabled' : 'disabled'} label={saved ? 'Saved' : 'Save'} htmlType="submit" loading={saving}/>
|
|
123
|
+
</Cluster>
|
|
124
|
+
</Form>
|
|
125
|
+
</SettingsSection>);
|
|
126
|
+
var notifications = (<SettingsSection id="settings-page-nav-email" title="Email" description="Sent to dana@acme.example.">
|
|
127
|
+
<Switch id="settings-page-nav-mentions" label="Mentions" description="An email when someone mentions you." checked={values.mentions} busy={busy.mentions} onChange={function (next) { return handleSwitch('mentions', next); }}/>
|
|
128
|
+
<Switch id="settings-page-nav-digest" label="Weekly digest" description="A summary of last week, every Monday." checked={values.digest} busy={busy.digest} onChange={function (next) { return handleSwitch('digest', next); }}/>
|
|
129
|
+
</SettingsSection>);
|
|
130
|
+
// A real app goes to its login page here. The example shows a short logged-out page instead.
|
|
131
|
+
if (loggedOut) {
|
|
132
|
+
return (<Center fill>
|
|
133
|
+
<Heading level={1} size="h5">You are logged out</Heading>
|
|
134
|
+
<Cluster>
|
|
135
|
+
<Button size="medium" type="primary" state="enabled" label="Log In" onClickButton={function () { return setLoggedOut(false); }}/>
|
|
136
|
+
</Cluster>
|
|
137
|
+
</Center>);
|
|
138
|
+
}
|
|
139
|
+
var nav = (<Navigation aria-label="Settings">
|
|
140
|
+
{groups.map(function (group) { return (<NavigationGroup key={group} label={group}>
|
|
141
|
+
{areas.filter(function (a) { return a.group === group; }).map(function (a) { return (<MenuItem key={a.id} size="small" label={a.label} iconName={a.icon} href={"/settings/".concat(a.id)} isSelected={a.id === area.id} aria-current={a.id === area.id ? 'page' : undefined} onClick={function (event) {
|
|
142
|
+
// A real app lets the link go to its page. The example keeps the choice in state.
|
|
143
|
+
event.preventDefault();
|
|
144
|
+
handleOpen(a.id);
|
|
145
|
+
}}/>); })}
|
|
146
|
+
</NavigationGroup>); })}
|
|
147
|
+
<NavigationGroup label="Session">
|
|
148
|
+
<MenuItem size="small" label="Log Out" iconName="LogOut" role="button" onClick={function () { return setConfirmingLogOut(true); }}/>
|
|
149
|
+
</NavigationGroup>
|
|
150
|
+
</Navigation>);
|
|
151
|
+
return (<Center width="page">
|
|
152
|
+
<Stack gap="xlarge">
|
|
153
|
+
<Heading level={1} size="h5">Settings</Heading>
|
|
154
|
+
<SettingsLayout nav={nav} showContent={opened} back={<Button size="small" type="tertiary" state="enabled" decoIcon="ChevronLeft" label="Back to Settings" onClickButton={function () { return setOpened(false); }}/>}>
|
|
155
|
+
<Stack gap="small">
|
|
156
|
+
<Heading level={2} size="h6">{area.label}</Heading>
|
|
157
|
+
<Paragraph tone="secondary" size="body2" measure="none">{area.description}</Paragraph>
|
|
158
|
+
</Stack>
|
|
159
|
+
{area.id === 'profile' && profile}
|
|
160
|
+
{area.id === 'notifications' && notifications}
|
|
161
|
+
{area.id !== 'profile' && area.id !== 'notifications' && (<Paragraph size="body2" measure="none">Nothing to show for {area.label} in this example.</Paragraph>)}
|
|
162
|
+
</SettingsLayout>
|
|
163
|
+
</Stack>
|
|
164
|
+
<Modal isOpen={confirmingLogOut} size="small" title="Log Out" onClose={handleLogOutClose} actions={<>
|
|
165
|
+
<Button size="small" type="tertiary" state={loggingOut ? 'disabled' : 'enabled'} label="Cancel" onClickButton={handleLogOutClose}/>
|
|
166
|
+
<Button size="small" type="primary" state="enabled" label="Log Out" loading={loggingOut} onClickButton={handleLogOut}/>
|
|
167
|
+
</>}>
|
|
168
|
+
<Paragraph measure="none">You will need to log in again to use Acme on this device.</Paragraph>
|
|
169
|
+
</Modal>
|
|
170
|
+
</Center>);
|
|
171
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function SettingsPageTopTabs(): import("react").JSX.Element;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
import { useEffect, useRef, useState } from 'react';
|
|
14
|
+
import Heading from '../../components/heading';
|
|
15
|
+
import Paragraph from '../../components/paragraph';
|
|
16
|
+
import List from '../../components/list';
|
|
17
|
+
import Form from '../../components/form';
|
|
18
|
+
import FormField from '../../components/formField';
|
|
19
|
+
import TextField from '../../components/textField';
|
|
20
|
+
import Switch from '../../components/switch';
|
|
21
|
+
import Button from '../../components/button';
|
|
22
|
+
import TabsContainer from '../../components/tabsContainer';
|
|
23
|
+
import Tab from '../../components/tab';
|
|
24
|
+
import SettingsSection, { SettingsColumns } from '../../components/settingsSection';
|
|
25
|
+
import { Center, Cluster, Stack } from '../../components/layout';
|
|
26
|
+
// Four areas or fewer, each named with one short word, so the tabs fit on a phone. Each tab is a page of its own in a real app, so it has an `href`.
|
|
27
|
+
var areas = [
|
|
28
|
+
{ id: 'profile', label: 'Profile' },
|
|
29
|
+
{ id: 'notifications', label: 'Notifications' },
|
|
30
|
+
{ id: 'billing', label: 'Billing' },
|
|
31
|
+
];
|
|
32
|
+
var invoices = ['January 2025, $40.00', 'December 2024, $40.00', 'November 2024, $40.00'];
|
|
33
|
+
export default function SettingsPageTopTabs() {
|
|
34
|
+
var _a = useState('profile'), area = _a[0], setArea = _a[1];
|
|
35
|
+
var _b = useState('Dana Lee'), savedName = _b[0], setSavedName = _b[1];
|
|
36
|
+
var _c = useState('Dana Lee'), name = _c[0], setName = _c[1];
|
|
37
|
+
var _d = useState(''), nameError = _d[0], setNameError = _d[1];
|
|
38
|
+
var _e = useState(false), saving = _e[0], setSaving = _e[1];
|
|
39
|
+
var _f = useState(false), saved = _f[0], setSaved = _f[1];
|
|
40
|
+
var _g = useState({ mentions: true, digest: false }), values = _g[0], setValues = _g[1];
|
|
41
|
+
var _h = useState({ mentions: false, digest: false }), busy = _h[0], setBusy = _h[1];
|
|
42
|
+
// A real app passes the router from its framework, such as Next's useRouter(). Here it sets the open area.
|
|
43
|
+
var router = { push: function (url) { return setArea(url.split('/').pop()); } };
|
|
44
|
+
var timers = useRef([]);
|
|
45
|
+
// Cleared before a new 'Saved' starts, so an old timer cannot end it early.
|
|
46
|
+
var savedTimer = useRef();
|
|
47
|
+
// Stops every request and the 'Saved' if the example goes away before they end.
|
|
48
|
+
useEffect(function () { return function () {
|
|
49
|
+
timers.current.forEach(clearTimeout);
|
|
50
|
+
clearTimeout(savedTimer.current);
|
|
51
|
+
}; }, []);
|
|
52
|
+
// A group of fields has one Save Button: `loading`, then 'Saved' for 2 seconds.
|
|
53
|
+
function handleSave() {
|
|
54
|
+
if (saving)
|
|
55
|
+
return;
|
|
56
|
+
if (!name.trim()) {
|
|
57
|
+
setNameError('Enter your name.');
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
setNameError('');
|
|
61
|
+
setSaving(true);
|
|
62
|
+
// Stands in for the request to the server.
|
|
63
|
+
timers.current.push(setTimeout(function () {
|
|
64
|
+
setSavedName(name.trim());
|
|
65
|
+
setName(name.trim());
|
|
66
|
+
setSaving(false);
|
|
67
|
+
setSaved(true);
|
|
68
|
+
clearTimeout(savedTimer.current);
|
|
69
|
+
savedTimer.current = setTimeout(function () { return setSaved(false); }, 2000);
|
|
70
|
+
}, 1200));
|
|
71
|
+
}
|
|
72
|
+
// A switch on its own saves as soon as it changes, and shows nothing when it works.
|
|
73
|
+
function handleSwitch(key, next) {
|
|
74
|
+
setBusy(function (current) {
|
|
75
|
+
var _a;
|
|
76
|
+
return (__assign(__assign({}, current), (_a = {}, _a[key] = true, _a)));
|
|
77
|
+
});
|
|
78
|
+
setValues(function (current) {
|
|
79
|
+
var _a;
|
|
80
|
+
return (__assign(__assign({}, current), (_a = {}, _a[key] = next, _a)));
|
|
81
|
+
});
|
|
82
|
+
timers.current.push(setTimeout(function () { return setBusy(function (current) {
|
|
83
|
+
var _a;
|
|
84
|
+
return (__assign(__assign({}, current), (_a = {}, _a[key] = false, _a)));
|
|
85
|
+
}); }, 900));
|
|
86
|
+
}
|
|
87
|
+
var profile = (<SettingsColumns>
|
|
88
|
+
<SettingsSection id="settings-page-tabs-name" title="Name" description="How people see you in messages and on tasks.">
|
|
89
|
+
<Form aria-label="Name" gap="medium" onSubmit={handleSave}>
|
|
90
|
+
<FormField id="settings-page-tabs-name-field" label="Name" error={nameError}>
|
|
91
|
+
{function (f) { return <TextField id={f.id} aria-describedby={f['aria-describedby']} aria-invalid={f['aria-invalid']} value={name} disabled={saving} onChange={function (e) { setName(e.target.value); setNameError(''); setSaved(false); }}/>; }}
|
|
92
|
+
</FormField>
|
|
93
|
+
<Cluster>
|
|
94
|
+
<Button size="medium" type="primary" state={name !== savedName || saving ? 'enabled' : 'disabled'} label={saved ? 'Saved' : 'Save'} htmlType="submit" loading={saving}/>
|
|
95
|
+
</Cluster>
|
|
96
|
+
</Form>
|
|
97
|
+
</SettingsSection>
|
|
98
|
+
<SettingsSection id="settings-page-tabs-email" title="Email" description="Where Acme writes to you.">
|
|
99
|
+
<FormField id="settings-page-tabs-email-field" label="Email" help="Only support can change this. Write to help@acme.example.">
|
|
100
|
+
{function (f) { return <TextField id={f.id} aria-describedby={f['aria-describedby']} value="dana@acme.example" readOnly onChange={function () { }}/>; }}
|
|
101
|
+
</FormField>
|
|
102
|
+
</SettingsSection>
|
|
103
|
+
</SettingsColumns>);
|
|
104
|
+
var notifications = (<SettingsColumns>
|
|
105
|
+
<SettingsSection id="settings-page-tabs-email-alerts" title="Email" description="Sent to dana@acme.example.">
|
|
106
|
+
<Switch id="settings-page-tabs-mentions" label="Mentions" description="An email when someone mentions you." checked={values.mentions} busy={busy.mentions} onChange={function (next) { return handleSwitch('mentions', next); }}/>
|
|
107
|
+
<Switch id="settings-page-tabs-digest" label="Weekly digest" description="A summary of last week, every Monday." checked={values.digest} busy={busy.digest} onChange={function (next) { return handleSwitch('digest', next); }}/>
|
|
108
|
+
</SettingsSection>
|
|
109
|
+
</SettingsColumns>);
|
|
110
|
+
var billing = (<SettingsColumns>
|
|
111
|
+
<SettingsSection id="settings-page-tabs-plan" title="Plan" description="Team plan, 5 seats.">
|
|
112
|
+
<Paragraph size="body2" measure="none">Renews on January 15. Only owners can change the plan.</Paragraph>
|
|
113
|
+
</SettingsSection>
|
|
114
|
+
<SettingsSection id="settings-page-tabs-invoices" title="Invoices" description="The last three months.">
|
|
115
|
+
<List items={invoices} size="body2"/>
|
|
116
|
+
</SettingsSection>
|
|
117
|
+
</SettingsColumns>);
|
|
118
|
+
return (<Center width="page">
|
|
119
|
+
<Stack gap="xlarge">
|
|
120
|
+
<Heading level={1} size="h5">Settings</Heading>
|
|
121
|
+
<TabsContainer>
|
|
122
|
+
{areas.map(function (a) { return (<Tab key={a.id} label={a.label} href={"/settings/".concat(a.id)} router={router} isSelected={area === a.id} onClickTab={function () { return setArea(a.id); }}/>); })}
|
|
123
|
+
</TabsContainer>
|
|
124
|
+
{area === 'profile' && profile}
|
|
125
|
+
{area === 'notifications' && notifications}
|
|
126
|
+
{area === 'billing' && billing}
|
|
127
|
+
</Stack>
|
|
128
|
+
</Center>);
|
|
129
|
+
}
|