CI / verify (pull_request) Failing after 57s
CI / infrastructure-smoke (pull_request) Skipped
CI / migration-smoke (pull_request) Skipped
CI / package-release (pull_request) Skipped
CI / package-publication (pull_request) Skipped
CI / image-build (pull_request) Skipped
CI / deploy-smoke (same-origin) (pull_request) Skipped
CI / deploy-smoke (split) (pull_request) Skipped
The Dashboard's shell now follows DESIGN.md §4 (ADR 0058): - A collapsible left sidebar replaces the header-and-column layout. It is icons and labels when expanded and icons only when collapsed; each collapsed item keeps its name, visually hidden, and shows a tooltip on hover and on keyboard focus (WCAG 2.2 §1.4.13). The Overview comes first, then the server's groups and modules. There is no top bar. - The expanded/collapsed choice is remembered in this browser's localStorage, behind a SidebarPreference interface that a synced store can replace later. - An account menu at the bottom of the sidebar follows the WAI-ARIA menu button pattern and offers only Sign out, which now lives there rather than in the header. - On phones (below 48em) the same navigation opens in a modal drawer: the page behind it is inert and focus is trapped inside it. Escape, its close button, and the backdrop close it and return focus to the menu button. Choosing a page closes it and focuses the page. Changing layout keeps the route, the desktop mode, and the mounted module. - Lucide (lucide-react 1.48.0, shell only) is Ekklesia's icon vocabulary. Every module shows one generic icon until manifest v9 lets modules declare their own; there is no per-module icon map. - The identity slot is a neutral placeholder with no inputs, waiting for branding (#101). The tooltip, menu, and drawer stay shell-local until a second consumer needs them (ADR 0039). The deploy smoke now signs out through the account menu, and drives the drawer at phone size in a real browser. Co-Authored-By: Claude Opus 5.5 <[email protected]>
214 lines
5.4 KiB
TypeScript
214 lines
5.4 KiB
TypeScript
import { designToken } from "@ekklesia/design-tokens";
|
|
|
|
/**
|
|
* The Dashboard shell's own stylesheet (ADR 0058): what inline styles cannot express — hover,
|
|
* `:focus-visible`, a reduced-motion override — for the shell's navigation, account menu, tooltip,
|
|
* and drawer.
|
|
*
|
|
* Every value is a design token (ADR 0039), never a literal colour. Every class is `ek-shell-`
|
|
* prefixed, so nothing here can collide with `@ekklesia/ui`'s `ek-` elements, and it is installed
|
|
* into the shell's own document only: each module artifact still mounts in its own isolated root
|
|
* (ADR 0040), which this stylesheet cannot reach.
|
|
*/
|
|
export const SHELL_STYLESHEET = `
|
|
.ek-shell-visually-hidden {
|
|
border: 0;
|
|
clip-path: inset(50%);
|
|
height: 1px;
|
|
margin: -1px;
|
|
overflow: hidden;
|
|
padding: 0;
|
|
position: absolute;
|
|
white-space: nowrap;
|
|
width: 1px;
|
|
}
|
|
|
|
.ek-shell-sidebar {
|
|
background: ${designToken("background.canvas")};
|
|
border-right: ${designToken("border.width")} solid ${designToken("border.divider")};
|
|
box-sizing: border-box;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: ${designToken("spacing.md")};
|
|
height: 100vh;
|
|
height: 100dvh;
|
|
padding: ${designToken("spacing.md")};
|
|
position: sticky;
|
|
top: 0;
|
|
transition: width 160ms ease;
|
|
}
|
|
|
|
.ek-shell-sidebar__top {
|
|
align-items: center;
|
|
display: flex;
|
|
gap: ${designToken("spacing.sm")};
|
|
justify-content: space-between;
|
|
min-height: ${designToken("control.height-md")};
|
|
}
|
|
|
|
.ek-shell-sidebar[data-sidebar="collapsed"] .ek-shell-sidebar__top {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.ek-shell-sidebar__scroll {
|
|
display: grid;
|
|
flex: 1 1 auto;
|
|
align-content: start;
|
|
gap: ${designToken("spacing.xl")};
|
|
min-height: 0;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.ek-shell-sidebar__bottom {
|
|
border-top: ${designToken("border.width")} solid ${designToken("border.divider")};
|
|
padding-top: ${designToken("spacing.sm")};
|
|
position: relative;
|
|
}
|
|
|
|
.ek-shell-brand {
|
|
align-items: center;
|
|
color: ${designToken("text.primary")};
|
|
display: flex;
|
|
font-size: ${designToken("typography.size-md")};
|
|
font-weight: ${designToken("typography.weight-bold")};
|
|
gap: ${designToken("spacing.sm")};
|
|
min-width: 0;
|
|
}
|
|
|
|
.ek-shell-brand__mark {
|
|
background: ${designToken("accent.base")};
|
|
border-radius: ${designToken("radius.md")};
|
|
box-shadow: inset 0 0 0 ${designToken("border.width")} ${designToken("accent.active")};
|
|
display: block;
|
|
flex: 0 0 auto;
|
|
height: ${designToken("spacing.xl")};
|
|
width: ${designToken("spacing.xl")};
|
|
}
|
|
|
|
.ek-shell-nav,
|
|
.ek-shell-nav__group {
|
|
display: grid;
|
|
gap: ${designToken("spacing.2xs")};
|
|
}
|
|
|
|
.ek-shell-nav {
|
|
gap: ${designToken("spacing.lg")};
|
|
}
|
|
|
|
.ek-shell-nav__group-label {
|
|
color: ${designToken("text.muted")};
|
|
font-size: ${designToken("typography.size-xs")};
|
|
font-weight: ${designToken("typography.weight-medium")};
|
|
letter-spacing: 0.05em;
|
|
margin: 0 0 ${designToken("spacing.2xs")};
|
|
padding-inline: ${designToken("control.padding-inline")};
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.ek-shell-nav__divider {
|
|
border-top: ${designToken("border.width")} solid ${designToken("border.divider")};
|
|
margin: 0 ${designToken("spacing.xs")};
|
|
}
|
|
|
|
.ek-shell-nav-item {
|
|
box-sizing: border-box;
|
|
gap: ${designToken("spacing.sm")};
|
|
height: auto;
|
|
justify-content: flex-start;
|
|
text-align: start;
|
|
}
|
|
|
|
.ek-shell-nav-item svg {
|
|
flex: 0 0 auto;
|
|
}
|
|
|
|
.ek-shell-nav-item__label {
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.ek-shell-sidebar[data-sidebar="collapsed"] .ek-shell-nav-item {
|
|
justify-content: center;
|
|
padding-inline: 0;
|
|
}
|
|
|
|
.ek-shell-tooltip {
|
|
background: ${designToken("background.raised")};
|
|
border: ${designToken("border.width")} solid ${designToken("border.base")};
|
|
border-radius: ${designToken("radius.sm")};
|
|
box-shadow: ${designToken("shadow.md")};
|
|
color: ${designToken("text.primary")};
|
|
font-size: ${designToken("typography.size-xs")};
|
|
font-weight: ${designToken("typography.weight-medium")};
|
|
padding: ${designToken("spacing.2xs")} ${designToken("spacing.sm")};
|
|
position: fixed;
|
|
transform: translateY(-50%);
|
|
white-space: nowrap;
|
|
z-index: 30;
|
|
}
|
|
|
|
.ek-shell-menu {
|
|
background: ${designToken("background.raised")};
|
|
border: ${designToken("border.width")} solid ${designToken("border.base")};
|
|
border-radius: ${designToken("radius.md")};
|
|
box-shadow: ${designToken("shadow.md")};
|
|
bottom: calc(100% + ${designToken("spacing.xs")});
|
|
box-sizing: border-box;
|
|
display: grid;
|
|
gap: ${designToken("spacing.2xs")};
|
|
left: 0;
|
|
margin: 0;
|
|
min-width: 12rem;
|
|
padding: ${designToken("spacing.xs")};
|
|
position: absolute;
|
|
z-index: 20;
|
|
}
|
|
|
|
.ek-shell-menu__caption {
|
|
color: ${designToken("text.muted")};
|
|
font-size: ${designToken("typography.size-xs")};
|
|
margin: 0;
|
|
padding: ${designToken("spacing.2xs")} ${designToken("spacing.sm")};
|
|
}
|
|
|
|
.ek-shell-menu__item {
|
|
justify-content: flex-start;
|
|
width: 100%;
|
|
}
|
|
|
|
.ek-shell-mobile-bar {
|
|
padding: ${designToken("spacing.sm")} ${designToken("spacing.md")} 0;
|
|
}
|
|
|
|
.ek-shell-drawer-backdrop {
|
|
background: ${designToken("background.overlay")};
|
|
inset: 0;
|
|
position: fixed;
|
|
z-index: 40;
|
|
}
|
|
|
|
.ek-shell-drawer {
|
|
background: ${designToken("background.canvas")};
|
|
box-shadow: ${designToken("shadow.lg")};
|
|
box-sizing: border-box;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: ${designToken("spacing.md")};
|
|
inset: 0 auto 0 0;
|
|
max-width: 85vw;
|
|
outline: none;
|
|
padding: ${designToken("spacing.md")};
|
|
position: fixed;
|
|
width: 20rem;
|
|
z-index: 41;
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.ek-shell-sidebar {
|
|
transition: none;
|
|
}
|
|
}
|
|
`;
|