@anthusai/papyrus 1.19.1 → 2.0.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/app/globals.css +0 -175
- package/app/newsroom/[section]/[...selection]/page.tsx +0 -6
- package/app/newsroom/[section]/page.tsx +2 -4
- package/app/newsroom/articles/page.tsx +1 -2
- package/app/newsroom/sections/[sectionId]/page.tsx +2 -6
- package/bin/papyrus-infra.mjs +11 -2
- package/components/news-desk-page.tsx +3 -4
- package/components/newsroom-ops-shell.tsx +142 -234
- package/components/topic-steering-workspace.tsx +17 -510
- package/lib/newsroom-list-selection.ts +0 -3
- package/lib/newsroom-nav.ts +5 -8
- package/lib/newsroom-section-routing.ts +2 -4
- package/lib/site-brand.ts +1 -8
- package/package.json +2 -3
- package/routes.manifest.json +1 -1
- package/src/cdk-environment.mjs +44 -0
- package/components/newsroom-organizer-shell.tsx +0 -153
|
@@ -1,41 +1,24 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
ClipboardListIcon,
|
|
6
|
-
FileTextIcon,
|
|
7
|
-
LayoutGridIcon,
|
|
8
|
-
MenuIcon,
|
|
9
|
-
SearchIcon,
|
|
10
|
-
TagsIcon,
|
|
11
|
-
} from "lucide-react";
|
|
12
|
-
import Link from "next/link";
|
|
13
|
-
import type { ReactNode } from "react";
|
|
14
|
-
import { useMemo, useState } from "react";
|
|
15
|
-
import { Badge } from "./ui/badge";
|
|
16
|
-
import { Button, buttonVariants } from "./ui/button";
|
|
17
|
-
import { ScrollArea } from "./ui/scroll-area";
|
|
3
|
+
import { SearchIcon } from "lucide-react";
|
|
4
|
+
import { Button } from "./ui/button";
|
|
18
5
|
import { Separator } from "./ui/separator";
|
|
19
|
-
import {
|
|
20
|
-
Sheet,
|
|
21
|
-
SheetContent,
|
|
22
|
-
SheetHeader,
|
|
23
|
-
SheetTitle,
|
|
24
|
-
SheetTrigger,
|
|
25
|
-
} from "./ui/sheet";
|
|
26
|
-
import {
|
|
27
|
-
getNewsroomNavHref,
|
|
28
|
-
NEWSROOM_MOBILE_PRIMARY_NAV,
|
|
29
|
-
NEWSROOM_OPS_NAV,
|
|
30
|
-
type NewsroomNavTabId,
|
|
31
|
-
} from "../lib/newsroom-nav";
|
|
32
|
-
import {
|
|
33
|
-
NEWSROOM_SIDEBAR_NAV_ACTIVE,
|
|
34
|
-
NEWSROOM_SIDEBAR_NAV_INACTIVE,
|
|
35
|
-
} from "../lib/newsroom-list-selection";
|
|
36
6
|
import { cn } from "../lib/utils";
|
|
7
|
+
|
|
8
|
+
import { useEffect, useId, useState, type ReactNode } from "react";
|
|
9
|
+
import Link from "next/link";
|
|
10
|
+
import { usePathname, useRouter, useSearchParams } from "next/navigation";
|
|
11
|
+
import { BookOpen, ClipboardList, Menu, Search, MessagesSquare, PanelLeftClose, PanelLeftOpen, Settings, UserRound, LogIn, LogOut } from "lucide-react";
|
|
12
|
+
import { ORGANIZER_NAV_GROUPS, ORGANIZER_PRIMARY_NAV, ORGANIZER_SETTINGS_DESTINATION } from "../lib/newsroom-organizer-nav";
|
|
13
|
+
import { browserPathToInternalNewsroomPath } from "../lib/newsroom-base-path";
|
|
14
|
+
import { getNewsroomNavHref } from "../lib/newsroom-nav";
|
|
37
15
|
import { SITE_BRAND } from "../lib/site-brand";
|
|
38
|
-
import {
|
|
16
|
+
import { useOptionalNewsDeskClient } from "./news-desk-client-provider";
|
|
17
|
+
import { ReaderAuthControl } from "./reader-auth-control";
|
|
18
|
+
import { ProspectusAccountChooser, useProspectusAccountSummary } from "./prospectus-account-chooser";
|
|
19
|
+
import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetDescription, SheetTrigger } from "./ui/sheet";
|
|
20
|
+
import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuSeparator } from "./ui/dropdown-menu";
|
|
21
|
+
import "./newsroom-organizer.css";
|
|
39
22
|
|
|
40
23
|
export type NewsroomNavCount = {
|
|
41
24
|
count: number | null;
|
|
@@ -44,7 +27,7 @@ export type NewsroomNavCount = {
|
|
|
44
27
|
};
|
|
45
28
|
|
|
46
29
|
export type NewsroomOpsShellProps = {
|
|
47
|
-
activeTab:
|
|
30
|
+
activeTab: string;
|
|
48
31
|
appTitle: string;
|
|
49
32
|
backHref?: string;
|
|
50
33
|
backLabel: string;
|
|
@@ -56,215 +39,140 @@ export type NewsroomOpsShellProps = {
|
|
|
56
39
|
tabCounts?: Partial<Record<string, NewsroomNavCount>>;
|
|
57
40
|
};
|
|
58
41
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
42
|
+
/** The standard place to search the knowledge base; the Search page is the results page. */
|
|
43
|
+
function OrganizerSearch({ demo }: { demo: boolean }) {
|
|
44
|
+
const router = useRouter();
|
|
45
|
+
const searchParams = useSearchParams();
|
|
46
|
+
const [text, setText] = useState(searchParams.get("q") ?? "");
|
|
47
|
+
return <form className="organizer-search" role="search" onSubmit={event => {
|
|
48
|
+
event.preventDefault();
|
|
49
|
+
const query = text.trim();
|
|
50
|
+
if (query) router.push(getNewsroomNavHref(`/newsroom/search?q=${encodeURIComponent(query)}`, demo));
|
|
51
|
+
}}>
|
|
52
|
+
<Search size={14} aria-hidden="true" />
|
|
53
|
+
<input aria-label="Search the knowledge base" data-newsroom-search type="search" onChange={event => setText(event.target.value)} placeholder="Search" value={text} />
|
|
54
|
+
</form>;
|
|
72
55
|
}
|
|
73
56
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
57
|
+
const ICONS = { articles: ClipboardList, references: BookOpen, messages: MessagesSquare };
|
|
58
|
+
|
|
59
|
+
/** Navigation is a presentation layer; existing route and server authorization still own access. */
|
|
60
|
+
function Navigation({ activePath, demo, admin, surface, onNavigate }: { activePath: string; demo: boolean; admin: boolean; surface: string; onNavigate?: () => void }) {
|
|
61
|
+
const id = useId();
|
|
62
|
+
const all = ORGANIZER_NAV_GROUPS.flatMap(group => group.items);
|
|
63
|
+
const active = all.filter(item => [item.path, ...(item.alsoActiveOnPaths ?? [])].some(candidate => activePath === candidate || (candidate !== "/newsroom" && activePath.startsWith(candidate + "/")))).sort((a, b) => b.path.length - a.path.length)[0]?.key;
|
|
64
|
+
return <nav className="organizer-destinations" aria-label={surface === "sidebar" ? "Newsroom" : "All workspaces"}>
|
|
65
|
+
{ORGANIZER_NAV_GROUPS.map((group, index) => <section key={group.title} aria-labelledby={`${id}-${index}`}>
|
|
66
|
+
<h3 id={`${id}-${index}`}>{group.title}</h3>
|
|
67
|
+
{group.items.filter(item => item.access !== "admin" || admin).map(item => <Link key={item.key}
|
|
68
|
+
href={getNewsroomNavHref(item.path, demo)} onClick={onNavigate} aria-label={item.label}
|
|
69
|
+
aria-current={active === item.key ? "page" : undefined} aria-describedby={`${id}-${item.key}`}
|
|
70
|
+
data-news-desk-tab={item.key}>
|
|
71
|
+
<strong>{item.label}</strong><small id={`${id}-${item.key}`}>{item.description}</small>
|
|
72
|
+
</Link>)}
|
|
73
|
+
</section>)}
|
|
74
|
+
</nav>;
|
|
89
75
|
}
|
|
90
76
|
|
|
91
|
-
function
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
>
|
|
116
|
-
|
|
117
|
-
<span className="min-w-0 flex-1">
|
|
118
|
-
<span className="block text-sm font-medium">{item.label}</span>
|
|
119
|
-
<span className={cn("block text-xs", active ? "text-foreground/70" : "text-muted-foreground")}>{item.detail}</span>
|
|
120
|
-
</span>
|
|
121
|
-
</Link>
|
|
122
|
-
);
|
|
77
|
+
function Account({ placement }: { placement: "sidebar" | "header" }) {
|
|
78
|
+
const session = useOptionalNewsDeskClient();
|
|
79
|
+
const auth = session?.shell.auth ?? { status: "loading" as const, label: "Checking sign-in" };
|
|
80
|
+
const [open, setOpen] = useState(false);
|
|
81
|
+
const accountSummary = useProspectusAccountSummary();
|
|
82
|
+
useEffect(() => {
|
|
83
|
+
const media = matchMedia("(max-width: 900px)");
|
|
84
|
+
const close = () => setOpen(false);
|
|
85
|
+
media.addEventListener("change", close);
|
|
86
|
+
return () => media.removeEventListener("change", close);
|
|
87
|
+
}, []);
|
|
88
|
+
return <DropdownMenu open={open} onOpenChange={setOpen}>
|
|
89
|
+
<DropdownMenuTrigger id={`organizer-account-trigger-${placement}`} className={`organizer-account organizer-account-${placement}`} aria-label="Account menu" title="Account menu">
|
|
90
|
+
<UserRound size={18} aria-hidden="true" /><span><strong>{auth.label}</strong><small>{accountSummary ?? (auth.status === "signedIn" ? "Account & preferences" : auth.status === "signedOut" ? "Not signed in" : "Checking session")}</small></span>
|
|
91
|
+
</DropdownMenuTrigger>
|
|
92
|
+
<DropdownMenuContent className="organizer-account-popup" side={placement === "sidebar" ? "top" : "bottom"} align="end">
|
|
93
|
+
<DropdownMenuGroup>
|
|
94
|
+
<DropdownMenuLabel>{auth.label}</DropdownMenuLabel><DropdownMenuSeparator />
|
|
95
|
+
<ProspectusAccountChooser />
|
|
96
|
+
<DropdownMenuItem render={<Link href={getNewsroomNavHref(ORGANIZER_SETTINGS_DESTINATION.path)} />}><Settings aria-hidden="true" />{ORGANIZER_SETTINGS_DESTINATION.label}</DropdownMenuItem>
|
|
97
|
+
<ReaderAuthControl authState={auth} renderAction={({ disabled, onClick, signedIn }) => <DropdownMenuItem disabled={disabled} closeOnClick={false} onClick={onClick}>
|
|
98
|
+
{signedIn ? <LogOut aria-hidden="true" /> : <LogIn aria-hidden="true" />}{signedIn ? "Sign out" : "Sign in"}
|
|
99
|
+
</DropdownMenuItem>} />
|
|
100
|
+
</DropdownMenuGroup>
|
|
101
|
+
</DropdownMenuContent>
|
|
102
|
+
</DropdownMenu>;
|
|
123
103
|
}
|
|
124
104
|
|
|
125
|
-
export function NewsroomOpsShell({
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
backLabel,
|
|
130
|
-
children,
|
|
131
|
-
demo = false,
|
|
132
|
-
headerActions,
|
|
133
|
-
pageTitle,
|
|
134
|
-
showNavigation = true,
|
|
135
|
-
tabCounts = {},
|
|
136
|
-
}: NewsroomOpsShellProps) {
|
|
105
|
+
export function NewsroomOpsShell({ activeTab, appTitle, backHref = "/", backLabel, children, demo = false, headerActions, pageTitle, showNavigation = true }: NewsroomOpsShellProps) {
|
|
106
|
+
const pathname = usePathname();
|
|
107
|
+
const session = useOptionalNewsDeskClient();
|
|
108
|
+
const admin = demo || session?.shell.dashboard?.canManageUsers === true;
|
|
137
109
|
const [menuOpen, setMenuOpen] = useState(false);
|
|
138
|
-
const
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
<
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
<nav className="flex flex-col gap-1">
|
|
182
|
-
{NEWSROOM_OPS_NAV.map((item) => (
|
|
183
|
-
<SidebarNavLink
|
|
184
|
-
active={resolvedActiveTab === item.id}
|
|
185
|
-
countState={tabCounts[item.id]}
|
|
186
|
-
demo={demo}
|
|
187
|
-
item={item}
|
|
188
|
-
key={item.id}
|
|
189
|
-
/>
|
|
190
|
-
))}
|
|
191
|
-
</nav>
|
|
192
|
-
</ScrollArea>
|
|
193
|
-
</aside>
|
|
194
|
-
) : null}
|
|
195
|
-
|
|
196
|
-
<main className="flex min-h-0 min-w-0 flex-1 flex-col">
|
|
197
|
-
<ScrollArea className="min-h-0 flex-1">
|
|
198
|
-
<div className="mx-auto w-full max-w-6xl p-4 sm:p-6">{children}</div>
|
|
199
|
-
</ScrollArea>
|
|
200
|
-
</main>
|
|
110
|
+
const [collapsed, setCollapsed] = useState(false);
|
|
111
|
+
const [loadedPreference, setLoadedPreference] = useState(false);
|
|
112
|
+
const preferenceKey = `papyrus.cms.sidebar.v1.${SITE_BRAND.id}`;
|
|
113
|
+
useEffect(() => {
|
|
114
|
+
try { setCollapsed(localStorage.getItem(preferenceKey) === "true"); } catch { /* Optional browser preference. */ }
|
|
115
|
+
setLoadedPreference(true);
|
|
116
|
+
}, [preferenceKey]);
|
|
117
|
+
useEffect(() => { if (loadedPreference) try { localStorage.setItem(preferenceKey, String(collapsed)); } catch { /* Controls still work without storage. */ } }, [collapsed, loadedPreference, preferenceKey]);
|
|
118
|
+
useEffect(() => { setMenuOpen(false); }, [pathname]);
|
|
119
|
+
useEffect(() => {
|
|
120
|
+
const media = matchMedia("(max-width: 900px)");
|
|
121
|
+
let previousFocus: Element | null = null;
|
|
122
|
+
let frame = 0;
|
|
123
|
+
const remember = () => { if (document.activeElement !== document.body) previousFocus = document.activeElement; };
|
|
124
|
+
const change = () => {
|
|
125
|
+
const active = document.activeElement === document.body ? previousFocus : document.activeElement;
|
|
126
|
+
if (!(active instanceof HTMLElement)) return;
|
|
127
|
+
if (!media.matches) setMenuOpen(false);
|
|
128
|
+
const selector = active.closest(".organizer-account, .organizer-account-popup") ? ".organizer-account"
|
|
129
|
+
: media.matches && active.closest(".organizer-sidebar, .organizer-toggle") ? ".organizer-more"
|
|
130
|
+
: !media.matches && active.closest(".organizer-bottom-nav, .organizer-menu") ? ".organizer-toggle" : null;
|
|
131
|
+
if (!selector) return;
|
|
132
|
+
cancelAnimationFrame(frame);
|
|
133
|
+
frame = requestAnimationFrame(() => {
|
|
134
|
+
if (document.activeElement === active || document.activeElement === document.body || !(document.activeElement as HTMLElement)?.getClientRects().length)
|
|
135
|
+
Array.from(document.querySelectorAll<HTMLElement>(selector)).find(element => element.getClientRects().length)?.focus();
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
document.addEventListener("focusin", remember);
|
|
139
|
+
media.addEventListener("change", change);
|
|
140
|
+
return () => { document.removeEventListener("focusin", remember); media.removeEventListener("change", change); cancelAnimationFrame(frame); };
|
|
141
|
+
}, []);
|
|
142
|
+
const activePath = browserPathToInternalNewsroomPath(pathname ?? "/newsroom");
|
|
143
|
+
const sidebarToggleLabel = collapsed ? "Expand sidebar" : "Collapse sidebar";
|
|
144
|
+
const sidebarToggle = <button type="button" className="organizer-toggle" title={sidebarToggleLabel}
|
|
145
|
+
aria-label={sidebarToggleLabel} aria-expanded={!collapsed} aria-controls="organizer-sidebar" onClick={() => setCollapsed(value => !value)}>
|
|
146
|
+
{collapsed ? <PanelLeftOpen size={16} aria-hidden="true" /> : <PanelLeftClose size={16} aria-hidden="true" />}
|
|
147
|
+
</button>;
|
|
148
|
+
return <div className="newsroom-organizer" data-news-desk data-newsroom-ops-shell="true" data-newsroom-chrome="organizer" data-sidebar-collapsed={collapsed || !showNavigation ? "true" : "false"}>
|
|
149
|
+
{showNavigation && <aside className="organizer-sidebar" hidden={collapsed} id="organizer-sidebar">
|
|
150
|
+
<div className="organizer-sidebar-head">
|
|
151
|
+
<Link className="organizer-brand" href={getNewsroomNavHref("/newsroom", demo)}>{SITE_BRAND.components?.NewsroomLogo ? <SITE_BRAND.components.NewsroomLogo className="organizer-brand-logo" /> : appTitle}<small>The newsroom</small></Link>
|
|
152
|
+
{sidebarToggle}
|
|
201
153
|
</div>
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
>
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
const active = resolvedActiveTab === item.id;
|
|
213
|
-
return (
|
|
214
|
-
<li key={item.id}>
|
|
215
|
-
<Link
|
|
216
|
-
aria-current={active ? "page" : undefined}
|
|
217
|
-
className={cn(
|
|
218
|
-
"flex min-h-14 flex-col items-center justify-center gap-1 rounded-xl px-1 py-2 text-[0.68rem] font-medium",
|
|
219
|
-
active
|
|
220
|
-
? "bg-primary text-primary-foreground shadow-sm"
|
|
221
|
-
: "text-muted-foreground",
|
|
222
|
-
)}
|
|
223
|
-
data-news-desk-tab={item.id}
|
|
224
|
-
href={getNewsroomNavHref(item.href, demo)}
|
|
225
|
-
>
|
|
226
|
-
<Icon className="size-4" aria-hidden="true" />
|
|
227
|
-
<span>{item.label}</span>
|
|
228
|
-
</Link>
|
|
229
|
-
</li>
|
|
230
|
-
);
|
|
231
|
-
})}
|
|
232
|
-
<li>
|
|
233
|
-
<Sheet onOpenChange={setMenuOpen} open={menuOpen}>
|
|
234
|
-
<SheetTrigger
|
|
235
|
-
className={cn(
|
|
236
|
-
"flex min-h-14 w-full flex-col items-center justify-center gap-1 rounded-xl px-1 py-2 text-[0.68rem] font-medium text-muted-foreground",
|
|
237
|
-
)}
|
|
238
|
-
>
|
|
239
|
-
<MenuIcon className="size-4" aria-hidden="true" />
|
|
240
|
-
<span>More</span>
|
|
241
|
-
</SheetTrigger>
|
|
242
|
-
<SheetContent className="gap-0 p-0" side="bottom">
|
|
243
|
-
<SheetHeader className="border-b border-border px-4 py-4">
|
|
244
|
-
<SheetTitle>All sections</SheetTitle>
|
|
245
|
-
</SheetHeader>
|
|
246
|
-
<ScrollArea className="max-h-[60dvh] p-3">
|
|
247
|
-
<div className="flex flex-col gap-1">
|
|
248
|
-
{NEWSROOM_OPS_NAV.map((item) => (
|
|
249
|
-
<SidebarNavLink
|
|
250
|
-
active={resolvedActiveTab === item.id}
|
|
251
|
-
countState={tabCounts[item.id]}
|
|
252
|
-
demo={demo}
|
|
253
|
-
item={item}
|
|
254
|
-
key={item.id}
|
|
255
|
-
onNavigate={() => setMenuOpen(false)}
|
|
256
|
-
/>
|
|
257
|
-
))}
|
|
258
|
-
</div>
|
|
259
|
-
</ScrollArea>
|
|
260
|
-
</SheetContent>
|
|
261
|
-
</Sheet>
|
|
262
|
-
</li>
|
|
263
|
-
</ul>
|
|
264
|
-
</nav>
|
|
265
|
-
) : null}
|
|
154
|
+
<Navigation activePath={activePath} demo={demo} admin={admin} surface="sidebar" />
|
|
155
|
+
<Account placement="sidebar" />
|
|
156
|
+
</aside>}
|
|
157
|
+
<div className="organizer-workspace">
|
|
158
|
+
<header className="organizer-topbar" data-newsroom-ops-topbar>
|
|
159
|
+
{showNavigation && collapsed && sidebarToggle}
|
|
160
|
+
<Link className="organizer-masthead" href={backHref} title={backLabel}>{appTitle}</Link>
|
|
161
|
+
<h1 data-newsroom-ops-title>{pageTitle}</h1><OrganizerSearch demo={demo} /><div className="organizer-header-actions">{headerActions}</div><Account placement="header" />
|
|
162
|
+
</header>
|
|
163
|
+
<main className="organizer-main">{demo && <p className="organizer-demo-notice">Demo workspace · synthetic examples</p>}{children}</main>
|
|
266
164
|
</div>
|
|
267
|
-
|
|
165
|
+
{showNavigation && <nav className="organizer-bottom-nav" aria-label="Primary newsroom navigation"><ul>
|
|
166
|
+
{ORGANIZER_PRIMARY_NAV.map(item => { const Icon = ICONS[item.key as keyof typeof ICONS]; return <li key={item.key}><Link
|
|
167
|
+
href={getNewsroomNavHref(item.path, demo)} title={item.description} aria-label={item.label} aria-current={activeTab === item.key ? "page" : undefined}>
|
|
168
|
+
<Icon size={18} aria-hidden="true" /><span>{item.label}</span></Link></li>; })}
|
|
169
|
+
<li><Sheet open={menuOpen} onOpenChange={setMenuOpen}><SheetTrigger className="organizer-more" aria-label="More"><Menu size={18} aria-hidden="true" /><span>More</span></SheetTrigger>
|
|
170
|
+
<SheetContent side="bottom" className="organizer-menu"><SheetHeader><SheetTitle>Newsroom</SheetTitle><SheetDescription>Workspaces and administration</SheetDescription></SheetHeader>
|
|
171
|
+
<Navigation activePath={activePath} demo={demo} admin={admin} surface="menu" onNavigate={() => setMenuOpen(false)} />
|
|
172
|
+
</SheetContent>
|
|
173
|
+
</Sheet></li>
|
|
174
|
+
</ul></nav>}
|
|
175
|
+
</div>;
|
|
268
176
|
}
|
|
269
177
|
|
|
270
178
|
export function NewsroomOpsSearchButton({
|