diff --git a/src/components/SettingsModal.tsx b/src/components/SettingsModal.tsx
index 62593bc..47026a2 100644
--- a/src/components/SettingsModal.tsx
+++ b/src/components/SettingsModal.tsx
@@ -52,14 +52,15 @@ import { AdminFeaturesPanel } from '@/components/admin/AdminFeaturesPanel';
import { useSharedProviders } from '@/hooks/useSharedProviders';
import { useLibraryDocumentsQuery } from '@/hooks/useLibraryDocumentsQuery';
import {
+ SidebarNav,
+ SidebarNavItem,
+ SegmentedControl,
inputClass,
+ buttonClass,
listboxButtonClass,
listboxOptionClass,
listboxOptionsClass,
- segmentedButtonClass,
- segmentedGroupClass,
-} from '@/components/formPrimitives';
-import { buttonClass } from '@/components/ui/buttonPrimitives';
+} from '@/components/ui';
import ReactMarkdown from 'react-markdown';
import remarkGfm from 'remark-gfm';
import { fetchChangelogManifest, fetchChangelogReleaseBody } from '@/lib/client/changelog';
@@ -572,50 +573,42 @@ export function SettingsModal({
/>
) : (
<>
- {/* Mobile: 2x2 grid nav */}
-
{/* Desktop: vertical sidebar */}
{/* Content */}
@@ -1166,30 +1159,16 @@ export function SettingsModal({
{/* Admin Section */}
{activeSection === 'admin' && isAdmin && (
-
- {([
- { id: 'providers', label: 'Shared providers' },
- { id: 'features', label: 'Site features' },
- ] as { id: AdminSubTab; label: string }[]).map((tab) => {
- const active = adminSubTab === tab.id;
- return (
-
- );
- })}
-
+
{adminSubTab === 'providers' &&
}
{adminSubTab === 'features' &&
}
diff --git a/src/components/doclist/window/FinderSidebar.tsx b/src/components/doclist/window/FinderSidebar.tsx
index ae95918..fc6dc56 100644
--- a/src/components/doclist/window/FinderSidebar.tsx
+++ b/src/components/doclist/window/FinderSidebar.tsx
@@ -7,7 +7,7 @@ import type { Folder, SidebarFilter } from '@/types/documents';
import { PDFIcon, EPUBIcon, FileIcon, DotsHorizontalIcon } from '@/components/icons/Icons';
import { FolderIcon, HomeIcon, ClockIcon, FolderPlusIcon } from './finderIcons';
import { DND_DOCUMENT, type DocumentDragItem } from '../dnd/dndTypes';
-import { IconButton, MenuItemClass, Sidebar as SidebarShell } from '@/components/ui';
+import { IconButton, MenuItemClass, Sidebar as SidebarShell, SidebarNav, SidebarNavGroup, SidebarNavItem } from '@/components/ui';
interface FinderSidebarProps {
filter: SidebarFilter;
@@ -31,60 +31,6 @@ interface FinderSidebarProps {
const MIN_WIDTH = 168;
const MAX_WIDTH = 320;
-interface SidebarRowProps {
- active: boolean;
- onClick: () => void;
- icon: ReactNode;
- label: string;
- count?: number;
- countClassName?: string;
- trailing?: ReactNode;
- isDropTarget?: boolean;
-}
-
-function SidebarRow({
- active,
- onClick,
- icon,
- label,
- count,
- countClassName,
- trailing,
- isDropTarget,
-}: SidebarRowProps) {
- return (
-
- );
-}
-
function FolderRow({
folder,
active,
@@ -123,7 +69,8 @@ function FolderRow({
ref={dropRef as unknown as React.RefObject
}
className="group/folder relative"
>
- }
@@ -150,28 +97,6 @@ function FolderRow({
);
}
-function SectionHeader({
- children,
- isFirst,
- rightSlot,
-}: {
- children: ReactNode;
- isFirst?: boolean;
- rightSlot?: ReactNode;
-}) {
- return (
-
- {children}
- {rightSlot && {rightSlot}}
-
- );
-}
-
export function FinderSidebar({
filter,
onFilterChange,
@@ -210,14 +135,15 @@ export function FinderSidebar({
className="relative h-full w-full md:[width:var(--sidebar-width)] rounded-none border-y-0 border-l-0 border-r border-line-soft shadow-none shrink-0 flex flex-col"
>
-
+
{topSlot && (
e.stopPropagation()}>
{topSlot}
)}
- Library
- Library
+ {
onFilterChange('all');
@@ -227,7 +153,8 @@ export function FinderSidebar({
label="All Documents"
count={counts.all}
/>
- {
onFilterChange('recents');
@@ -237,8 +164,9 @@ export function FinderSidebar({
label="Recently Opened"
/>
- Kinds
- Kinds
+ {
onFilterChange('pdf');
@@ -248,7 +176,8 @@ export function FinderSidebar({
label="PDF"
count={counts.pdf}
/>
- {
onFilterChange('epub');
@@ -258,7 +187,8 @@ export function FinderSidebar({
label="EPUB"
count={counts.epub}
/>
- {
onFilterChange('html');
@@ -269,8 +199,8 @@ export function FinderSidebar({
count={counts.html}
/>
-
Folders
-
+
{folders.length === 0 ? (
No folders yet
) : (
@@ -354,7 +284,7 @@ export function FinderSidebar({
/>
))
)}
-
+
{bottomSlot && (
{currentSort.label}
-
+
{SORT_OPTIONS.map((opt) => (
- `cursor-pointer select-none rounded-sm py-1.5 px-2.5 text-xs ${
- active ? 'bg-surface-sunken text-accent' : 'text-foreground'
- } ${selected ? 'font-semibold' : ''}`
- }
+ className={({ active, selected }) => listboxOptionClass(active || selected)}
>
{opt.label}
@@ -175,16 +168,13 @@ export function FinderToolbar({
-
-
- onQueryChange(e.target.value)}
- placeholder="Search"
- className="flex-1 min-w-0 bg-transparent outline-none text-xs text-foreground placeholder:text-soft"
- />
-
+ onQueryChange(e.target.value)}
+ placeholder="Search"
+ className="hidden w-[160px] md:w-[200px] sm:flex"
+ icon={}
+ />
{rightSlot && (
diff --git a/src/components/documents/DocumentHeaderMenu.tsx b/src/components/documents/DocumentHeaderMenu.tsx
index 09a4221..c6a671f 100644
--- a/src/components/documents/DocumentHeaderMenu.tsx
+++ b/src/components/documents/DocumentHeaderMenu.tsx
@@ -5,6 +5,7 @@ import { Fragment } from 'react';
import { DotsVerticalIcon, FileSettingsIcon, DownloadIcon, ListIcon } from '@/components/icons/Icons';
import { ZoomControl } from '@/components/documents/ZoomControl';
import { UserMenu } from '@/components/auth/UserMenu';
+import { IconButton, MenuItemClass, ToolbarButton, menuPanelClass } from '@/components/ui';
interface DocumentHeaderMenuProps {
zoomLevel: number;
@@ -47,45 +48,33 @@ export function DocumentHeaderMenu({
max={maxZoom}
/>
{onOpenSegments && (
-
+
)}
{showAudiobookExport && onOpenAudiobook && (
-
+
)}
-
+
);
@@ -95,7 +84,9 @@ export function DocumentHeaderMenu({