@dset/admin
v1.0.0
Published
DSET admin-shell capabilities (Layer 5) — AdminShell, Sidebar, TopNav and WorkspaceSwitcher. Router-agnostic; nav content is injected as a schema.
Downloads
64
Readme
@dset/admin
Layer 5 — admin-shell capabilities. The frame for an admin application:
AdminShell (layout), Sidebar (nav rail), TopNav (content top bar) and
WorkspaceSwitcher (top-level area switcher). A future product assembles a complete
admin app from these in minutes.
Layer rule: admin may import @dset/ui, @dset/tokens, @dset/utils.
Router-agnostic by design
The shell never imports a router. Navigation is data + render-prop:
- You pass a nav schema (
NavSection[]/Workspace[]) — the content. - You pass the active key — derived from your router however you like.
- You optionally pass
renderItemto control the link element (a react-router<NavLink>, a Next<Link>, …). The shell builds the inner content + styledclassName; you choose the element.
import { Sidebar } from '@dset/admin';
import { NavLink } from 'react-router-dom';
<Sidebar
sections={NAV_SECTIONS} // your schema
activeKey={current} // from your router
renderItem={(item, { content, className }) => (
<NavLink to={item.href!} className={className}>
{content}
</NavLink>
)}
/>;The i3MS Sidebar baked in NAV_SECTIONS, react-router and useSidebarBadges;
all three now live in the product, leaving a pure, reusable shell.
Components
| Component | Purpose | i3MS source |
| ------------------- | --------------------------------------------------- | --------------------- |
| AdminShell | banner + sidebar + topbar + scrollable content | AdminLayout |
| Sidebar | schema-driven nav rail with sections, icons, badges | Sidebar + NavItem |
| TopNav | title + search + actions + status slots | Topbar |
| WorkspaceSwitcher | top-level area pills | WorkspaceSwitcher |
Deferred (audited)
- Breadcrumb system — i3MS has no breadcrumbs, so there is nothing proven to extract. Add it when a product introduces (and validates) breadcrumb navigation.
- Collapsible sidebar / responsive drawer — not present in i3MS; add when proven.
The i3MS nav schema, page titles and route wiring stay in the i3MS app — only the generic shell is platform.
