commit 0cfe5caf7913e186b355ab60b156cbacfd2ba45d
parent 981d3a348f7fab13bd4cf3d442fe58e5a847dd90
Author: finwo <finwo@pm.me>
Date: Thu, 19 Nov 2026 22:25:37 +0100
Merge branch 'css-framework': layered CSS framework migration (T1-T8)
Diffstat:
67 files changed, 5573 insertions(+), 8143 deletions(-)
diff --git a/app/account/package.json b/app/account/package.json
@@ -3,7 +3,8 @@
"private": true,
"type": "module",
"scripts": {
- "build": "node esbuild.cjs"
+ "build": "node esbuild.cjs",
+ "verify:css": "node ../../tools/css-check/check.mjs --scope app --app account"
},
"dependencies": {
"lucide": "^1.61.0",
diff --git a/app/account/src/assets/account.css b/app/account/src/assets/account.css
@@ -1,160 +0,0 @@
-.summary-list {
- display: grid;
- gap: 0.25rem;
- margin: 0;
- padding: 0;
- list-style: none;
-}
-
-.summary-row {
- display: grid;
- grid-template-columns: 1.5rem minmax(0, 1fr);
- align-items: center;
- gap: 1rem;
- padding: 0.875rem 0.75rem;
- color: inherit;
- text-decoration: none;
- cursor: pointer;
- user-select: none;
-}
-
-.summary-row:hover,
-.summary-row:active {
- background: var(--row-hover);
-}
-
-.summary-row svg {
- width: 1.25rem;
- height: 1.25rem;
-}
-
-.summary-body {
- display: grid;
- gap: 0.125rem;
- min-width: 0;
-}
-
-.summary-title {
- font-size: 0.9375rem;
- font-weight: 500;
- line-height: 1.4;
-}
-
-.summary-meta {
- color: var(--muted);
- font-size: 0.8125rem;
- line-height: 1.4;
-}
-
-.summary-arrow {
- display: none;
- color: var(--muted);
- font-size: 1.125rem;
- line-height: 1;
-}
-
-.security-stack,
-.apps-stack {
- display: grid;
- gap: 1rem;
- max-width: 56rem;
- margin: 0 auto;
-}
-
-.surface-row {
- display: grid;
- grid-template-columns: 1.5rem minmax(0, 1fr);
- align-items: center;
- gap: 1rem;
- padding: 1rem 0.75rem;
- background: var(--row);
-}
-
-.surface-row svg {
- width: 1.25rem;
- height: 1.25rem;
-}
-
-.surface-row strong {
- display: block;
- font-size: 0.9375rem;
- font-weight: 500;
- line-height: 1.4;
-}
-
-.surface-row span {
- color: var(--muted);
- font-size: 0.8125rem;
- line-height: 1.4;
-}
-
-.status {
- display: none;
- color: var(--muted);
- font-size: 0.8125rem;
- line-height: 1.4;
-}
-
-.danger-link {
- display: inline-flex;
- align-items: center;
- min-height: 2.75rem;
- padding: 0.5rem 0;
- border: 0;
- background: none;
- color: var(--danger-text);
- font: inherit;
- font-size: 0.875rem;
- cursor: pointer;
- touch-action: manipulation;
-}
-
-.danger-link:hover:not(:disabled) {
- filter: brightness(1.1);
-}
-
-.danger-link:disabled {
- cursor: default;
- opacity: 0.55;
-}
-
-.details + .note {
- margin-top: 1rem;
-}
-
-.note + .note {
- margin-top: 1rem;
-}
-
-.panel-heading {
- display: flex;
- align-items: center;
- gap: 0.75rem;
- margin-bottom: 1rem;
-}
-
-.panel-heading svg {
- flex: none;
- width: 1.25rem;
- height: 1.25rem;
-}
-
-.panel-heading h2 {
- margin: 0;
-}
-
-.skeleton-medium {
- width: 62%;
-}
-
-@media (min-width: 40em) {
- .summary-row,
- .surface-row {
- grid-template-columns: 1.5rem minmax(0, 1fr) auto;
- }
-
- .summary-arrow,
- .status {
- display: inline;
- }
-}
diff --git a/app/account/src/main.ts b/app/account/src/main.ts
@@ -3,7 +3,7 @@ import { Account, AccountCallback } from './screen/account';
import { getBasePath } from './util/api';
import '@style/global.css';
-import './assets/account.css';
+import './style/account.css';
const routes: m.RouteDefs = {
'/': {
diff --git a/app/account/src/screen/account.tsx b/app/account/src/screen/account.tsx
@@ -180,9 +180,9 @@ export const Account: m.Component = {
}
document.title =
page === 'security'
- ? 'Security · Account'
+ ? 'Security \u00B7 Account'
: page === 'apps'
- ? 'Apps · Account'
+ ? 'Apps \u00B7 Account'
: 'Account';
},
diff --git a/app/account/src/screen/apps.tsx b/app/account/src/screen/apps.tsx
@@ -10,7 +10,7 @@ export const AppsPage: m.Component = {
subtitle="Applications with access to this account."
/>
- <div class="apps-stack">
+ <div class="stack reading-column">
<section class="panel">
<h2>Authorized apps</h2>
<p class="note">App permission management arrives in a later slice.</p>
diff --git a/app/account/src/screen/overview.tsx b/app/account/src/screen/overview.tsx
@@ -79,50 +79,46 @@ export const OverviewPage: m.Component<OverviewAttrs> = {
<section class="panel panel-wide">
<h2>Manage</h2>
- <ul class="summary-list">
- <li>
- <a
- class="summary-row"
- href="#"
- onclick={(event: Event) => {
- event.preventDefault();
- m.route.set('/security');
- }}
- >
- {Icon(ShieldCheck)}
- <span class="summary-body">
- <span class="summary-title">Security</span>
- <span class="summary-meta">
- Password, multi-factor authentication and sessions.
- </span>
- </span>
- <span class="summary-arrow" aria-hidden="true">
- ›
- </span>
- </a>
- </li>
- <li>
- <a
- class="summary-row"
- href="#"
- onclick={(event: Event) => {
- event.preventDefault();
- m.route.set('/apps');
- }}
- >
- {Icon(AppWindow)}
- <span class="summary-body">
- <span class="summary-title">Apps</span>
- <span class="summary-meta">
- Applications with access to this account.
- </span>
+ <div class="stack">
+ <a
+ class="card summary-row"
+ href="#"
+ onclick={(event: Event) => {
+ event.preventDefault();
+ m.route.set('/security');
+ }}
+ >
+ {Icon(ShieldCheck)}
+ <span class="summary-body">
+ <span class="summary-title">Security</span>
+ <span class="summary-meta">
+ Password, multi-factor authentication and sessions.
</span>
- <span class="summary-arrow" aria-hidden="true">
- ›
+ </span>
+ <span class="summary-arrow" aria-hidden="true">
+ {'\u203A'}
+ </span>
+ </a>
+ <a
+ class="card summary-row"
+ href="#"
+ onclick={(event: Event) => {
+ event.preventDefault();
+ m.route.set('/apps');
+ }}
+ >
+ {Icon(AppWindow)}
+ <span class="summary-body">
+ <span class="summary-title">Apps</span>
+ <span class="summary-meta">
+ Applications with access to this account.
</span>
- </a>
- </li>
- </ul>
+ </span>
+ <span class="summary-arrow" aria-hidden="true">
+ {'\u203A'}
+ </span>
+ </a>
+ </div>
</section>
</div>
);
@@ -184,47 +180,47 @@ export const ClientOverviewPage: m.Component<ClientOverviewAttrs> = {
<section class="panel panel-wide">
<h2>Access</h2>
- <dl class="details">
- <div>
- <dt>Consent</dt>
- <dd>{consent?.active ? 'Granted' : 'Not granted'}</dd>
- </div>
- <div>
- <dt>Session</dt>
- <dd>Active</dd>
- </div>
- </dl>
- <p class="note">
- {consent?.active
- ? `Revoking access removes ${clientName}'s consent. The app must ask again the next time it signs you in.`
- : `${clientName} no longer has access to this account.`}
- </p>
- {consent?.active ? (
+ <div class="stack">
+ <dl class="details">
+ <div>
+ <dt>Consent</dt>
+ <dd>{consent?.active ? 'Granted' : 'Not granted'}</dd>
+ </div>
+ <div>
+ <dt>Session</dt>
+ <dd>Active</dd>
+ </div>
+ </dl>
<p class="note">
+ {consent?.active
+ ? `Revoking access removes ${clientName}'s consent. The app must ask again the next time it signs you in.`
+ : `${clientName} no longer has access to this account.`}
+ </p>
+ {consent?.active ? (
<button
- class="danger-link"
+ class="button-inline button-danger"
type="button"
disabled={revokePending}
onclick={onRevoke}
>
{revokePending ? 'Revoking' : 'Revoke access'}
</button>
- </p>
- ) : null}
+ ) : null}
+ </div>
</section>
<section class="panel panel-wide">
<h2>Full account management</h2>
- <p class="note">
- Manage your identity, security and app permissions on the account host.
- </p>
- {fullAccountUrl ? (
+ <div class="stack">
<p class="note">
- <a class="button" href={fullAccountUrl}>
+ Manage your identity, security and app permissions on the account host.
+ </p>
+ {fullAccountUrl ? (
+ <a class="button button-primary" href={fullAccountUrl}>
Open full account
</a>
- </p>
- ) : null}
+ ) : null}
+ </div>
</section>
</div>
);
diff --git a/app/account/src/screen/security.tsx b/app/account/src/screen/security.tsx
@@ -21,7 +21,7 @@ export const SecurityPage: m.Component = {
subtitle="Manage how you sign in and where this account is active."
/>
- <div class="security-stack">
+ <div class="stack reading-column">
<section class="panel">
{PanelHeading(KeyRound, 'Password')}
<p class="note">Password management arrives in a later slice.</p>
@@ -47,10 +47,12 @@ export const SecurityPage: m.Component = {
<div class="surface-row">
{Icon(Monitor)}
<span>
- <strong>Current session</strong>
- <span>account · This device · Active</span>
+ <strong class="surface-title">Current session</strong>
+ <span class="surface-meta">
+ account {'\u00B7'} This device {'\u00B7'} Active
+ </span>
</span>
- <span class="status">Read-only</span>
+ <span class="status surface-state">Read-only</span>
</div>
<p class="note">Session revocation arrives in a later slice.</p>
</section>
diff --git a/app/account/src/style/account.css b/app/account/src/style/account.css
@@ -0,0 +1,121 @@
+@layer apps {
+ /* overview panel pair: one column, two-up at desktop */
+ /* stacked pages: capped reading column, full width on small screens */
+ .reading-column {
+ width: 100%;
+ max-width: 56rem;
+ margin-inline: auto;
+ }
+
+ /* manage rows: framework .card supplies surface, padding, shadow */
+ .summary-row {
+ display: grid;
+ grid-template-columns: var(--space-6) minmax(0, 1fr);
+ align-items: center;
+ gap: var(--space-4);
+ color: inherit;
+ text-decoration: none;
+ cursor: pointer;
+ user-select: none;
+ }
+
+ .summary-row:hover,
+ .summary-row:active {
+ background: var(--line-strong);
+ }
+
+ .summary-row svg {
+ width: var(--space-5);
+ height: var(--space-5);
+ }
+
+ .summary-body {
+ display: grid;
+ gap: var(--space-1);
+ min-width: 0;
+ }
+
+ .summary-title {
+ font-size: var(--font-md);
+ font-weight: 500;
+ line-height: var(--lh-snug);
+ }
+
+ .summary-meta {
+ color: var(--muted);
+ font-size: var(--font-sm);
+ line-height: var(--lh-snug);
+ }
+
+ .summary-arrow {
+ display: none;
+ color: var(--muted);
+ font-size: var(--font-xl);
+ line-height: 1;
+ }
+
+ .panel-heading {
+ display: flex;
+ align-items: center;
+ gap: var(--space-3);
+ margin-block-end: var(--space-4);
+ }
+
+ .panel-heading svg {
+ flex: none;
+ width: var(--space-5);
+ height: var(--space-5);
+ }
+
+ .panel-heading h2 {
+ margin: 0;
+ }
+
+ /* device surface rows inside panels */
+ .surface-row {
+ display: grid;
+ grid-template-columns: var(--space-6) minmax(0, 1fr);
+ align-items: center;
+ gap: var(--space-4);
+ padding: var(--space-4) var(--space-3);
+ background: var(--line);
+ }
+
+ .surface-row svg {
+ width: var(--space-5);
+ height: var(--space-5);
+ }
+
+ .surface-title {
+ display: block;
+ font-size: var(--font-md);
+ font-weight: 500;
+ line-height: var(--lh-snug);
+ }
+
+ .surface-meta {
+ display: block;
+ color: var(--muted);
+ font-size: var(--font-sm);
+ line-height: var(--lh-snug);
+ }
+
+ .surface-state {
+ grid-column: 2;
+ }
+
+ @media (min-width: 40em) {
+ .summary-row,
+ .surface-row {
+ grid-template-columns: var(--space-6) minmax(0, 1fr) auto;
+ }
+
+ .summary-arrow {
+ display: inline;
+ }
+
+ .surface-state {
+ grid-column: 3;
+ }
+ }
+}
diff --git a/app/admin/package.json b/app/admin/package.json
@@ -3,7 +3,8 @@
"private": true,
"type": "module",
"scripts": {
- "build": "node esbuild.cjs"
+ "build": "node esbuild.cjs",
+ "verify:css": "node ../../tools/css-check/check.mjs --scope app --app admin"
},
"dependencies": {
"lucide": "^1.61.0",
diff --git a/app/admin/src/assets/admin.css b/app/admin/src/assets/admin.css
@@ -1,647 +0,0 @@
-.realm-select {
- min-width: 0;
- max-width: 100%;
- display: grid;
- gap: 0.25rem;
-}
-
-.realm-select > span {
- color: var(--muted);
- font-size: 0.75rem;
- line-height: 1.15;
-}
-
-.realm-current {
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.5;
-}
-
-.realm-meta {
- display: block;
- color: var(--muted);
- font-size: 0.8125rem;
- line-height: 1.4;
-}
-
-.realm-meta > * {
- display: inline;
- margin-right: 0.75rem;
-}
-
-.realm-meta > *:last-child {
- margin-right: 0;
-}
-
-.realm-count-link {
- color: var(--accent-text);
- cursor: pointer;
- text-decoration: none;
-}
-
-.realm-count-link:hover {
- color: var(--accent-text-hover);
-}
-
-.action-button {
- display: inline-flex;
- align-items: center;
- min-height: 2rem;
- padding: 0.25rem 0.625rem;
- border: 0;
- border-radius: 0.25rem;
- background: transparent;
- color: var(--muted);
- font: inherit;
- font-size: 0.8125rem;
- font-weight: 500;
- line-height: 1.4;
- white-space: nowrap;
- cursor: pointer;
-}
-
-.action-button:hover {
- background: var(--row-hover);
- color: var(--text);
-}
-
-.action-button:first-child {
- margin-left: -0.625rem;
-}
-
-.action-button.is-primary {
- color: var(--accent-text);
-}
-
-.action-button.is-primary:hover {
- background: color-mix(in oklch, var(--accent) 12%, transparent);
- color: var(--accent-text-hover);
-}
-
-.action-button.is-danger {
- color: var(--danger-text);
-}
-
-.action-button.is-danger:hover {
- background: color-mix(in oklch, var(--danger) 12%, transparent);
- color: var(--danger-text);
-}
-
-.host-name {
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
- font-size: 0.8125rem;
- overflow-wrap: anywhere;
-}
-
-.host-added {
- color: var(--muted);
- font-size: 0.8125rem;
-}
-
-.host-row-action {
- display: flex;
- align-items: center;
-}
-
-.host-table td.host-action-column:not(:empty) {
- padding-bottom: 0.75rem;
-}
-
-.domain-name {
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
- font-size: 0.8125rem;
- overflow-wrap: anywhere;
-}
-
-.domain-status {
- display: inline-flex;
- align-items: center;
- gap: 0.4rem;
- color: var(--muted);
- font-size: 0.8125rem;
-}
-
-.domain-status-dot {
- width: 0.4375rem;
- height: 0.4375rem;
- flex: none;
- border-radius: 50%;
- background: var(--muted);
-}
-
-.domain-status.is-pending {
- color: var(--warn);
-}
-
-.domain-status.is-pending .domain-status-dot {
- background: var(--warn);
-}
-
-.domain-row-action {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- gap: 0.125rem;
-}
-
-.verify-record-name,
-.verify-record-value {
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
- font-size: 0.8125rem;
-}
-
-.verify-copy-row {
- display: flex;
- justify-content: flex-end;
- margin-top: 0.5rem;
-}
-
-@media (min-width: 40em) {
- .domain-table {
- table-layout: fixed;
- }
-
- .domain-table .domain-status-column {
- width: 12rem;
- }
-
- .domain-table .domain-action-column {
- width: 14rem;
- }
-
- .domain-table td.domain-action-column:not(:empty) {
- padding-bottom: 0.75rem;
- }
-
- .domain-row-action {
- flex-wrap: nowrap;
- justify-content: flex-start;
- }
-}
-
-.realm-display {
- color: inherit;
- text-decoration: none;
-}
-
-.realm-display:hover {
- color: var(--accent-text-hover);
-}
-
-.realm-slug,
-.realm-owner-meta {
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
-}
-
-.realm-owner-name {
- display: block;
- font-weight: 500;
- line-height: 1.4;
-}
-
-.realm-owner-meta {
- display: block;
- margin-top: 0.125rem;
- color: var(--muted);
- font-size: 0.8125rem;
- line-height: 1.4;
- overflow-wrap: anywhere;
-}
-
-.realm-table td.realm-action-column:not(:empty) {
- padding-bottom: 0.75rem;
-}
-
-.realm-row-action {
- display: flex;
- align-items: center;
-}
-
-.realm-table-panel .table-actions {
- width: 100%;
- flex-direction: column;
- align-items: stretch;
-}
-
-.realm-table-panel .table-actions .button {
- width: 100%;
-}
-
-.realm-create-form .field-grid {
- margin-top: 1rem;
-}
-
-.realm-create-form .branding-preview {
- margin-bottom: 1rem;
-}
-
-.session-stack {
- display: grid;
- gap: 1rem;
-}
-
-.session-header {
- display: flex;
- flex-wrap: wrap;
- align-items: flex-start;
- justify-content: space-between;
- gap: 1rem;
-}
-
-.session-header h2 {
- margin: 0;
-}
-
-.session-user {
- margin: 0.25rem 0 0;
- color: var(--muted);
- font-size: 0.8125rem;
- line-height: 1.4;
-}
-
-.session-badge {
- color: var(--danger-text);
- font-size: 0.75rem;
- line-height: 1.4;
-}
-
-.session-details {
- margin-top: 1.25rem;
-}
-
-.session-agent {
- margin: 0.75rem 0 0;
- color: var(--muted);
- font-size: 0.75rem;
- line-height: 1.5;
- overflow-wrap: anywhere;
-}
-
-.session-actions {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- gap: 0.5rem;
- margin-top: 1.25rem;
-}
-
-.confirm {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- gap: 0.5rem;
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.5;
-}
-
-.section-header {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- justify-content: space-between;
- gap: 1rem;
- margin-bottom: 1.25rem;
-}
-
-.section-header h2 {
- margin: 0;
-}
-
-.client-stack {
- display: grid;
- gap: 1rem;
-}
-
-.breadcrumb {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- gap: 0.5rem;
- margin-bottom: 1rem;
- color: var(--muted);
- font-size: 0.8125rem;
- line-height: 1.4;
-}
-
-.breadcrumb a {
- color: var(--accent-text);
- text-decoration: none;
-}
-
-.client-header {
- display: flex;
- flex-wrap: wrap;
- align-items: flex-start;
- justify-content: space-between;
- gap: 1rem;
-}
-
-.client-header h2 {
- margin: 0;
-}
-
-.client-title,
-.user-title {
- color: inherit;
- text-decoration: none;
-}
-
-.client-title:hover,
-.user-title:hover {
- color: var(--accent-text-hover);
-}
-
-.client-id {
- margin: 0.25rem 0 0;
- color: var(--muted);
- font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
- font-size: 0.8125rem;
- line-height: 1.4;
- overflow-wrap: anywhere;
-}
-
-.client-badge {
- color: var(--muted);
- font-size: 0.75rem;
- line-height: 1.4;
- text-transform: uppercase;
-}
-
-.client-details {
- margin-top: 1.25rem;
-}
-
-.client-actions {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- gap: 0.5rem;
- margin-top: 1.25rem;
-}
-
-.client-form {
- display: grid;
- gap: 1rem;
- margin-top: 1rem;
-}
-
-.modal-body .client-form {
- margin-top: 0;
-}
-
-.settings-stack {
- min-width: 0;
- display: grid;
- grid-template-columns: minmax(0, 1fr);
- gap: 1rem;
-}
-
-.settings-form {
- min-width: 0;
- display: grid;
- grid-template-columns: minmax(0, 1fr);
- width: 100%;
- max-width: 100%;
- gap: 1rem;
- margin-top: 1rem;
-}
-
-.settings-form .form-field {
- margin-bottom: 0;
-}
-
-.settings-actions {
- display: flex;
- flex-wrap: wrap;
- justify-content: flex-start;
- gap: 0.5rem;
- margin-top: 1rem;
-}
-
-.settings-actions .button {
- max-width: 100%;
-}
-
-.branding-preview {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- gap: 0.75rem;
- margin-top: 0.25rem;
-}
-
-.branding-logo-preview,
-.branding-color-preview {
- width: 2rem;
- height: 2rem;
- overflow: hidden;
- background: var(--row);
-}
-
-.branding-logo-preview {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- color: var(--muted);
-}
-
-.branding-logo-preview img {
- width: 100%;
- height: 100%;
- object-fit: contain;
-}
-
-.branding-color-preview {
- border-radius: 0.25rem;
- background: var(--field-line);
-}
-
-.branding-logo-preview.is-empty,
-.branding-color-preview.is-empty {
- border-bottom: 1pt solid var(--field-line);
-}
-
-.field-grid {
- display: grid;
- grid-template-columns: minmax(0, 1fr);
- gap: 1rem;
-}
-
-.form-field {
- min-width: 0;
- max-width: 100%;
- display: grid;
- gap: 0.25rem;
-}
-
-.field-label {
- color: var(--muted);
- font-size: 0.75rem;
- line-height: 1.4;
-}
-
-.field-control,
-.field-textarea {
- width: 100%;
- min-width: 0;
- max-width: 100%;
- padding: 0.5rem 0.75rem;
- border: 0;
- border-bottom: 1pt solid var(--field-line);
- border-radius: 0;
- background: var(--surface);
- color: inherit;
- font: inherit;
- font-size: 0.875rem;
- line-height: 1.5;
-}
-
-.field-textarea {
- min-height: 6rem;
- resize: vertical;
-}
-
-@media (pointer: coarse) {
- .field-control,
- .field-textarea {
- font-size: 1rem;
- }
-}
-
-.field-control:focus,
-.field-textarea:focus {
- outline: 2pt solid var(--accent);
- outline-offset: 2pt;
-}
-
-.field-control:disabled {
- color: var(--muted);
- opacity: 1;
-}
-
-.role-field {
- margin: 0;
- padding: 0;
- border: 0;
-}
-
-.role-field legend {
- margin-bottom: 0.5rem;
- padding: 0;
- color: var(--muted);
- font-size: 0.75rem;
- line-height: 1.4;
-}
-
-.branding-field {
- margin: 0;
- padding: 0;
- border: 0;
-}
-
-.branding-field legend {
- margin-bottom: 0.5rem;
- padding: 0;
- color: var(--muted);
- font-size: 0.75rem;
- line-height: 1.4;
-}
-
-.checkbox-list {
- display: grid;
- gap: 0.5rem;
-}
-
-.checkbox-row {
- display: flex;
- align-items: center;
- gap: 0.5rem;
- font-size: 0.875rem;
- line-height: 1.5;
-}
-
-.checkbox-row input {
- width: 1rem;
- height: 1rem;
-}
-
-.secret-panel {
- display: grid;
- gap: 0.75rem;
-}
-
-.secret-header {
- display: flex;
- flex-wrap: wrap;
- align-items: flex-start;
- justify-content: space-between;
- gap: 1rem;
-}
-
-.secret-header h2 {
- margin: 0;
-}
-
-.danger-zone h2 {
- color: var(--danger-text);
-}
-
-.secret-value {
- display: block;
- margin-top: 1rem;
- padding: 0.75rem;
- background: var(--row);
- color: inherit;
- font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
- font-size: 0.8125rem;
- line-height: 1.5;
- overflow-wrap: anywhere;
- white-space: pre-wrap;
-}
-
-@media (min-width: 40em) {
- .field-grid {
- grid-template-columns: repeat(2, minmax(0, 1fr));
- }
-
- .realm-meta {
- display: flex;
- flex-wrap: wrap;
- gap: 0.25rem 0.75rem;
- }
-
- .realm-meta > span {
- margin-right: 0;
- }
-
- .realm-table {
- table-layout: fixed;
- }
-
- .realm-table .table-icon-column {
- width: 4rem;
- }
-
- .realm-table .realm-owner-column {
- width: 13rem;
- }
-
- .realm-table .realm-action-column {
- width: 12rem;
- }
-
- .realm-row-action {
- justify-content: flex-start;
- }
-
- .realm-table-panel .table-actions {
- width: auto;
- flex-direction: row;
- align-items: center;
- }
-
- .realm-table-panel .table-actions .button {
- width: auto;
- }
-}
diff --git a/app/admin/src/component/client-form.tsx b/app/admin/src/component/client-form.tsx
@@ -110,7 +110,7 @@ export const ClientForm: m.Component<ClientFormAttrs> = {
return (
<form
- class="client-form"
+ class="stack-tight"
onsubmit={(event: Event) => {
event.preventDefault();
attrs.onsubmit();
@@ -123,7 +123,7 @@ export const ClientForm: m.Component<ClientFormAttrs> = {
) : null}
<div class="field-grid">
- <div class="form-field">
+ <div class="field">
<span class="field-label">Client ID</span>
<input
class="field-control"
@@ -136,7 +136,7 @@ export const ClientForm: m.Component<ClientFormAttrs> = {
/>
</div>
- <div class="form-field">
+ <div class="field">
<span class="field-label">Name</span>
<input
class="field-control"
@@ -147,7 +147,7 @@ export const ClientForm: m.Component<ClientFormAttrs> = {
/>
</div>
- <div class="form-field">
+ <div class="field">
<span class="field-label" id="client-access-mode-label">Access mode</span>
<SelectMenu
labelledBy="client-access-mode-label"
@@ -164,7 +164,7 @@ export const ClientForm: m.Component<ClientFormAttrs> = {
/>
</div>
- <div class="form-field">
+ <div class="field">
<span class="field-label" id="client-consent-mode-label">Consent</span>
<SelectMenu
labelledBy="client-consent-mode-label"
@@ -180,7 +180,7 @@ export const ClientForm: m.Component<ClientFormAttrs> = {
/>
</div>
- <div class="form-field">
+ <div class="field">
<span class="field-label" id="client-token-auth-label">Token authentication</span>
<SelectMenu
labelledBy="client-token-auth-label"
@@ -198,7 +198,7 @@ export const ClientForm: m.Component<ClientFormAttrs> = {
/>
</div>
- <label class="checkbox-row">
+ <label class="checkbox">
<input
type="checkbox"
checked={value.enabled}
@@ -209,7 +209,7 @@ export const ClientForm: m.Component<ClientFormAttrs> = {
<span>Enabled</span>
</label>
- <label class="checkbox-row">
+ <label class="checkbox">
<input
type="checkbox"
checked={requirePkce}
@@ -222,7 +222,7 @@ export const ClientForm: m.Component<ClientFormAttrs> = {
</label>
</div>
- <div class="form-field">
+ <div class="field">
<span class="field-label">Scopes</span>
<input
class="field-control"
@@ -233,10 +233,10 @@ export const ClientForm: m.Component<ClientFormAttrs> = {
/>
</div>
- <div class="form-field">
+ <div class="field">
<span class="field-label">Redirect URIs</span>
<textarea
- class="field-control field-textarea"
+ class="field-textarea"
value={value.redirect_uris}
placeholder="https://app.example.test/callback"
oninput={(event: Event) => {
@@ -245,10 +245,10 @@ export const ClientForm: m.Component<ClientFormAttrs> = {
/>
</div>
- <div class="form-field">
+ <div class="field">
<span class="field-label">Post-logout redirect URIs</span>
<textarea
- class="field-control field-textarea"
+ class="field-textarea"
value={value.post_logout_redirect_uris}
placeholder="https://app.example.test/"
oninput={(event: Event) => {
@@ -257,11 +257,11 @@ export const ClientForm: m.Component<ClientFormAttrs> = {
/>
</div>
- <fieldset class="branding-field">
- <legend>Branding</legend>
+ <fieldset class="fieldset stack-tight">
+ <legend class="field-label">Branding</legend>
<p class="note">Optional client overrides. Empty values use this realm's branding.</p>
<div class="field-grid">
- <div class="form-field">
+ <div class="field">
<span class="field-label">Logo URL</span>
<input
class="field-control"
@@ -278,7 +278,7 @@ export const ClientForm: m.Component<ClientFormAttrs> = {
/>
</div>
- <div class="form-field">
+ <div class="field">
<span class="field-label">Primary color</span>
<input
class="field-control"
@@ -315,16 +315,16 @@ export const ClientForm: m.Component<ClientFormAttrs> = {
</div>
</fieldset>
- <fieldset class="role-field">
- <legend>Required roles</legend>
+ <fieldset class="fieldset stack-tight">
+ <legend class="field-label">Required roles</legend>
{attrs.roles.length === 0 ? (
<p class="note">No realm roles are available.</p>
) : (
- <div class="checkbox-list">
+ <div class="stack-tight">
{attrs.roles.map((role) => {
const checked = value.required_roles.includes(role.slug);
return (
- <label class="checkbox-row">
+ <label class="checkbox">
<input
type="checkbox"
checked={checked}
@@ -347,13 +347,13 @@ export const ClientForm: m.Component<ClientFormAttrs> = {
)}
</fieldset>
- <div class="client-actions">
- <button class="button" type="submit" disabled={attrs.pending}>
+ <div class="action-row">
+ <button class="button button-primary" type="submit" disabled={attrs.pending}>
{attrs.pending ? 'Saving' : attrs.submitLabel}
</button>
{attrs.oncancel ? (
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
disabled={attrs.pending}
onclick={attrs.oncancel}
diff --git a/app/admin/src/component/client-hosts.tsx b/app/admin/src/component/client-hosts.tsx
@@ -190,7 +190,7 @@ export const ClientHostsPanel: m.Component<ClientHostsAttrs> = {
const visible = hosts ? hosts.filter((entry) => !term || entry.host.includes(term)) : [];
return (
- <section class="panel" aria-label="Client hosts">
+ <section class="panel stack-tight" aria-label="Client hosts">
<h2>Hosts</h2>
<p class="note">Hostnames that resolve to this client.</p>
@@ -204,7 +204,7 @@ export const ClientHostsPanel: m.Component<ClientHostsAttrs> = {
<div class="alert" role="alert">
<p>{this.error.message}</p>
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
onclick={() => this.load(this.attrs.realmSlug, this.attrs.clientId)}
>
@@ -221,8 +221,8 @@ export const ClientHostsPanel: m.Component<ClientHostsAttrs> = {
</div>
) : (
<div>
- <div class="table-toolbar">
- <div class="table-search">
+ <div class="toolbar toolbar-panel">
+ <div class="toolbar-search">
<input
type="search"
value={this.search}
@@ -234,59 +234,53 @@ export const ClientHostsPanel: m.Component<ClientHostsAttrs> = {
/>
</div>
{canEdit ? (
- <div class="table-actions">
- <button class="button" type="button" onclick={() => this.openAdd()}>
+ <div class="toolbar-actions">
+ <button class="button button-primary" type="button" onclick={() => this.openAdd()}>
Add host
</button>
</div>
) : null}
</div>
- <div class="data-table-wrap">
- <table class="data-table data-table-static host-table">
- <thead>
+ <table class="table">
+ <thead>
+ <tr>
+ <th scope="col">Hostname</th>
+ <th scope="col">Added</th>
+ {canEdit ? <th scope="col">Actions</th> : null}
+ </tr>
+ </thead>
+ <tbody>
+ {visible.map((entry: AdminClientHost) => (
<tr>
- <th class="data-table-primary host-name-column" scope="col">Hostname</th>
- <th class="host-added-column" scope="col">Added</th>
- {canEdit ? <th class="host-action-column" scope="col">Actions</th> : null}
- </tr>
- </thead>
- <tbody>
- {visible.map((entry: AdminClientHost) => (
- <tr>
- <td class="data-table-primary host-name-column" data-label="Hostname">
- <span class="host-name">{entry.host}</span>
- </td>
- <td class="host-added-column" data-label="Added">
- <span class="host-added">{formatDate(entry.created_at)}</span>
+ <td data-label="Hostname">
+ <span class="table-mono">{entry.host}</span>
+ </td>
+ <td data-label="Added" class="table-meta u-nowrap">{formatDate(entry.created_at)}</td>
+ {canEdit ? (
+ <td data-label="Actions">
+ <button
+ class="button-inline button-danger"
+ type="button"
+ onclick={() => this.openRemove(entry.host)}
+ >
+ Remove
+ </button>
</td>
- {canEdit ? (
- <td class="host-action-column" data-label="Actions">
- <div class="host-row-action">
- <button
- class="action-button is-danger"
- type="button"
- onclick={() => this.openRemove(entry.host)}
- >
- Remove
- </button>
- </div>
- </td>
- ) : null}
- </tr>
- ))}
- </tbody>
- </table>
- {hosts.length > 0 && visible.length === 0 ? (
- <div class="empty">
- <p>No hosts match this search.</p>
- </div>
- ) : hosts.length === 0 ? (
- <div class="empty">
- <p>No hosts are assigned to this client.</p>
- </div>
- ) : null}
- </div>
+ ) : null}
+ </tr>
+ ))}
+ </tbody>
+ </table>
+ {hosts.length > 0 && visible.length === 0 ? (
+ <div class="empty">
+ <p>No hosts match this search.</p>
+ </div>
+ ) : hosts.length === 0 ? (
+ <div class="empty">
+ <p>No hosts are assigned to this client.</p>
+ </div>
+ ) : null}
</div>
)}
@@ -304,7 +298,7 @@ export const ClientHostsPanel: m.Component<ClientHostsAttrs> = {
</div>
) : null}
- <div class="form-field">
+ <div class="field">
<span class="field-label">Hostname</span>
<input
class="field-control"
@@ -330,14 +324,14 @@ export const ClientHostsPanel: m.Component<ClientHostsAttrs> = {
<div class="modal-actions">
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
disabled={this.creating}
onclick={() => this.resetAdd()}
>
Cancel
</button>
- <button class="button" type="submit" disabled={this.creating}>
+ <button class="button button-primary" type="submit" disabled={this.creating}>
{this.creating ? 'Adding' : 'Add host'}
</button>
</div>
@@ -358,7 +352,7 @@ export const ClientHostsPanel: m.Component<ClientHostsAttrs> = {
</div>
) : null}
- <div class="form-field">
+ <div class="field">
<span class="field-label">Confirm hostname</span>
<input
class="field-control"
@@ -380,7 +374,7 @@ export const ClientHostsPanel: m.Component<ClientHostsAttrs> = {
<div class="modal-actions">
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
disabled={this.removing}
onclick={() => this.resetRemove()}
@@ -388,7 +382,7 @@ export const ClientHostsPanel: m.Component<ClientHostsAttrs> = {
Cancel
</button>
<button
- class="button-danger"
+ class="button button-danger"
type="button"
disabled={
this.removing ||
diff --git a/app/admin/src/component/realm-selector.tsx b/app/admin/src/component/realm-selector.tsx
@@ -21,8 +21,8 @@ export const RealmSelector: m.Component<RealmSelectorAttrs> = {
];
return (
- <div class="realm-select">
- <span>Realm</span>
+ <div class="field">
+ <span class="field-label">Realm</span>
<SelectMenu
autoWidth
ariaLabel="Realm"
@@ -35,11 +35,11 @@ export const RealmSelector: m.Component<RealmSelectorAttrs> = {
}
if (selected) {
- return <span class="realm-current">{selected.display_name}</span>;
+ return <span class="u-muted">{selected.display_name}</span>;
}
if (selectedAll) {
- return <span class="realm-current">All realms</span>;
+ return <span class="u-muted">All realms</span>;
}
return null;
diff --git a/app/admin/src/main.ts b/app/admin/src/main.ts
@@ -1,11 +1,11 @@
+import '@style/global.css';
+import './style/admin.css';
+
import m from 'mithril';
import { applyTheme, getTheme } from '@util/theme';
import { Admin, AdminCallback } from './screen/admin';
import { getBasePath } from './util/api';
-import '@style/global.css';
-import './assets/admin.css';
-
const routes: m.RouteDefs = {
'/': {
render: () => m(Admin, {}),
diff --git a/app/admin/src/screen/admin.tsx b/app/admin/src/screen/admin.tsx
@@ -552,7 +552,7 @@ export const Admin: m.Component = {
) : null}
{!user || routeGuardActive || this.accountRedirecting ? (
- <div class="loading">Loading session</div>
+ <p class="note">Loading session</p>
) : realmsPath ? (
<RealmsPage
realms={this.realms}
diff --git a/app/admin/src/screen/client-edit.tsx b/app/admin/src/screen/client-edit.tsx
@@ -265,7 +265,7 @@ export const ClientEditPage: m.Component<ClientEditAttrs> = {
<div class="alert" role="alert">
<p>{this.error.message}</p>
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
onclick={() => {
if (this.attrs.realmSlug && clientId) {
@@ -285,14 +285,14 @@ export const ClientEditPage: m.Component<ClientEditAttrs> = {
) : null}
{this.secret ? (
- <div class="panel secret-panel">
- <div class="secret-header">
+ <div class="panel stack-tight">
+ <div class="section-header">
<div>
<h2>Client secret</h2>
<p class="note">{this.secret.clientId}</p>
</div>
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
onclick={() => {
this.secret = null;
@@ -307,7 +307,7 @@ export const ClientEditPage: m.Component<ClientEditAttrs> = {
) : null}
{!realms ? (
- <div class="loading">Loading realms</div>
+ <p class="note">Loading realms</p>
) : this.loading || this.redirecting ? (
<div class="panel" aria-busy="true">
<div class="skeleton skeleton-title"></div>
@@ -315,7 +315,7 @@ export const ClientEditPage: m.Component<ClientEditAttrs> = {
<div class="skeleton skeleton-short"></div>
</div>
) : client ? (
- <div class="client-stack">
+ <div class="stack">
<section class="panel">
<h2>Settings</h2>
<ClientForm
@@ -335,7 +335,7 @@ export const ClientEditPage: m.Component<ClientEditAttrs> = {
/>
</section>
- <section class="panel">
+ <section class="panel stack-tight">
<h2>Secret</h2>
<p class="note">
{client.has_secret
@@ -343,9 +343,9 @@ export const ClientEditPage: m.Component<ClientEditAttrs> = {
: 'No client secret is configured. Creating one switches this client to confidential authentication.'}
</p>
{this.rotateConfirm ? (
- <div class="client-actions">
+ <div class="action-row">
<button
- class="button-danger"
+ class="button button-danger"
type="button"
disabled={this.rotating}
onclick={() => this.rotate()}
@@ -353,7 +353,7 @@ export const ClientEditPage: m.Component<ClientEditAttrs> = {
{this.rotating ? 'Rotating' : 'Confirm'}
</button>
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
disabled={this.rotating}
onclick={() => {
@@ -365,9 +365,9 @@ export const ClientEditPage: m.Component<ClientEditAttrs> = {
</button>
</div>
) : (
- <div class="client-actions">
+ <div class="action-row">
<button
- class="button"
+ class="button button-primary"
type="button"
disabled={this.rotating}
onclick={() => {
@@ -389,14 +389,14 @@ export const ClientEditPage: m.Component<ClientEditAttrs> = {
onAuthExpired={this.attrs.onAuthExpired}
/>
- <section class="panel danger-zone">
+ <section class="panel danger-zone stack-tight">
<h2>Danger zone</h2>
<p class="note">
Deleting removes the client registration and related authorization state.
</p>
- <div class="client-actions">
+ <div class="action-row">
<button
- class="button-danger"
+ class="button button-danger"
type="button"
onclick={() => this.openDelete()}
>
@@ -419,7 +419,7 @@ export const ClientEditPage: m.Component<ClientEditAttrs> = {
</p>
<div class="modal-actions">
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
disabled={this.deleting}
onclick={() => this.cancelDelete()}
@@ -427,7 +427,7 @@ export const ClientEditPage: m.Component<ClientEditAttrs> = {
Cancel
</button>
<button
- class="button-danger"
+ class="button button-danger"
type="button"
disabled={this.deleting}
onclick={() => this.deleteClient()}
diff --git a/app/admin/src/screen/clients.tsx b/app/admin/src/screen/clients.tsx
@@ -254,7 +254,7 @@ export const ClientsPage: m.Component<ClientsAttrs> = {
<p>{this.error.message}</p>
{this.attrs.realmSlug ? (
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
onclick={() => this.load(this.attrs.realmSlug)}
>
@@ -273,15 +273,15 @@ export const ClientsPage: m.Component<ClientsAttrs> = {
{!realms ? (
- <div class="loading">Loading realms</div>
+ <p class="note">Loading realms</p>
) : realms.length === 0 ? (
<div class="empty">
<p>No realms are available for this account.</p>
</div>
) : (
- <div class="table-panel">
- <div class="table-toolbar">
- <div class="table-search">
+ <section class="card" aria-label="Realm clients">
+ <div class="toolbar toolbar-panel">
+ <div class="toolbar-search">
<input
type="search"
value={this.search}
@@ -292,9 +292,9 @@ export const ClientsPage: m.Component<ClientsAttrs> = {
}}
/>
</div>
- <div class="table-actions">
+ <div class="toolbar-actions">
<button
- class="button"
+ class="button button-primary"
type="button"
disabled={!this.attrs.realmSlug}
onclick={() => this.openCreate()}
@@ -317,78 +317,79 @@ export const ClientsPage: m.Component<ClientsAttrs> = {
<p>No OIDC clients are registered in this realm.</p>
</div>
) : (
- <div class="data-table-wrap">
- <table class="data-table">
- <thead>
- <tr>
- <th class="table-icon-column" scope="col">
- <span class="sr-only">Icon</span>
- </th>
- <th class="data-table-primary" scope="col">Application</th>
- <th scope="col">Access</th>
- </tr>
- </thead>
- <tbody>
- {visibleClients.map((client: AdminClient) => {
- const href = clientPath(this.attrs.realmSlug || '', client.client_id);
- return (
- <tr
- tabindex="0"
- onclick={() => {
- if (this.attrs.realmSlug) m.route.set(href);
- }}
- onkeydown={(event: KeyboardEvent) => {
- if (
- event.target !== event.currentTarget ||
- !this.attrs.realmSlug
- ) {
- return;
- }
- if (event.key !== 'Enter' && event.key !== ' ') return;
- event.preventDefault();
- m.route.set(href);
- }}
- >
- <td class="table-icon-column">
- <span class="table-icon" aria-hidden="true">
- {client.logo_url ? (
- <img src={client.logo_url} alt="" />
- ) : (
- Icon(AppWindow)
- )}
- </span>
- </td>
- <td class="data-table-primary">
- <a
- class="client-title"
- href={appUrl(href)}
- onclick={(event: MouseEvent) => {
- event.preventDefault();
- event.stopPropagation();
- if (this.attrs.realmSlug) m.route.set(href);
- }}
- >
- <strong>{client.name}</strong>
- </a>
- <span class="data-table-sub">{client.client_id}</span>
- {client.enabled ? null : (
- <span class="data-table-status">Disabled</span>
+ <>
+ <table class="table table-linkable">
+ <thead>
+ <tr>
+ <th scope="col">
+ <span class="sr-only">Icon</span>
+ </th>
+ <th scope="col">Application</th>
+ <th scope="col">Access</th>
+ </tr>
+ </thead>
+ <tbody>
+ {visibleClients.map((client: AdminClient) => {
+ const href = clientPath(this.attrs.realmSlug || '', client.client_id);
+ return (
+ <tr
+ tabindex="0"
+ role="link"
+ onclick={() => {
+ if (this.attrs.realmSlug) m.route.set(href);
+ }}
+ onkeydown={(event: KeyboardEvent) => {
+ if (
+ event.target !== event.currentTarget ||
+ !this.attrs.realmSlug
+ ) {
+ return;
+ }
+ if (event.key !== 'Enter' && event.key !== ' ') return;
+ event.preventDefault();
+ m.route.set(href);
+ }}
+ >
+ <td>
+ <span class="table-icon" aria-hidden="true">
+ {client.logo_url ? (
+ <img src={client.logo_url} alt="" />
+ ) : (
+ Icon(AppWindow)
)}
- </td>
- <td data-label="Access">{ACCESS_MODE_LABELS[client.access_mode]}</td>
- </tr>
- );
- })}
- </tbody>
- </table>
- {visibleClients.length === 0 ? (
- <div class="empty">
- <p>No clients match this search.</p>
- </div>
- ) : null}
- </div>
+ </span>
+ </td>
+ <td data-label="Application">
+ <a
+ class="table-title link"
+ href={appUrl(href)}
+ onclick={(event: MouseEvent) => {
+ event.preventDefault();
+ event.stopPropagation();
+ if (this.attrs.realmSlug) m.route.set(href);
+ }}
+ >
+ {client.name}
+ </a>
+ <span class="table-sub">{client.client_id}</span>
+ {client.enabled ? null : (
+ <span class="status-muted">Disabled</span>
+ )}
+ </td>
+ <td data-label="Access">{ACCESS_MODE_LABELS[client.access_mode]}</td>
+ </tr>
+ );
+ })}
+ </tbody>
+ </table>
+ {visibleClients.length === 0 ? (
+ <div class="empty">
+ <p>No clients match this search.</p>
+ </div>
+ ) : null}
+ </>
)}
- </div>
+ </section>
)}
{this.createOpen ? (
@@ -425,7 +426,7 @@ export const ClientsPage: m.Component<ClientsAttrs> = {
<code class="secret-value">{this.secret.secret}</code>
<div class="modal-actions">
<button
- class="button"
+ class="button button-primary"
type="button"
onclick={() => {
this.secret = null;
diff --git a/app/admin/src/screen/email-domains.tsx b/app/admin/src/screen/email-domains.tsx
@@ -393,7 +393,7 @@ export const EmailDomainsPage: m.Component<EmailDomainsAttrs> = {
<div class="alert" role="alert">
<p>{this.error.message}</p>
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
onclick={() => {
if (realmSlug) {
@@ -425,9 +425,9 @@ export const EmailDomainsPage: m.Component<EmailDomainsAttrs> = {
<div class="skeleton skeleton-short"></div>
</div>
) : (
- <section class="table-panel domain-table-panel" aria-label="Realm email domains">
- <div class="table-toolbar">
- <div class="table-search">
+ <section class="card" aria-label="Realm email domains">
+ <div class="toolbar toolbar-panel">
+ <div class="toolbar-search">
<input
type="search"
value={this.search}
@@ -439,77 +439,73 @@ export const EmailDomainsPage: m.Component<EmailDomainsAttrs> = {
/>
</div>
{canManage ? (
- <div class="table-actions">
- <button class="button" type="button" onclick={() => this.openAdd()}>
+ <div class="toolbar-actions">
+ <button class="button button-primary" type="button" onclick={() => this.openAdd()}>
Add email domain
</button>
</div>
) : null}
</div>
- <div class="data-table-wrap">
- <table class="data-table data-table-static domain-table">
- <thead>
+ <table class="table table-fixed">
+ <thead>
+ <tr>
+ <th scope="col">Domain</th>
+ <th scope="col">Status</th>
+ {canManage ? <th scope="col">Actions</th> : null}
+ </tr>
+ </thead>
+ <tbody>
+ {visible.map((entry: AdminRealmEmailDomain) => (
<tr>
- <th class="data-table-primary domain-name-column" scope="col">Domain</th>
- <th class="domain-status-column" scope="col">Status</th>
- {canManage ? <th class="domain-action-column" scope="col">Actions</th> : null}
- </tr>
- </thead>
- <tbody>
- {visible.map((entry: AdminRealmEmailDomain) => (
- <tr>
- <td class="data-table-primary domain-name-column" data-label="Domain">
- <span class="domain-name">{entry.domain}</span>
- </td>
- <td class="domain-status-column" data-label="Status">
- <span
- class={
- entry.status === 'pending'
- ? 'domain-status is-pending'
- : 'domain-status'
- }
+ <td data-label="Domain">
+ <span class="table-mono">{entry.domain}</span>
+ </td>
+ <td data-label="Status">
+ <span
+ class={
+ entry.status === 'pending'
+ ? 'status status-warn'
+ : 'status'
+ }
+ >
+ <span class="status-dot" aria-hidden="true"></span>
+ {statusLabel(entry.status)}
+ </span>
+ </td>
+ {canManage ? (
+ <td data-label="Actions">
+ {entry.status === 'pending' ? (
+ <button
+ class="button-inline"
+ type="button"
+ onclick={() => this.openVerify(entry)}
+ >
+ Verify
+ </button>
+ ) : null}
+ <button
+ class="button-inline button-danger"
+ type="button"
+ onclick={() => this.openRemove(entry.domain)}
>
- <span class="domain-status-dot" aria-hidden="true"></span>
- {statusLabel(entry.status)}
- </span>
+ Remove
+ </button>
</td>
- {canManage ? (
- <td class="domain-action-column" data-label="Actions">
- <div class="domain-row-action">
- {entry.status === 'pending' ? (
- <button
- class="action-button is-primary"
- type="button"
- onclick={() => this.openVerify(entry)}
- >
- Verify
- </button>
- ) : null}
- <button
- class="action-button is-danger"
- type="button"
- onclick={() => this.openRemove(entry.domain)}
- >
- Remove
- </button>
- </div>
- </td>
- ) : null}
- </tr>
- ))}
- </tbody>
- </table>
- {domains.length > 0 && visible.length === 0 ? (
- <div class="empty">
- <p>No email domains match this search.</p>
- </div>
- ) : domains.length === 0 ? (
- <div class="empty">
- <p>No email domains are assigned to this realm.</p>
- </div>
- ) : null}
- </div>
+ ) : null}
+ </tr>
+ ))}
+ </tbody>
+ </table>
+ {domains.length > 0 && visible.length === 0 ? (
+ <div class="empty">
+ <p>No email domains match this search.</p>
+ </div>
+ ) : domains.length === 0 ? (
+ <div class="empty">
+ <p>No email domains are assigned to this realm.</p>
+ </div>
+ ) : null}
</section>
)}
@@ -554,14 +550,14 @@ export const EmailDomainsPage: m.Component<EmailDomainsAttrs> = {
<div class="modal-actions">
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
disabled={this.creating}
onclick={() => this.resetAdd()}
>
Cancel
</button>
- <button class="button" type="submit" disabled={this.creating}>
+ <button class="button button-primary" type="submit" disabled={this.creating}>
{this.creating ? 'Adding' : 'Add domain'}
</button>
</div>
@@ -601,7 +597,7 @@ export const EmailDomainsPage: m.Component<EmailDomainsAttrs> = {
/>
<div class="verify-copy-row">
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
onclick={() => this.copyToken()}
>
@@ -617,7 +613,7 @@ export const EmailDomainsPage: m.Component<EmailDomainsAttrs> = {
<div class="modal-actions">
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
disabled={this.verifying}
onclick={() => this.resetVerify()}
@@ -625,7 +621,7 @@ export const EmailDomainsPage: m.Component<EmailDomainsAttrs> = {
Close
</button>
<button
- class="button"
+ class="button button-primary"
type="button"
disabled={this.verifying}
onclick={() => this.submitVerify()}
@@ -671,7 +667,7 @@ export const EmailDomainsPage: m.Component<EmailDomainsAttrs> = {
<div class="modal-actions">
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
disabled={this.removing}
onclick={() => this.resetRemove()}
@@ -679,7 +675,7 @@ export const EmailDomainsPage: m.Component<EmailDomainsAttrs> = {
Cancel
</button>
<button
- class="button-danger"
+ class="button button-danger"
type="button"
disabled={
this.removing ||
diff --git a/app/admin/src/screen/global-user.tsx b/app/admin/src/screen/global-user.tsx
@@ -72,7 +72,7 @@ export const GlobalUserPage: m.Component<GlobalUserAttrs> = {
<div>
<Breadcrumb items={[{ label: 'Users', path: '/users/global' }, { label: displayName }]} />
<PageHeader row title="User" subtitle="Global identity and realm memberships.">
- <a class="button-secondary" href={appUrl('/users/global')} onclick={(event: Event) => {
+ <a class="button button-secondary" href={appUrl('/users/global')} onclick={(event: Event) => {
event.preventDefault();
m.route.set('/users/global');
}}>
@@ -90,7 +90,7 @@ export const GlobalUserPage: m.Component<GlobalUserAttrs> = {
<div class="alert" role="alert">
<p>{this.error.message}</p>
{userId ? (
- <button class="button-secondary" type="button" onclick={() => this.load(userId)}>
+ <button class="button button-secondary" type="button" onclick={() => this.load(userId)}>
Try again
</button>
) : null}
@@ -104,9 +104,9 @@ export const GlobalUserPage: m.Component<GlobalUserAttrs> = {
<div class="skeleton skeleton-short"></div>
</div>
) : (
- <div class="client-stack">
+ <div class="stack">
<section class="panel">
- <div class="panel-header">
+ <div class="section-header">
<h2>Account</h2>
</div>
<dl class="details">
@@ -146,7 +146,7 @@ export const GlobalUserPage: m.Component<GlobalUserAttrs> = {
</section>
<section class="panel">
- <div class="panel-header">
+ <div class="section-header">
<div>
<h2>Realm memberships</h2>
<p class="note">App access is managed in the realm where the user is a member.</p>
@@ -157,56 +157,54 @@ export const GlobalUserPage: m.Component<GlobalUserAttrs> = {
<p>This user is not currently a member of any realm.</p>
</div>
) : (
- <div class="data-table-wrap">
- <table class="data-table data-table-static">
- <thead>
- <tr>
- <th class="data-table-primary" scope="col">Realm</th>
- <th scope="col">Relationship</th>
- <th scope="col">Membership</th>
- <th scope="col">Roles</th>
- <th scope="col">Action</th>
- </tr>
- </thead>
- <tbody>
- {detail.memberships.map((membership: AdminGlobalUserMembership) => {
- const href = `/users/${encodeURIComponent(membership.slug)}/${encodeURIComponent(detail.user.id)}`;
- return (
- <tr>
- <td class="data-table-primary">
- <strong>{membership.display_name}</strong>
- <span class="data-table-sub">{membership.slug}</span>
- </td>
- <td data-label="Relationship">
- {membership.relationship === 'home' ? 'Home' : 'Guest'}
- </td>
- <td data-label="Membership">
- {membership.membership_status}
- {membership.banned ? (
- <span class="data-table-status">Banned</span>
- ) : null}
- </td>
- <td data-label="Roles">
- {membership.roles.length ? membership.roles.join(', ') : 'None'}
- </td>
- <td data-label="Action">
- <a
- class="button-secondary"
- href={appUrl(href)}
- onclick={(event: Event) => {
- event.preventDefault();
- m.route.set(href);
- }}
- >
- Manage access
- </a>
- </td>
- </tr>
- );
- })}
- </tbody>
- </table>
- </div>
+ <table class="table">
+ <thead>
+ <tr>
+ <th scope="col">Realm</th>
+ <th scope="col">Relationship</th>
+ <th scope="col">Membership</th>
+ <th scope="col">Roles</th>
+ <th scope="col">Action</th>
+ </tr>
+ </thead>
+ <tbody>
+ {detail.memberships.map((membership: AdminGlobalUserMembership) => {
+ const href = `/users/${encodeURIComponent(membership.slug)}/${encodeURIComponent(detail.user.id)}`;
+ return (
+ <tr>
+ <td data-label="Realm">
+ <span class="table-title">{membership.display_name}</span>
+ <span class="table-sub">{membership.slug}</span>
+ </td>
+ <td data-label="Relationship">
+ {membership.relationship === 'home' ? 'Home' : 'Guest'}
+ </td>
+ <td data-label="Membership">
+ {membership.membership_status}
+ {membership.banned ? (
+ <span class="status-muted"> Banned</span>
+ ) : null}
+ </td>
+ <td data-label="Roles">
+ {membership.roles.length ? membership.roles.join(', ') : 'None'}
+ </td>
+ <td data-label="Action">
+ <a
+ class="link"
+ href={appUrl(href)}
+ onclick={(event: Event) => {
+ event.preventDefault();
+ m.route.set(href);
+ }}
+ >
+ Manage access
+ </a>
+ </td>
+ </tr>
+ );
+ })}
+ </tbody>
+ </table>
)}
</section>
</div>
diff --git a/app/admin/src/screen/hosts.tsx b/app/admin/src/screen/hosts.tsx
@@ -254,7 +254,7 @@ export const HostsPage: m.Component<HostsAttrs> = {
<div class="alert" role="alert">
<p>{this.error.message}</p>
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
onclick={() => {
if (realmSlug) {
@@ -274,7 +274,7 @@ export const HostsPage: m.Component<HostsAttrs> = {
) : null}
{!realms ? (
- <div class="loading">Loading realms</div>
+ <p class="note">Loading realms</p>
) : realms.length === 0 ? (
<div class="empty">
<p>No realms are available for this account.</p>
@@ -286,9 +286,9 @@ export const HostsPage: m.Component<HostsAttrs> = {
<div class="skeleton skeleton-short"></div>
</div>
) : (
- <section class="table-panel host-table-panel" aria-label="Realm hosts">
- <div class="table-toolbar">
- <div class="table-search">
+ <section class="card" aria-label="Realm hosts">
+ <div class="toolbar toolbar-panel">
+ <div class="toolbar-search">
<input
type="search"
value={this.search}
@@ -300,59 +300,53 @@ export const HostsPage: m.Component<HostsAttrs> = {
/>
</div>
{canManage ? (
- <div class="table-actions">
- <button class="button" type="button" onclick={() => this.openAdd()}>
+ <div class="toolbar-actions">
+ <button class="button button-primary" type="button" onclick={() => this.openAdd()}>
Add host
</button>
</div>
) : null}
</div>
- <div class="data-table-wrap">
- <table class="data-table data-table-static host-table">
- <thead>
+ <table class="table">
+ <thead>
+ <tr>
+ <th scope="col">Hostname</th>
+ <th scope="col">Added</th>
+ {canManage ? <th scope="col">Actions</th> : null}
+ </tr>
+ </thead>
+ <tbody>
+ {visible.map((entry: AdminRealmHost) => (
<tr>
- <th class="data-table-primary host-name-column" scope="col">Hostname</th>
- <th class="host-added-column" scope="col">Added</th>
- {canManage ? <th class="host-action-column" scope="col">Actions</th> : null}
- </tr>
- </thead>
- <tbody>
- {visible.map((entry: AdminRealmHost) => (
- <tr>
- <td class="data-table-primary host-name-column" data-label="Hostname">
- <span class="host-name">{entry.host}</span>
- </td>
- <td class="host-added-column" data-label="Added">
- <span class="host-added">{formatDate(entry.created_at)}</span>
+ <td data-label="Hostname">
+ <span class="table-mono">{entry.host}</span>
+ </td>
+ <td data-label="Added" class="table-meta u-nowrap">{formatDate(entry.created_at)}</td>
+ {canManage ? (
+ <td data-label="Actions">
+ <button
+ class="button-inline button-danger"
+ type="button"
+ onclick={() => this.openRemove(entry.host)}
+ >
+ Remove
+ </button>
</td>
- {canManage ? (
- <td class="host-action-column" data-label="Actions">
- <div class="host-row-action">
- <button
- class="action-button is-danger"
- type="button"
- onclick={() => this.openRemove(entry.host)}
- >
- Remove
- </button>
- </div>
- </td>
- ) : null}
- </tr>
- ))}
- </tbody>
- </table>
- {hosts.length > 0 && visible.length === 0 ? (
- <div class="empty">
- <p>No hosts match this search.</p>
- </div>
- ) : hosts.length === 0 ? (
- <div class="empty">
- <p>No hosts are assigned to this realm.</p>
- </div>
- ) : null}
- </div>
+ ) : null}
+ </tr>
+ ))}
+ </tbody>
+ </table>
+ {hosts.length > 0 && visible.length === 0 ? (
+ <div class="empty">
+ <p>No hosts match this search.</p>
+ </div>
+ ) : hosts.length === 0 ? (
+ <div class="empty">
+ <p>No hosts are assigned to this realm.</p>
+ </div>
+ ) : null}
</section>
)}
@@ -370,7 +364,7 @@ export const HostsPage: m.Component<HostsAttrs> = {
</div>
) : null}
- <div class="form-field">
+ <div class="field">
<span class="field-label">Hostname</span>
<input
class="field-control"
@@ -396,14 +390,14 @@ export const HostsPage: m.Component<HostsAttrs> = {
<div class="modal-actions">
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
disabled={this.creating}
onclick={() => this.resetAdd()}
>
Cancel
</button>
- <button class="button" type="submit" disabled={this.creating}>
+ <button class="button button-primary" type="submit" disabled={this.creating}>
{this.creating ? 'Adding' : 'Add host'}
</button>
</div>
@@ -424,7 +418,7 @@ export const HostsPage: m.Component<HostsAttrs> = {
</div>
) : null}
- <div class="form-field">
+ <div class="field">
<span class="field-label">Confirm hostname</span>
<input
class="field-control"
@@ -446,7 +440,7 @@ export const HostsPage: m.Component<HostsAttrs> = {
<div class="modal-actions">
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
disabled={this.removing}
onclick={() => this.resetRemove()}
@@ -454,7 +448,7 @@ export const HostsPage: m.Component<HostsAttrs> = {
Cancel
</button>
<button
- class="button-danger"
+ class="button button-danger"
type="button"
disabled={
this.removing ||
diff --git a/app/admin/src/screen/realms.tsx b/app/admin/src/screen/realms.tsx
@@ -1,6 +1,4 @@
-import { LibraryBig } from 'lucide';
import m from 'mithril';
-import { Icon } from '@component/icon';
import { Modal } from '@component/modal';
import { PageHeader } from '@component/page-header';
import {
@@ -288,7 +286,7 @@ export const RealmsPage: m.Component<RealmsAttrs> = {
<div class="alert" role="alert">
<p>{realmsError.message}</p>
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
onclick={() => this.attrs.onRealmsChanged()}
>
@@ -312,10 +310,9 @@ export const RealmsPage: m.Component<RealmsAttrs> = {
<div class="skeleton skeleton-short"></div>
</div>
) : (
- <section class="table-panel realm-table-panel">
- <h2 class="sr-only">Realm registry</h2>
- <div class="table-toolbar">
- <div class="table-search">
+ <section class="card" aria-label="Realm registry">
+ <div class="toolbar toolbar-panel">
+ <div class="toolbar-search">
<input
type="search"
value={this.search}
@@ -326,138 +323,130 @@ export const RealmsPage: m.Component<RealmsAttrs> = {
}}
/>
</div>
- <div class="table-actions">
+ <div class="toolbar-actions">
{canCreateRealm ? (
- <button class="button" type="button" onclick={() => this.openCreate()}>
+ <button class="button button-primary" type="button" onclick={() => this.openCreate()}>
Register realm
</button>
) : null}
</div>
</div>
- <div class="data-table-wrap">
- <table class="data-table realm-table">
- <thead>
- <tr>
- <th class="table-icon-column" scope="col">
- <span class="sr-only">Realm</span>
- </th>
- <th class="data-table-primary realm-name-column" scope="col">Realm</th>
- <th class="realm-owner-column" scope="col">Owner</th>
- <th class="realm-action-column" scope="col">Actions</th>
- </tr>
- </thead>
- <tbody>
- {visibleRealms.map((realm: AdminRealm) => {
- const href = settingsPath(realm);
- return (
- <tr
- tabindex="0"
- onclick={() => m.route.set(href)}
- onkeydown={(event: KeyboardEvent) => {
- if (event.target !== event.currentTarget) return;
- if (event.key !== 'Enter' && event.key !== ' ') return;
- event.preventDefault();
- m.route.set(href);
- }}
- >
- <td class="table-icon-column">
- <span class="table-icon" aria-hidden="true">
- {Icon(LibraryBig)}
- </span>
- </td>
- <td class="data-table-primary realm-name-column">
+ <table class="table table-linkable">
+ <thead>
+ <tr>
+ <th scope="col">Realm</th>
+ <th scope="col">Owner</th>
+ <th scope="col">Members</th>
+ <th scope="col">Hosts</th>
+ <th scope="col">Domains</th>
+ <th scope="col">Clients</th>
+ <th scope="col">Actions</th>
+ </tr>
+ </thead>
+ <tbody>
+ {visibleRealms.map((realm: AdminRealm) => {
+ const href = settingsPath(realm);
+ return (
+ <tr
+ tabindex="0"
+ role="link"
+ onclick={() => m.route.set(href)}
+ onkeydown={(event: KeyboardEvent) => {
+ if (event.target !== event.currentTarget) return;
+ if (event.key !== 'Enter' && event.key !== ' ') return;
+ event.preventDefault();
+ m.route.set(href);
+ }}
+ >
+ <td data-label="Realm">
+ <a
+ class="table-title link"
+ href={appUrl(href)}
+ onclick={(event: MouseEvent) => {
+ event.preventDefault();
+ event.stopPropagation();
+ m.route.set(href);
+ }}
+ >
+ {realm.display_name}
+ </a>
+ <span class="table-sub">{realm.slug}</span>
+ </td>
+ <td data-label="Owner">
+ <span class="table-title">{ownerName(realm)}</span>
+ <span class="table-sub">{ownerMeta(realm)}</span>
+ </td>
+ <td data-label="Members" class="u-nowrap">{realm.member_count}</td>
+ <td data-label="Hosts" class="u-nowrap">
+ {realm.can_edit ? (
<a
- class="realm-display"
- href={appUrl(href)}
+ class="link"
+ href={appUrl(hostsPath(realm))}
onclick={(event: MouseEvent) => {
event.preventDefault();
event.stopPropagation();
- m.route.set(href);
+ m.route.set(hostsPath(realm));
}}
>
- {realm.display_name}
+ {realm.host_count}
</a>
- <span class="realm-meta">
- <span class="realm-slug">{realm.slug}</span>
- <span class="realm-count">{pluralCount(realm.member_count, 'member')}</span>
- {realm.can_edit ? (
- <a
- class="realm-count realm-count-link"
- href={appUrl(hostsPath(realm))}
- onclick={(event: MouseEvent) => {
- event.preventDefault();
- event.stopPropagation();
- m.route.set(hostsPath(realm));
- }}
- >
- {pluralCount(realm.host_count, 'host')}
- </a>
- ) : (
- <span class="realm-count">{pluralCount(realm.host_count, 'host')}</span>
- )}
- {realm.can_edit ? (
- <a
- class="realm-count realm-count-link"
- href={appUrl(domainsPath(realm))}
- onclick={(event: MouseEvent) => {
- event.preventDefault();
- event.stopPropagation();
- m.route.set(domainsPath(realm));
- }}
- >
- {pluralCount(realm.email_domain_count, 'domain')}
- </a>
- ) : (
- <span class="realm-count">
- {pluralCount(realm.email_domain_count, 'domain')}
- </span>
- )}
- <span class="realm-count">{pluralCount(realm.client_count, 'client')}</span>
- </span>
- </td>
- <td class="realm-owner-column" data-label="Owner">
- <span class="realm-owner-name">{ownerName(realm)}</span>
- <span class="realm-owner-meta">{ownerMeta(realm)}</span>
- </td>
- <td class="realm-action-column">
- {realm.can_delete ? (
- <div class="realm-row-action">
- <button
- class="action-button is-danger"
- type="button"
- onclick={(event: MouseEvent) => {
- event.stopPropagation();
- this.openDelete(realm);
- }}
- >
- Delete realm
- </button>
- </div>
- ) : null}
- </td>
- </tr>
- );
- })}
- </tbody>
- </table>
- {realms.length > 0 && visibleRealms.length === 0 ? (
- <div class="empty">
- <p>No realms match this search.</p>
- </div>
- ) : realms.length === 0 ? (
- <div class="empty">
- <p>No realms are available for this account.</p>
- </div>
- ) : null}
- </div>
+ ) : (
+ realm.host_count
+ )}
+ </td>
+ <td data-label="Domains" class="u-nowrap">
+ {realm.can_edit ? (
+ <a
+ class="link"
+ href={appUrl(domainsPath(realm))}
+ onclick={(event: MouseEvent) => {
+ event.preventDefault();
+ event.stopPropagation();
+ m.route.set(domainsPath(realm));
+ }}
+ >
+ {realm.email_domain_count}
+ </a>
+ ) : (
+ realm.email_domain_count
+ )}
+ </td>
+ <td data-label="Clients" class="u-nowrap">{realm.client_count}</td>
+ <td data-label="Actions">
+ {realm.can_delete ? (
+ <button
+ class="button-inline button-danger"
+ type="button"
+ onclick={(event: MouseEvent) => {
+ event.stopPropagation();
+ this.openDelete(realm);
+ }}
+ >
+ Delete realm
+ </button>
+ ) : null}
+ </td>
+ </tr>
+ );
+ })}
+ </tbody>
+ </table>
+ {realms.length > 0 && visibleRealms.length === 0 ? (
+ <div class="empty">
+ <p>No realms match this search.</p>
+ </div>
+ ) : realms.length === 0 ? (
+ <div class="empty">
+ <p>No realms are available for this account.</p>
+ </div>
+ ) : null}
</section>
)}
{this.createOpen ? (
<Modal title="Register a realm" onClose={() => this.resetCreate()}>
<form
- class="realm-create-form"
onsubmit={(event: Event) => {
event.preventDefault();
this.submitCreate();
@@ -471,7 +460,7 @@ export const RealmsPage: m.Component<RealmsAttrs> = {
</div>
) : null}
- <div class="form-field">
+ <div class="field">
<span class="field-label">Display name</span>
<input
class="field-control"
@@ -493,7 +482,7 @@ export const RealmsPage: m.Component<RealmsAttrs> = {
/>
</div>
- <div class="form-field">
+ <div class="field">
<span class="field-label">Realm ID</span>
<input
class="field-control"
@@ -516,7 +505,7 @@ export const RealmsPage: m.Component<RealmsAttrs> = {
</p>
<div class="field-grid">
- <div class="form-field">
+ <div class="field">
<span class="field-label">Logo URL</span>
<input
class="field-control"
@@ -534,7 +523,7 @@ export const RealmsPage: m.Component<RealmsAttrs> = {
/>
</div>
- <div class="form-field">
+ <div class="field">
<span class="field-label">Primary color</span>
<input
class="field-control"
@@ -573,14 +562,14 @@ export const RealmsPage: m.Component<RealmsAttrs> = {
<div class="modal-actions">
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
disabled={this.creating}
onclick={() => this.resetCreate()}
>
Cancel
</button>
- <button class="button" type="submit" disabled={this.creating}>
+ <button class="button button-primary" type="submit" disabled={this.creating}>
{this.creating ? 'Creating' : 'Create realm'}
</button>
</div>
@@ -602,7 +591,7 @@ export const RealmsPage: m.Component<RealmsAttrs> = {
</div>
) : null}
- <div class="form-field">
+ <div class="field">
<span class="field-label">Confirm realm ID</span>
<input
class="field-control"
@@ -623,7 +612,7 @@ export const RealmsPage: m.Component<RealmsAttrs> = {
<div class="modal-actions">
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
disabled={this.deleting}
onclick={() => this.resetDelete()}
@@ -631,7 +620,7 @@ export const RealmsPage: m.Component<RealmsAttrs> = {
Cancel
</button>
<button
- class="button-danger"
+ class="button button-danger"
type="button"
disabled={!deleteConfirmationMatches || this.deleting}
onclick={() => this.submitDelete()}
diff --git a/app/admin/src/screen/sessions.tsx b/app/admin/src/screen/sessions.tsx
@@ -168,7 +168,7 @@ export const SessionsPage: m.Component<SessionsAttrs> = {
<p>{this.error.message}</p>
{this.attrs.realmSlug ? (
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
onclick={() => this.load(this.attrs.realmSlug)}
>
@@ -185,13 +185,13 @@ export const SessionsPage: m.Component<SessionsAttrs> = {
) : null}
{!realms ? (
- <div class="loading">Loading realms</div>
+ <p class="note">Loading realms</p>
) : realms.length === 0 ? (
<div class="empty">
<p>No realms are available for this account.</p>
</div>
) : this.loading || this.redirecting ? (
- <div class="session-stack" aria-busy="true">
+ <div class="stack" aria-busy="true">
<div class="panel">
<div class="skeleton skeleton-title"></div>
<div class="skeleton"></div>
@@ -204,7 +204,7 @@ export const SessionsPage: m.Component<SessionsAttrs> = {
</div>
</div>
) : this.sessions && this.sessions.length > 0 ? (
- <div class="session-stack">
+ <div class="stack">
{this.sessions.map((session: AdminSession) => {
const realmKey = actionKey('realm', session);
const terminateKey = actionKey('terminate', session);
@@ -213,25 +213,25 @@ export const SessionsPage: m.Component<SessionsAttrs> = {
const terminatePending = pending === terminateKey;
return (
- <article class="panel">
- <div class="session-header">
+ <article class="panel stack-tight">
+ <div class="section-header">
<div>
<h2>{session.user.display_name || session.user.username}</h2>
- <p class="session-user">
+ <p class="note">
{session.user.username}
{session.user.status !== 'active'
- ? ` · ${session.user.status}`
+ ? ` \u00B7 ${session.user.status}`
: ''}
</p>
</div>
{session.revoked_at ? (
- <span class="session-badge">
+ <span class="status">
Realm access revoked {formatTime(session.revoked_at)}
</span>
) : null}
</div>
- <dl class="details session-details">
+ <dl class="details">
<div>
<dt>Scope</dt>
<dd>{scopeLabel(session.scope.type)}</dd>
@@ -259,15 +259,15 @@ export const SessionsPage: m.Component<SessionsAttrs> = {
</dl>
{session.user_agent ? (
- <p class="session-agent">{session.user_agent}</p>
+ <p class="note">{session.user_agent}</p>
) : null}
- <div class="session-actions">
+ <div class="action-row">
{session.revoked_at ? null : this.confirmKey === realmKey ? (
- <div class="confirm">
- <span>Revoke this realm’s access?</span>
+ <div class="action-row">
+ <span class="note">Revoke this realm's access?</span>
<button
- class="button"
+ class="button button-primary"
type="button"
disabled={Boolean(pending)}
onclick={() => this.act(session, 'realm')}
@@ -275,7 +275,7 @@ export const SessionsPage: m.Component<SessionsAttrs> = {
{revokePending ? 'Revoking' : 'Confirm'}
</button>
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
disabled={Boolean(pending)}
onclick={() => {
@@ -288,7 +288,7 @@ export const SessionsPage: m.Component<SessionsAttrs> = {
</div>
) : (
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
disabled={Boolean(pending)}
onclick={() => {
@@ -302,8 +302,8 @@ export const SessionsPage: m.Component<SessionsAttrs> = {
{session.can_terminate ? (
this.confirmKey === terminateKey ? (
- <div class="confirm">
- <span>Terminate this session?</span>
+ <div class="action-row">
+ <span class="note">Terminate this session?</span>
<button
class="button button-danger"
type="button"
@@ -313,7 +313,7 @@ export const SessionsPage: m.Component<SessionsAttrs> = {
{terminatePending ? 'Terminating' : 'Confirm'}
</button>
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
disabled={Boolean(pending)}
onclick={() => {
@@ -326,7 +326,7 @@ export const SessionsPage: m.Component<SessionsAttrs> = {
</div>
) : (
<button
- class="button-danger"
+ class="button button-danger"
type="button"
disabled={Boolean(pending)}
onclick={() => {
diff --git a/app/admin/src/screen/settings.tsx b/app/admin/src/screen/settings.tsx
@@ -253,7 +253,7 @@ export const SettingsPage: m.Component<SettingsAttrs> = {
<div class="alert" role="alert">
<p>{this.error.message}</p>
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
onclick={() => {
if (realmSlug) {
@@ -273,7 +273,7 @@ export const SettingsPage: m.Component<SettingsAttrs> = {
) : null}
{!realms ? (
- <div class="loading">Loading realms</div>
+ <p class="note">Loading realms</p>
) : realms.length === 0 ? (
<div class="empty">
<p>No realms are available for this account.</p>
@@ -285,10 +285,10 @@ export const SettingsPage: m.Component<SettingsAttrs> = {
<div class="skeleton skeleton-short"></div>
</div>
) : this.settings ? (
- <div class="settings-stack">
+ <div class="stack">
<section class="panel">
<h2>Realm details</h2>
- <form class="settings-form" onsubmit={(event: Event) => {
+ <form class="stack-tight" onsubmit={(event: Event) => {
event.preventDefault();
this.submit();
}}>
@@ -298,12 +298,12 @@ export const SettingsPage: m.Component<SettingsAttrs> = {
</div>
) : null}
- <div class="form-field">
+ <div class="field">
<span class="field-label">Realm ID</span>
<input class="field-control" value={this.settings.slug} disabled />
</div>
- <div class="form-field">
+ <div class="field">
<span class="field-label">Display name</span>
<input
class="field-control"
@@ -318,7 +318,7 @@ export const SettingsPage: m.Component<SettingsAttrs> = {
/>
</div>
- <label class="checkbox-row">
+ <label class="checkbox">
<input
type="checkbox"
checked={this.form.allow_session_duration_choice}
@@ -337,9 +337,9 @@ export const SettingsPage: m.Component<SettingsAttrs> = {
<section class="panel">
<h2>Realm branding</h2>
<p class="note">Shown on login and consent for clients in this realm.</p>
- <div class="settings-form">
+ <div class="stack-tight">
<div class="field-grid">
- <div class="form-field">
+ <div class="field">
<span class="field-label">Logo URL</span>
<input
class="field-control"
@@ -356,7 +356,7 @@ export const SettingsPage: m.Component<SettingsAttrs> = {
/>
</div>
- <div class="form-field">
+ <div class="field">
<span class="field-label">Primary color</span>
<input
class="field-control"
@@ -392,9 +392,9 @@ export const SettingsPage: m.Component<SettingsAttrs> = {
></span>
</div>
- <div class="settings-actions">
+ <div class="action-row">
<button
- class="button"
+ class="button button-primary"
type="button"
disabled={this.pending}
onclick={() => this.submit()}
@@ -408,9 +408,9 @@ export const SettingsPage: m.Component<SettingsAttrs> = {
<section class="panel">
<h2>Realm access</h2>
<p class="note">Manage hostnames and email domains for this realm.</p>
- <div class="settings-actions">
+ <div class="action-row">
<a
- class="button-secondary"
+ class="button button-secondary"
href={appUrl(`/hosts/${encodeURIComponent(realmSlug || '')}`)}
onclick={(event: MouseEvent) => {
event.preventDefault();
@@ -420,7 +420,7 @@ export const SettingsPage: m.Component<SettingsAttrs> = {
Hosts
</a>
<a
- class="button-secondary"
+ class="button button-secondary"
href={appUrl(`/email-domains/${encodeURIComponent(realmSlug || '')}`)}
onclick={(event: MouseEvent) => {
event.preventDefault();
diff --git a/app/admin/src/screen/system-settings.tsx b/app/admin/src/screen/system-settings.tsx
@@ -136,7 +136,7 @@ export const SystemSettingsPage: m.Component<SystemSettingsAttrs> = {
{this.error ? (
<div class="alert" role="alert">
<p>{this.error.message}</p>
- <button class="button-secondary" type="button" onclick={() => this.load()}>
+ <button class="button button-secondary" type="button" onclick={() => this.load()}>
Try again
</button>
</div>
@@ -161,7 +161,7 @@ export const SystemSettingsPage: m.Component<SystemSettingsAttrs> = {
Used as the system fallback. Realm branding overrides these values, and client
branding overrides realm branding.
</p>
- <div class="settings-form">
+ <div class="stack-tight">
{this.formError ? (
<div class="alert" role="alert">
{typeof this.formError === 'string' ? this.formError : this.formError.message}
@@ -169,7 +169,7 @@ export const SystemSettingsPage: m.Component<SystemSettingsAttrs> = {
) : null}
<div class="field-grid">
- <div class="form-field">
+ <div class="field">
<span class="field-label">Logo URL</span>
<input
class="field-control"
@@ -186,7 +186,7 @@ export const SystemSettingsPage: m.Component<SystemSettingsAttrs> = {
/>
</div>
- <div class="form-field">
+ <div class="field">
<span class="field-label">Primary color</span>
<input
class="field-control"
@@ -222,9 +222,9 @@ export const SystemSettingsPage: m.Component<SystemSettingsAttrs> = {
></span>
</div>
- <div class="settings-actions">
+ <div class="action-row">
<button
- class="button"
+ class="button button-primary"
type="button"
disabled={this.pending}
onclick={() => this.submit()}
diff --git a/app/admin/src/screen/user.tsx b/app/admin/src/screen/user.tsx
@@ -363,7 +363,7 @@ export const UserPage: m.Component<UserAttrs> = {
<div class="alert" role="alert">
<p>{this.error.message}</p>
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
onclick={() => {
if (realmSlug && userId) this.load(realmSlug, userId);
@@ -381,7 +381,7 @@ export const UserPage: m.Component<UserAttrs> = {
) : null}
{!realms ? (
- <div class="loading">Loading realms</div>
+ <p class="note">Loading realms</p>
) : this.loading || this.redirecting ? (
<div class="panel" aria-busy="true">
<div class="skeleton skeleton-title"></div>
@@ -389,7 +389,7 @@ export const UserPage: m.Component<UserAttrs> = {
<div class="skeleton skeleton-short"></div>
</div>
) : detail ? (
- <div class="client-stack">
+ <div class="stack">
<section class="panel">
<h2>Account</h2>
<dl class="details">
@@ -420,8 +420,8 @@ export const UserPage: m.Component<UserAttrs> = {
</dl>
</section>
- <section class="panel">
- <div class="panel-header">
+ <section class="panel stack-tight">
+ <div class="section-header">
<div>
<h2>Realm access</h2>
<p class="note">Manage membership and roles in this realm.</p>
@@ -430,7 +430,9 @@ export const UserPage: m.Component<UserAttrs> = {
detail.permissions.can_reactivate_membership ? (
<button
class={
- detail.permissions.can_suspend_membership ? 'button-danger' : 'button-secondary'
+ detail.permissions.can_suspend_membership
+ ? 'button button-danger'
+ : 'button button-secondary'
}
type="button"
disabled={this.membershipPending}
@@ -465,12 +467,12 @@ export const UserPage: m.Component<UserAttrs> = {
this access.
</div>
) : null}
- <fieldset class="role-field">
- <legend>Realm roles</legend>
+ <fieldset class="fieldset stack-tight">
+ <legend class="field-label">Realm roles</legend>
{this.roles.length === 0 ? (
<p class="note">No realm roles are available.</p>
) : (
- <div class="checkbox-list">
+ <div class="stack-tight">
{this.roles.map((role: AdminRole) => {
const checked = this.selectedRoles.includes(role.slug);
const protectedRole =
@@ -480,7 +482,7 @@ export const UserPage: m.Component<UserAttrs> = {
role.slug === 'realm-admin' &&
detail.user.roles.includes(role.slug));
return (
- <label class="checkbox-row">
+ <label class="checkbox">
<input
type="checkbox"
checked={checked}
@@ -504,9 +506,9 @@ export const UserPage: m.Component<UserAttrs> = {
)}
</fieldset>
{detail.permissions.can_edit_roles ? (
- <div class="modal-actions">
+ <div class="action-row">
<button
- class="button"
+ class="button button-primary"
type="button"
disabled={
this.rolePending ||
@@ -520,8 +522,8 @@ export const UserPage: m.Component<UserAttrs> = {
) : null}
</section>
- <section class="panel">
- <div class="panel-header">
+ <section class="panel stack-tight">
+ <div class="section-header">
<h2>Application consents</h2>
</div>
{detail.consents.length === 0 ? (
@@ -529,80 +531,75 @@ export const UserPage: m.Component<UserAttrs> = {
<p>No consents have been recorded for this realm.</p>
</div>
) : (
- <div class="data-table-wrap">
- <table class="data-table data-table-static">
- <thead>
+ <table class="table">
+ <thead>
+ <tr>
+ <th scope="col">Application</th>
+ <th scope="col">Scopes</th>
+ <th scope="col">Granted</th>
+ <th scope="col">Status</th>
+ <th scope="col">Updated</th>
+ <th scope="col">Action</th>
+ </tr>
+ </thead>
+ <tbody>
+ {detail.consents.map((consent: AdminUserConsent) => (
<tr>
- <th class="data-table-primary" scope="col">Application</th>
- <th scope="col">Scopes</th>
- <th scope="col">Granted</th>
- <th scope="col">Status</th>
- <th scope="col">Updated</th>
- <th scope="col">Action</th>
+ <td data-label="Application">
+ <span class="table-title">{consent.client_name || 'Unknown client'}</span>
+ <span class="table-sub">{consent.client_id}</span>
+ </td>
+ <td data-label="Scopes">
+ {consent.scopes.length ? consent.scopes.join(', ') : 'None'}
+ </td>
+ <td data-label="Granted">
+ {grantedLabel(consent)}
+ {consent.client_consent_mode ? (
+ <span class="table-sub">
+ {consent.client_consent_mode}
+ </span>
+ ) : null}
+ </td>
+ <td data-label="Status">
+ {consent.active ? 'Active' : 'Revoked'}
+ </td>
+ <td data-label="Updated">{formatTime(consent.updated_at)}</td>
+ <td data-label="Action">
+ {consent.active ? (
+ <button
+ class="button-inline button-danger"
+ type="button"
+ disabled={Boolean(this.pendingAction)}
+ onclick={() => {
+ this.confirm = {
+ type: 'revoke',
+ clientId: consent.client_id,
+ label: consent.client_name || consent.client_id,
+ };
+ m.redraw();
+ }}
+ >
+ Revoke
+ </button>
+ ) : (
+ 'None'
+ )}
+ </td>
</tr>
- </thead>
- <tbody>
- {detail.consents.map((consent: AdminUserConsent) => (
- <tr>
- <td class="data-table-primary">
- <strong>{consent.client_name || 'Unknown client'}</strong>
- <span class="data-table-sub">{consent.client_id}</span>
- </td>
- <td data-label="Scopes">
- {consent.scopes.length ? consent.scopes.join(', ') : 'None'}
- </td>
- <td data-label="Granted">
- {grantedLabel(consent)}
- {consent.client_consent_mode ? (
- <span class="data-table-sub">
- {consent.client_consent_mode}
- </span>
- ) : null}
- </td>
- <td data-label="Status">
- {consent.active ? 'Active' : 'Revoked'}
- {!consent.active ? (
- <span class="data-table-status">Revoked</span>
- ) : null}
- </td>
- <td data-label="Updated">{formatTime(consent.updated_at)}</td>
- <td data-label="Action">
- {consent.active ? (
- <button
- class="button-secondary"
- type="button"
- disabled={Boolean(this.pendingAction)}
- onclick={() => {
- this.confirm = {
- type: 'revoke',
- clientId: consent.client_id,
- label: consent.client_name || consent.client_id,
- };
- m.redraw();
- }}
- >
- Revoke
- </button>
- ) : (
- 'None'
- )}
- </td>
- </tr>
- ))}
- </tbody>
- </table>
- </div>
+ ))}
+ </tbody>
+ </table>
)}
</section>
- <section class="panel">
- <div class="panel-header">
+ <section class="panel stack-tight">
+ <div class="section-header">
<div>
<h2>Application bans</h2>
<p class="note">Bans persist independently of consent.</p>
</div>
<button
- class="button-danger"
+ class="button button-danger"
id="open-ban-dialog"
type="button"
onclick={() => {
@@ -620,51 +617,49 @@ export const UserPage: m.Component<UserAttrs> = {
<p>This user is not banned from any app.</p>
</div>
) : (
- <div class="data-table-wrap">
- <table class="data-table data-table-static">
- <thead>
+ <table class="table">
+ <thead>
+ <tr>
+ <th scope="col">Application</th>
+ <th scope="col">Banned by</th>
+ <th scope="col">Created</th>
+ <th scope="col">Action</th>
+ </tr>
+ </thead>
+ <tbody>
+ {detail.bans.map((ban: AdminUserBan) => (
<tr>
- <th class="data-table-primary" scope="col">Application</th>
- <th scope="col">Banned by</th>
- <th scope="col">Created</th>
- <th scope="col">Action</th>
+ <td data-label="Application">
+ <span class="table-title">{banLabel(ban)}</span>
+ {ban.client_id !== '*' ? (
+ <span class="table-sub">{ban.client_id}</span>
+ ) : null}
+ </td>
+ <td data-label="Banned by">
+ {ban.created_by_username || 'Unknown'}
+ </td>
+ <td data-label="Created">{formatTime(ban.created_at)}</td>
+ <td data-label="Action">
+ <button
+ class="button-inline"
+ type="button"
+ disabled={Boolean(this.pendingAction)}
+ onclick={() => {
+ this.confirm = {
+ type: 'unban',
+ clientId: ban.client_id,
+ label: banLabel(ban),
+ };
+ m.redraw();
+ }}
+ >
+ Unban
+ </button>
+ </td>
</tr>
- </thead>
- <tbody>
- {detail.bans.map((ban: AdminUserBan) => (
- <tr>
- <td class="data-table-primary">
- <strong>{banLabel(ban)}</strong>
- {ban.client_id !== '*' ? (
- <span class="data-table-sub">{ban.client_id}</span>
- ) : null}
- </td>
- <td data-label="Banned by">
- {ban.created_by_username || 'Unknown'}
- </td>
- <td data-label="Created">{formatTime(ban.created_at)}</td>
- <td data-label="Action">
- <button
- class="button-secondary"
- type="button"
- disabled={Boolean(this.pendingAction)}
- onclick={() => {
- this.confirm = {
- type: 'unban',
- clientId: ban.client_id,
- label: banLabel(ban),
- };
- m.redraw();
- }}
- >
- Unban
- </button>
- </td>
- </tr>
- ))}
- </tbody>
- </table>
- </div>
+ ))}
+ </tbody>
+ </table>
)}
</section>
</div>
@@ -691,7 +686,7 @@ export const UserPage: m.Component<UserAttrs> = {
)}
<div class="modal-actions">
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
disabled={this.pendingAction}
onclick={() => this.cancelAction()}
@@ -699,7 +694,7 @@ export const UserPage: m.Component<UserAttrs> = {
Cancel
</button>
<button
- class={this.confirm.type === 'revoke' ? 'button' : 'button-danger'}
+ class={this.confirm.type === 'revoke' ? 'button button-primary' : 'button button-danger'}
type="button"
disabled={this.pendingAction}
onclick={() => this.submitAction()}
@@ -714,7 +709,7 @@ export const UserPage: m.Component<UserAttrs> = {
{this.banOpen && detail ? (
<Modal title="Ban from app" onClose={() => this.cancelAction()}>
- <div class="form-field">
+ <div class="field">
<span class="field-label" id="ban-application-label">Application</span>
<SelectMenu
labelledBy="ban-application-label"
@@ -738,7 +733,7 @@ export const UserPage: m.Component<UserAttrs> = {
</p>
<div class="modal-actions">
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
disabled={this.banPending}
onclick={() => this.cancelAction()}
@@ -746,7 +741,7 @@ export const UserPage: m.Component<UserAttrs> = {
Cancel
</button>
<button
- class="button-danger"
+ class="button button-danger"
type="button"
disabled={this.banPending}
onclick={() => this.submitBan()}
@@ -765,7 +760,7 @@ export const UserPage: m.Component<UserAttrs> = {
</p>
<div class="modal-actions">
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
disabled={this.membershipPending}
onclick={() => this.cancelAccessActions()}
@@ -773,7 +768,7 @@ export const UserPage: m.Component<UserAttrs> = {
Cancel
</button>
<button
- class="button-danger"
+ class="button button-danger"
type="button"
disabled={this.membershipPending}
onclick={() => this.submitMembership()}
@@ -792,7 +787,7 @@ export const UserPage: m.Component<UserAttrs> = {
</p>
<div class="modal-actions">
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
disabled={this.rolePending}
onclick={() => this.cancelAccessActions()}
@@ -800,7 +795,7 @@ export const UserPage: m.Component<UserAttrs> = {
Cancel
</button>
<button
- class="button"
+ class="button button-primary"
type="button"
disabled={this.rolePending}
onclick={() => this.submitRoles()}
diff --git a/app/admin/src/screen/users.tsx b/app/admin/src/screen/users.tsx
@@ -261,22 +261,22 @@ export const UsersPage: m.Component<UsersAttrs> = {
{this.error ? (
<div class="alert" role="alert">
<p>{this.error.message}</p>
- <button class="button-secondary" type="button" onclick={() => this.load(this.loadedScope)}>
+ <button class="button button-secondary" type="button" onclick={() => this.load(this.loadedScope)}>
Try again
</button>
</div>
) : null}
{!realms ? (
- <div class="loading">Loading realms</div>
+ <p class="note">Loading realms</p>
) : !isGlobal && realms.length === 0 ? (
<div class="empty">
<p>No realms are available for this account.</p>
</div>
) : (
- <div class="table-panel">
- <div class="table-toolbar">
- <div class="table-search">
+ <section class="card" aria-label="Realm users">
+ <div class="toolbar toolbar-panel">
+ <div class="toolbar-search">
<input
type="search"
value={this.search}
@@ -288,9 +288,9 @@ export const UsersPage: m.Component<UsersAttrs> = {
/>
</div>
{!isGlobal ? (
- <div class="table-actions">
+ <div class="toolbar-actions">
<button
- class="button"
+ class="button button-primary"
type="button"
onclick={() => {
this.resetAdd();
@@ -317,92 +317,93 @@ export const UsersPage: m.Component<UsersAttrs> = {
<p>{isGlobal ? 'No users exist yet.' : 'No users are members of this realm.'}</p>
</div>
) : (
- <div class="data-table-wrap">
- <table class="data-table">
- <thead>
- <tr>
- <th class="table-icon-column" scope="col">
- <span class="sr-only">User</span>
- </th>
- <th class="data-table-primary" scope="col">User</th>
- <th scope="col">{isGlobal ? 'Home realm' : 'Membership'}</th>
- {isGlobal ? <th scope="col">Realms</th> : null}
- <th scope="col">Status</th>
- </tr>
- </thead>
- <tbody>
- {visibleUsers.map((user: AnyUser) => {
- const href = userHref(isGlobal, realmSlug, user.id);
- return (
- <tr
- tabindex="0"
- onclick={() => m.route.set(href)}
- onkeydown={(event: KeyboardEvent) => {
- if (event.target !== event.currentTarget) return;
- if (event.key !== 'Enter' && event.key !== ' ') return;
- event.preventDefault();
- m.route.set(href);
- }}
- >
- <td class="table-icon-column">
- <span class="table-icon" aria-hidden="true">
- {Icon(Users)}
- </span>
+ <>
+ <table class="table table-linkable">
+ <thead>
+ <tr>
+ <th scope="col">
+ <span class="sr-only">User</span>
+ </th>
+ <th scope="col">User</th>
+ <th scope="col">{isGlobal ? 'Home realm' : 'Membership'}</th>
+ {isGlobal ? <th scope="col">Realms</th> : null}
+ <th scope="col">Status</th>
+ </tr>
+ </thead>
+ <tbody>
+ {visibleUsers.map((user: AnyUser) => {
+ const href = userHref(isGlobal, realmSlug, user.id);
+ return (
+ <tr
+ tabindex="0"
+ role="link"
+ onclick={() => m.route.set(href)}
+ onkeydown={(event: KeyboardEvent) => {
+ if (event.target !== event.currentTarget) return;
+ if (event.key !== 'Enter' && event.key !== ' ') return;
+ event.preventDefault();
+ m.route.set(href);
+ }}
+ >
+ <td>
+ <span class="table-icon" aria-hidden="true">
+ {Icon(Users)}
+ </span>
+ </td>
+ <td data-label="User">
+ <a
+ class="table-title link"
+ href={appUrl(href)}
+ onclick={(event: MouseEvent) => {
+ event.preventDefault();
+ event.stopPropagation();
+ m.route.set(href);
+ }}
+ >
+ {user.display_name || user.username}
+ </a>
+ <span class="table-sub">{user.email || user.username}</span>
+ {user.email ? <span class="table-sub">{user.username}</span> : null}
+ </td>
+ {isGlobal ? (
+ <td data-label="Home realm">
+ {(user as AdminGlobalUser).home_realm_slug || 'None'}
+ {(user as AdminGlobalUser).is_system_admin ? (
+ <span class="status-muted"> System admin</span>
+ ) : null}
</td>
- <td class="data-table-primary">
- <a
- class="user-title"
- href={appUrl(href)}
- onclick={(event: MouseEvent) => {
- event.preventDefault();
- event.stopPropagation();
- m.route.set(href);
- }}
- >
- <strong>{user.display_name || user.username}</strong>
- </a>
- <span class="data-table-sub">{user.email || user.username}</span>
- {user.email ? <span class="data-table-sub">{user.username}</span> : null}
+ ) : (
+ <td data-label="Membership">
+ {relationshipLabel(user as AdminRealmUser)}
+ {(user as AdminRealmUser).roles.includes('realm-admin') ? (
+ <span class="status-muted"> Realm admin</span>
+ ) : null}
+ {(user as AdminRealmUser).is_system_admin ? (
+ <span class="status-muted"> System admin</span>
+ ) : null}
</td>
- {isGlobal ? (
- <td data-label="Home realm">
- {(user as AdminGlobalUser).home_realm_slug || 'None'}
- {(user as AdminGlobalUser).is_system_admin ? (
- <span class="data-table-status">System admin</span>
- ) : null}
- </td>
- ) : (
- <td data-label="Membership">
- {relationshipLabel(user as AdminRealmUser)}
- {(user as AdminRealmUser).roles.includes('realm-admin') ? (
- <span class="data-table-status">Realm admin</span>
- ) : null}
- {(user as AdminRealmUser).is_system_admin ? (
- <span class="data-table-status">System admin</span>
- ) : null}
- </td>
- )}
- {isGlobal ? (
- <td data-label="Realms">{(user as AdminGlobalUser).membership_count}</td>
- ) : null}
- <td data-label="Status">
- {isGlobal
- ? globalStatusLabel(user as AdminGlobalUser)
- : realmStatus(user as AdminRealmUser)}
- </td>
- </tr>
- );
- })}
- </tbody>
- </table>
- {visibleUsers.length === 0 ? (
- <div class="empty">
- <p>No users match this search.</p>
- </div>
- ) : null}
- </div>
+ )}
+ {isGlobal ? (
+ <td data-label="Realms">{(user as AdminGlobalUser).membership_count}</td>
+ ) : null}
+ <td data-label="Status">
+ {isGlobal
+ ? globalStatusLabel(user as AdminGlobalUser)
+ : realmStatus(user as AdminRealmUser)}
+ </td>
+ </tr>
+ );
+ })}
+ </tbody>
+ </table>
+ {visibleUsers.length === 0 ? (
+ <div class="empty">
+ <p>No users match this search.</p>
+ </div>
+ ) : null}
+ </>
)}
- </div>
+ </section>
)}
{this.addOpen && realmSlug ? (
@@ -413,7 +414,7 @@ export const UsersPage: m.Component<UsersAttrs> = {
this.searchAdd();
}}
>
- <div class="form-field">
+ <div class="field">
<label class="field-label" for="add-user-identifier">
Email or username
</label>
@@ -429,14 +430,14 @@ export const UsersPage: m.Component<UsersAttrs> = {
</div>
<div class="modal-actions">
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
disabled={this.addPending}
onclick={() => this.resetAdd()}
>
Cancel
</button>
- <button class="button" type="submit" disabled={this.addPending}>
+ <button class="button button-primary" type="submit" disabled={this.addPending}>
{this.addPending ? 'Searching' : 'Search'}
</button>
</div>
@@ -453,15 +454,15 @@ export const UsersPage: m.Component<UsersAttrs> = {
<div class="notice">
<strong>{this.addResult.display_name || this.addResult.username}</strong>
{this.addResult.email ? (
- <span class="data-table-sub">{this.addResult.email}</span>
+ <span class="table-sub">{this.addResult.email}</span>
) : null}
- <span class="data-table-sub">{this.addResult.username}</span>
- <span class="data-table-sub">{lookupReason(this.addResult)}</span>
+ <span class="table-sub">{this.addResult.username}</span>
+ <p class="note">{lookupReason(this.addResult)}</p>
</div>
<div class="modal-actions">
{this.addResult.can_add ? (
<button
- class="button"
+ class="button button-primary"
type="button"
disabled={this.addPending}
onclick={() => this.submitAdd()}
@@ -470,7 +471,7 @@ export const UsersPage: m.Component<UsersAttrs> = {
</button>
) : (
<button
- class="button-secondary"
+ class="button button-secondary"
type="button"
onclick={() =>
m.route.set(userHref(false, realmSlug, this.addResult.id))
diff --git a/app/admin/src/style/admin.css b/app/admin/src/style/admin.css
@@ -0,0 +1,117 @@
+@layer apps {
+ /* block stack where the grid gap owns all rhythm: form columns,
+ panel interiors, and runs of members that carry their own margins */
+ .stack-tight {
+ display: grid;
+ gap: var(--space-4);
+ min-width: 0;
+ }
+
+ .stack-tight > * {
+ margin-block-start: 0;
+ margin-block-end: 0;
+ }
+
+ /* borderless grouping fieldset: the legend is a .field-label */
+ .fieldset {
+ min-inline-size: 0;
+ margin: 0;
+ padding: 0;
+ border: 0;
+ }
+
+ /* a row of panel actions, kept together under one label */
+ .action-row {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ gap: var(--space-2);
+ margin-block-start: var(--space-4);
+ }
+
+ /* logo / glyph tile in list tables */
+ .table-icon {
+ display: grid;
+ place-items: center;
+ width: var(--space-8);
+ height: var(--space-8);
+ overflow: hidden;
+ background: var(--line);
+ color: var(--muted);
+ }
+
+ .table-icon img {
+ width: 100%;
+ height: 100%;
+ object-fit: contain;
+ }
+
+ .table-icon svg {
+ width: var(--font-xl);
+ height: var(--font-xl);
+ }
+
+ .secret-value {
+ display: block;
+ padding: var(--space-3);
+ background: var(--line-strong);
+ color: inherit;
+ font-family: var(--font-mono);
+ font-size: var(--font-sm);
+ line-height: var(--lh-base);
+ overflow-wrap: anywhere;
+ white-space: pre-wrap;
+ }
+
+ .danger-zone h2 { color: var(--danger-text); }
+
+ .branding-preview {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ gap: var(--space-3);
+ }
+
+ .branding-logo-preview,
+ .branding-color-preview {
+ width: 2rem;
+ height: 2rem;
+ overflow: hidden;
+ background: var(--line-strong);
+ }
+
+ .branding-logo-preview {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ color: var(--muted);
+ }
+
+ .branding-logo-preview img {
+ width: 100%;
+ height: 100%;
+ object-fit: contain;
+ }
+
+ .branding-color-preview {
+ border-radius: var(--radius-sm);
+ background: var(--field-line);
+ }
+
+ .branding-logo-preview.is-empty,
+ .branding-color-preview.is-empty {
+ border-bottom: 1pt solid var(--field-line);
+ }
+
+ .verify-record-name,
+ .verify-record-value {
+ font-family: var(--font-mono);
+ font-size: var(--font-sm);
+ }
+
+ .verify-copy-row {
+ display: flex;
+ justify-content: flex-end;
+ margin-block-start: var(--space-2);
+ }
+}
diff --git a/app/login/package.json b/app/login/package.json
@@ -4,7 +4,8 @@
"type": "module",
"scripts": {
"build": "node esbuild.cjs",
- "assets:hex": "node scripts/generate-hex-grid.js"
+ "assets:hex": "node scripts/generate-hex-grid.js",
+ "verify:css": "node ../../tools/css-check/check.mjs --scope app --app login"
},
"dependencies": {
"lucide": "^1.61.0",
diff --git a/app/login/src/assets/login.css b/app/login/src/assets/login.css
@@ -1,367 +0,0 @@
-.auth-page {
- --auth-surface: #fff;
- min-height: 100vh;
- min-height: 100svh;
- display: grid;
- place-items: center;
- padding: env(safe-area-inset-top) env(safe-area-inset-right)
- calc(1rem + env(safe-area-inset-bottom)) env(safe-area-inset-left);
- background: var(--auth-surface);
-}
-
-.auth-card,
-.auth-status-panel {
- width: min(calc(100% - 2rem), 24rem);
- padding: 2rem;
- border-radius: 0;
- background: var(--auth-surface);
- color: var(--text);
-}
-
-.auth-card-consent,
-.auth-status-panel {
- width: min(calc(100% - 2rem), 28rem);
-}
-
-.auth-logo {
- max-width: 8rem;
- margin-bottom: 1rem;
-}
-
-.auth-card h1,
-.auth-status-panel h1 {
- margin: 0 0 1rem;
- font-size: 1.5rem;
- font-weight: 400;
- line-height: 1.3;
-}
-
-.auth-card-consent h1 {
- margin-bottom: 0.5rem;
-}
-
-.auth-realm {
- margin: 0 0 0.375rem;
- color: var(--muted);
- font-size: 0.75rem;
- font-weight: 600;
- letter-spacing: 0.08em;
- text-transform: uppercase;
-}
-
-.auth-note {
- margin: 0 0 1rem;
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.6;
-}
-
-.auth-card-consent .auth-note {
- margin-bottom: 0;
-}
-
-.auth-field {
- position: relative;
- padding-top: 1rem;
-}
-
-.auth-input {
- width: 100%;
- padding: 0.5rem 0;
- border: 0;
- border-bottom: 1pt solid var(--field-line);
- border-radius: 0;
- background: transparent;
- color: var(--text);
- font: inherit;
- font-size: 1rem;
- line-height: 1.5;
- outline: none;
-}
-
-.auth-input:focus {
- border-bottom-color: var(--accent);
-}
-
-.auth-field label {
- position: absolute;
- top: 1.5em;
- left: 0;
- color: var(--muted);
- font-size: 1rem;
- line-height: 1.5;
- pointer-events: none;
- transform-origin: left top;
- transition: top 0.15s ease, font-size 0.15s ease, color 0.15s ease, opacity 0.15s ease;
-}
-
-.auth-input:focus + label,
-.auth-input:not(:placeholder-shown) + label {
- top: 0;
- color: var(--text);
- font-size: 0.85em;
- font-weight: 500;
- opacity: 0.8;
-}
-
-.auth-identifier {
- margin: 0 0 0.5rem;
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.5;
-}
-
-.auth-choice {
- display: flex;
- align-items: center;
- gap: 0.5rem;
- min-height: 2.75rem;
- margin-top: 1rem;
- font-size: 0.875rem;
- line-height: 1.5;
- cursor: pointer;
- touch-action: manipulation;
-}
-
-.auth-choice input {
- width: 1rem;
- height: 1rem;
- accent-color: var(--accent);
-}
-
-.auth-accounts {
- display: grid;
- gap: 0.5rem;
- margin-top: 1rem;
-}
-
-.auth-account {
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- justify-content: center;
- gap: 0.125rem;
- width: 100%;
- min-height: 2.75rem;
- padding: 0.75rem 0;
- border: 0;
- border-bottom: 1pt solid var(--field-line);
- border-radius: 0;
- background: none;
- color: inherit;
- font: inherit;
- text-align: left;
- cursor: pointer;
- touch-action: manipulation;
-}
-
-.auth-account:hover,
-.auth-account:focus-visible,
-.auth-account:active {
- border-bottom-color: var(--accent);
-}
-
-.auth-account:disabled {
- opacity: 0.5;
- cursor: default;
-}
-
-.auth-account-name {
- font-size: 1rem;
- line-height: 1.5;
-}
-
-.auth-account-username {
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.5;
-}
-
-.auth-error {
- margin: 1rem 0 0;
- color: var(--danger-text);
- font-size: 0.875rem;
- line-height: 1.6;
-}
-
-.auth-actions {
- display: grid;
- gap: 1rem;
- margin-top: 1.5rem;
-}
-
-.auth-actions > .button,
-.auth-actions > .auth-link {
- justify-content: center;
- min-height: 2.75rem;
- text-align: center;
-}
-
-.auth-back {
- margin-right: auto;
-}
-
-.auth-link {
- display: inline-flex;
- align-items: center;
- padding: 0.75rem 1rem;
- border: 0;
- background: none;
- color: var(--accent-text);
- font: inherit;
- font-size: 1rem;
- cursor: pointer;
- touch-action: manipulation;
-}
-
-.auth-link:hover {
- color: var(--accent-text-hover);
-}
-
-.auth-link:active {
- color: var(--accent-text-active);
-}
-
-.auth-spinner {
- width: 2rem;
- height: 2rem;
- margin-bottom: 1rem;
- border: 0.1875rem solid var(--skeleton);
- border-top-color: var(--text);
- border-radius: 50%;
- animation: auth-spin 1s linear infinite;
-}
-
-@keyframes auth-spin {
- to {
- transform: rotate(360deg);
- }
-}
-
-.auth-status-icon {
- width: 2rem;
- height: 2rem;
- margin-bottom: 1rem;
-}
-
-.auth-consent-account {
- display: flex;
- align-items: center;
- gap: 0.75rem;
- margin-top: 1.5rem;
- padding: 0.75rem;
- background: var(--row);
-}
-
-.auth-consent-account svg {
- flex: none;
- width: 1.5rem;
- height: 1.5rem;
-}
-
-.auth-consent-account-body {
- display: grid;
- gap: 0.125rem;
- min-width: 0;
-}
-
-.auth-consent-account-name {
- font-size: 0.875rem;
- font-weight: 500;
- line-height: 1.4;
-}
-
-.auth-consent-account-meta {
- overflow-wrap: anywhere;
- color: var(--muted);
- font-size: 0.75rem;
- line-height: 1.4;
-}
-
-.auth-consent-account .auth-link {
- flex: none;
- margin-left: auto;
- font-size: 0.8125rem;
-}
-
-.auth-consent-title {
- margin: 1.5rem 0 0;
- font-size: 0.875rem;
- font-weight: 500;
- line-height: 1.5;
-}
-
-.auth-consent-scopes {
- display: grid;
- gap: 0.5rem;
- margin: 0.75rem 0 0;
- padding: 0;
- list-style: none;
-}
-
-.auth-consent-scope {
- display: flex;
- align-items: flex-start;
- gap: 0.5rem;
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.5;
-}
-
-.auth-consent-scope svg {
- flex: none;
- width: 1rem;
- height: 1rem;
- margin-top: 0.125rem;
-}
-
-.auth-consent-footer {
- margin: 1.5rem 0 0;
- color: var(--muted);
- font-size: 0.8125rem;
- line-height: 1.6;
-}
-
-@media (min-width: 35em) {
- .auth-page {
- background-color: var(--auth-surface);
- background-image: var(--hex);
- background-position: center;
- background-repeat: no-repeat;
- background-size: cover;
- }
-
- .auth-card,
- .auth-status-panel {
- box-shadow: var(--shadow);
- }
-
- .auth-actions {
- display: flex;
- justify-content: flex-end;
- align-items: center;
- gap: 1.5rem;
- }
-
- .auth-actions > .button,
- .auth-actions > .auth-link {
- width: auto;
- min-height: 2.75rem;
- }
-}
-
-@media (prefers-reduced-motion: reduce) {
- .auth-spinner {
- animation: none;
- }
-}
-
-@media (prefers-color-scheme: dark) {
- :root:not([data-theme]) .auth-page {
- --auth-surface: #222;
- }
-}
-
-:root[data-theme="dark"] .auth-page {
- --auth-surface: #222;
-}
diff --git a/app/login/src/main.ts b/app/login/src/main.ts
@@ -2,7 +2,7 @@ import m from 'mithril';
import { Login } from './screen/login';
import '@style/global.css';
-import './assets/login.css';
+import './style/login.css';
const routes: m.RouteDefs = {
'/oidc/:clientId/login': {
diff --git a/app/login/src/screen/login.tsx b/app/login/src/screen/login.tsx
@@ -75,9 +75,9 @@ function applyAccent(branding?: { primary_color?: string }) {
const TextField: m.Component<TextFieldAttrs> = {
view({ attrs }) {
return (
- <div class="auth-field">
+ <div class="field auth-field">
<input
- class="auth-input"
+ class="field-control auth-input"
id={attrs.id}
type={attrs.type || 'text'}
value={attrs.value}
@@ -87,7 +87,7 @@ const TextField: m.Component<TextFieldAttrs> = {
oninput={(e: Event) => attrs.oninput((e.target as HTMLInputElement).value)}
oncreate={attrs.autofocus ? ({ dom }: any) => dom.focus() : undefined}
/>
- <label for={attrs.id}>{attrs.label}</label>
+ <label class="field-label auth-label" for={attrs.id}>{attrs.label}</label>
</div>
);
},
@@ -282,13 +282,13 @@ export const Login: m.Component<{ clientId?: string }> = {
if (!this.discovery) {
if (this.error) {
return (
- <div class="auth-page">
- <div class="auth-status-panel">
- {Icon(CircleAlert, { class: 'auth-status-icon' })}
+ <div class="status-page auth-page">
+ <div class="card auth-card auth-card-wide">
+ {Icon(CircleAlert, { class: 'auth-icon' })}
<h1>Sign-in unavailable</h1>
- <p class="auth-error">{this.error.message}</p>
- <div class="auth-actions">
- <a class="button" href={window.location.href}>Try again</a>
+ <p class="alert auth-error" role="alert">{this.error.message}</p>
+ <div class="stack auth-actions">
+ <a class="button button-primary" href={window.location.href}>Try again</a>
</div>
</div>
</div>
@@ -296,11 +296,11 @@ export const Login: m.Component<{ clientId?: string }> = {
}
return (
- <div class="auth-page" aria-busy="true">
- <div class="auth-card">
- <div class="auth-spinner" aria-hidden="true"></div>
+ <div class="status-page auth-page" aria-busy="true">
+ <div class="card auth-card">
+ <div class="spinner auth-spinner" aria-hidden="true"></div>
<h1>Signing in</h1>
- <p class="auth-note">Loading your sign-in options.</p>
+ <p class="note">Loading your sign-in options.</p>
</div>
</div>
);
@@ -316,8 +316,8 @@ export const Login: m.Component<{ clientId?: string }> = {
: 'Sign in';
return (
- <div class="auth-page">
- <div class={`auth-card${this.step === 'consent' ? ' auth-card-consent' : ''}`}>
+ <div class="status-page auth-page">
+ <div class={this.step === 'consent' ? 'card auth-card auth-card-wide' : 'card auth-card'}>
{typeof branding.logo_url === 'string' && branding.logo_url ? (
<img
class="auth-logo"
@@ -345,8 +345,8 @@ export const Login: m.Component<{ clientId?: string }> = {
renderAccounts(this: any) {
return (
<div>
- <p class="auth-note">Choose an account to continue.</p>
- <div class="auth-accounts">
+ <p class="note">Choose an account to continue.</p>
+ <div class="stack auth-accounts">
{this.accounts.map((account: SessionAccount) => {
const name = account.user.display_name || account.user.username;
const secondary =
@@ -366,9 +366,9 @@ export const Login: m.Component<{ clientId?: string }> = {
);
})}
</div>
- {this.error ? <p class="auth-error">{this.error.message}</p> : null}
- <div class="auth-actions">
- <button class="auth-link" type="button" onclick={() => this.differentAccount()}>
+ {this.error ? <p class="alert auth-error" role="alert">{this.error.message}</p> : null}
+ <div class="stack auth-actions">
+ <button class="link" type="button" onclick={() => this.differentAccount()}>
Different account
</button>
</div>
@@ -385,7 +385,7 @@ export const Login: m.Component<{ clientId?: string }> = {
}}
>
{this.reauth ? (
- <p class="auth-note">Confirm your password to continue.</p>
+ <p class="note">Confirm your password to continue.</p>
) : null}
<TextField
id="identifier"
@@ -398,14 +398,14 @@ export const Login: m.Component<{ clientId?: string }> = {
this.identifier = value;
}}
/>
- {this.error ? <p class="auth-error">{this.error.message}</p> : null}
- <div class="auth-actions">
+ {this.error ? <p class="alert auth-error" role="alert">{this.error.message}</p> : null}
+ <div class="stack auth-actions">
{!this.reauth && this.accounts.length >= 2 ? (
- <button class="auth-link auth-back" type="button" onclick={() => this.backToAccounts()}>
+ <button class="link auth-back" type="button" onclick={() => this.backToAccounts()}>
Back to accounts
</button>
) : null}
- <button class="button" type="submit" disabled={this.pending || !this.identifier.trim()}>
+ <button class="button button-primary" type="submit" disabled={this.pending || !this.identifier.trim()}>
{this.pending ? 'Checking' : 'Next'}
</button>
</div>
@@ -421,7 +421,7 @@ export const Login: m.Component<{ clientId?: string }> = {
if (!this.pending) this.submitPassword();
}}
>
- <p class="auth-identifier">{this.identifier}</p>
+ <p class="note">{this.identifier}</p>
<TextField
id="password"
label="Password"
@@ -435,7 +435,7 @@ export const Login: m.Component<{ clientId?: string }> = {
}}
/>
{this.discovery?.allow_session_duration_choice !== false ? (
- <label class="auth-choice">
+ <label class="checkbox auth-choice">
<input
type="checkbox"
checked={this.longSession}
@@ -447,12 +447,12 @@ export const Login: m.Component<{ clientId?: string }> = {
<span>Keep me signed in</span>
</label>
) : null}
- {this.error ? <p class="auth-error">{this.error.message}</p> : null}
- <div class="auth-actions">
- <button class="auth-link auth-back" type="button" onclick={() => this.back()}>
+ {this.error ? <p class="alert auth-error" role="alert">{this.error.message}</p> : null}
+ <div class="stack auth-actions">
+ <button class="link auth-back" type="button" onclick={() => this.back()}>
Back
</button>
- <button class="button" type="submit" disabled={this.pending || !this.password}>
+ <button class="button button-primary" type="submit" disabled={this.pending || !this.password}>
{this.pending ? 'Signing in' : 'Sign in'}
</button>
</div>
@@ -464,17 +464,17 @@ export const Login: m.Component<{ clientId?: string }> = {
const provider = this.provider;
return (
<div>
- <p class="auth-identifier">{this.identifier}</p>
- <p class="auth-note">
+ <p class="note">{this.identifier}</p>
+ <p class="note">
{provider
? `This account signs in with ${provider.display_name}.`
: 'This account signs in with an identity provider.'}
</p>
- <div class="auth-actions">
- <button class="auth-link auth-back" type="button" onclick={() => this.back()}>
+ <div class="stack auth-actions">
+ <button class="link auth-back" type="button" onclick={() => this.back()}>
Back
</button>
- <button class="button" type="button" disabled>
+ <button class="button button-primary" type="button" disabled>
Continue
</button>
</div>
@@ -485,7 +485,7 @@ export const Login: m.Component<{ clientId?: string }> = {
renderConsent(this: any) {
const request = this.consentRequest;
if (!request) {
- return <p class="auth-note">Loading request</p>;
+ return <p class="note">Loading request</p>;
}
const realmName = request.realm?.display_name || 'account';
@@ -497,18 +497,18 @@ export const Login: m.Component<{ clientId?: string }> = {
return (
<div>
- <p class="auth-note">
+ <p class="note">
{request.client.name} is requesting access to your {realmName} account.
</p>
<div class="auth-consent-account">
{Icon(CircleUserRound)}
- <span class="auth-consent-account-body">
+ <span class="stack auth-consent-account-body">
<span class="auth-consent-account-name">{name}</span>
<span class="auth-consent-account-meta">{secondary}</span>
</span>
<button
- class="auth-link"
+ class="link auth-not-you"
type="button"
disabled={this.pending}
onclick={() => this.differentConsentAccount()}
@@ -520,7 +520,7 @@ export const Login: m.Component<{ clientId?: string }> = {
<p class="auth-consent-title">
This will allow {request.client.name} to:
</p>
- <ul class="auth-consent-scopes">
+ <ul class="stack auth-consent-scopes">
{request.scopes.map((scope: string) => (
<li class="auth-consent-scope">
{Icon(Check)}
@@ -529,14 +529,14 @@ export const Login: m.Component<{ clientId?: string }> = {
))}
</ul>
- <p class="auth-consent-footer">
+ <p class="note auth-consent-footer">
You can revoke access at any time from your account settings.
</p>
- {this.error ? <p class="auth-error">{this.error.message}</p> : null}
+ {this.error ? <p class="alert auth-error" role="alert">{this.error.message}</p> : null}
- <div class="auth-actions">
+ <div class="stack auth-actions">
<button
- class="auth-link"
+ class="link"
type="button"
disabled={this.pending}
onclick={() => this.decideConsent('deny')}
@@ -544,7 +544,7 @@ export const Login: m.Component<{ clientId?: string }> = {
Deny
</button>
<button
- class="button"
+ class="button button-primary"
type="button"
disabled={this.pending}
onclick={() => this.decideConsent('allow')}
@@ -560,7 +560,7 @@ export const Login: m.Component<{ clientId?: string }> = {
const user = this.signedIn;
return (
<div>
- <p class="auth-note">Signed in as {user?.display_name || user?.username}</p>
+ <p class="note">Signed in as {user?.display_name || user?.username}</p>
</div>
);
},
diff --git a/app/login/src/style/login.css b/app/login/src/style/login.css
@@ -0,0 +1,244 @@
+@layer apps {
+ /* auth page: flat surface on small screens, hex field once there is room */
+ .auth-page {
+ min-height: 100vh;
+ min-height: 100svh;
+ display: grid;
+ place-items: center;
+ padding: env(safe-area-inset-top) env(safe-area-inset-right)
+ calc(var(--space-4) + env(safe-area-inset-bottom)) env(safe-area-inset-left);
+ background-color: var(--surface);
+ }
+
+ /* auth card: one size, one padding, centered at every width */
+ .auth-card {
+ width: min(calc(100% - var(--space-4) * 2), var(--auth-card-w, 24rem));
+ box-shadow: none;
+ }
+
+ .auth-card-wide {
+ --auth-card-w: 28rem;
+ }
+
+ .auth-logo {
+ width: min(100%, 8rem);
+ height: auto;
+ margin-block-end: var(--space-4);
+ }
+
+ .auth-realm {
+ margin: 0 0 var(--space-1);
+ color: var(--muted);
+ font-size: var(--font-xs);
+ font-weight: 600;
+ letter-spacing: .08em;
+ text-transform: uppercase;
+ }
+
+ /* floating-label field: label rides the control and lifts when filled */
+ .auth-field {
+ position: relative;
+ padding-block-start: var(--space-4);
+ }
+
+ .auth-input {
+ padding-inline: 0;
+ background: transparent;
+ font-size: var(--font-md);
+ }
+
+ .auth-label {
+ position: absolute;
+ top: 1.5em;
+ left: 0;
+ font-size: var(--font-md);
+ line-height: var(--lh-base);
+ pointer-events: none;
+ transition:
+ top var(--dur-2) var(--ease),
+ font-size var(--dur-2) var(--ease),
+ color var(--dur-2) var(--ease),
+ opacity var(--dur-2) var(--ease);
+ }
+
+ .auth-input:focus + .auth-label,
+ .auth-input:not(:placeholder-shown) + .auth-label {
+ top: 0;
+ color: var(--text);
+ font-size: var(--font-sm);
+ font-weight: 500;
+ opacity: .8;
+ }
+
+ .auth-choice {
+ cursor: pointer;
+ touch-action: manipulation;
+ }
+
+ .auth-choice input {
+ accent-color: var(--accent);
+ }
+
+ .auth-accounts {
+ --stack-gap: var(--space-2);
+ margin-block-start: var(--space-4);
+ }
+
+ .auth-account {
+ display: grid;
+ justify-items: start;
+ gap: var(--space-1);
+ width: 100%;
+ padding: var(--space-3) 0;
+ border: 0;
+ border-bottom: 1pt solid var(--field-line);
+ background: none;
+ color: inherit;
+ text-align: left;
+ cursor: pointer;
+ touch-action: manipulation;
+ }
+
+ .auth-account:hover,
+ .auth-account:focus-visible,
+ .auth-account:active {
+ border-bottom-color: var(--accent);
+ }
+
+ .auth-account:disabled {
+ opacity: .5;
+ cursor: default;
+ }
+
+ .auth-account-name {
+ font-size: var(--font-md);
+ line-height: var(--lh-base);
+ }
+
+ .auth-account-username {
+ color: var(--muted);
+ font-size: var(--font-base);
+ line-height: var(--lh-base);
+ }
+
+ .auth-error {
+ margin-block-start: var(--space-4);
+ }
+
+ .auth-actions {
+ margin-block-start: var(--space-6);
+ text-align: center;
+ }
+
+ .auth-back {
+ margin-inline-end: auto;
+ }
+
+ .auth-spinner {
+ margin-block-end: var(--space-4);
+ }
+
+ .auth-icon {
+ width: var(--space-8);
+ height: var(--space-8);
+ margin-block-end: var(--space-4);
+ }
+
+ .auth-consent-account {
+ display: flex;
+ align-items: center;
+ gap: var(--space-3);
+ margin-block-start: var(--space-6);
+ padding: var(--space-3);
+ background: var(--line-strong);
+ }
+
+ .auth-consent-account svg {
+ flex: none;
+ width: var(--space-6);
+ height: var(--space-6);
+ }
+
+ .auth-consent-account-body {
+ --stack-gap: var(--space-1);
+ }
+
+ .auth-consent-account-name {
+ font-size: var(--font-base);
+ font-weight: 500;
+ line-height: var(--lh-snug);
+ }
+
+ .auth-consent-account-meta {
+ overflow-wrap: anywhere;
+ color: var(--muted);
+ font-size: var(--font-xs);
+ line-height: var(--lh-snug);
+ }
+
+ .auth-not-you {
+ flex: none;
+ margin-inline-start: auto;
+ font-size: var(--font-sm);
+ }
+
+ .auth-consent-title {
+ margin: var(--space-6) 0 0;
+ font-size: var(--font-base);
+ font-weight: 500;
+ line-height: var(--lh-base);
+ }
+
+ .auth-consent-scopes {
+ --stack-gap: var(--space-2);
+ margin: var(--space-3) 0 0;
+ padding: 0;
+ list-style: none;
+ }
+
+ .auth-consent-scope {
+ display: flex;
+ align-items: flex-start;
+ gap: var(--space-2);
+ color: var(--muted);
+ font-size: var(--font-base);
+ line-height: var(--lh-base);
+ }
+
+ .auth-consent-scope svg {
+ flex: none;
+ width: var(--space-4);
+ height: var(--space-4);
+ margin-block-start: var(--space-1);
+ }
+
+ .auth-consent-footer {
+ margin-block-start: var(--space-6);
+ }
+
+ @media (min-width: 35em) {
+ .auth-page {
+ background-image: var(--hex);
+ background-position: center;
+ background-repeat: no-repeat;
+ background-size: cover;
+ }
+
+ .auth-card {
+ box-shadow: var(--shadow);
+ }
+
+ .auth-actions {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ gap: var(--space-6);
+ }
+ }
+
+ @media (prefers-reduced-motion: reduce) {
+ .auth-label {
+ transition: none;
+ }
+ }
+}
diff --git a/app/shared/component/mobile-nav.tsx b/app/shared/component/mobile-nav.tsx
@@ -31,9 +31,9 @@ export const MobileNavAccount: m.Component<UserMenuAttrs> = {
view({ attrs }) {
return (
<section class="mobile-nav-account" aria-label="Account">
- <div class="user-summary">
- <span class="user-name">{attrs.name}</span>
- <span class="user-meta">{attrs.meta}</span>
+ <div class="menu-heading">
+ <span class="menu-heading-title">{attrs.name}</span>
+ <span class="menu-heading-meta">{attrs.meta}</span>
</div>
<AccountActions
accountHref={attrs.accountHref}
@@ -116,7 +116,7 @@ export const MobileNav: m.Component<MobileNavAttrs> = {
onclick={(event: MouseEvent) => {
const target = event.target as Element | null;
if (!target?.closest('.nav-item')) {
- if (!target?.closest('.user-menu-item, button, a')) attrs.onClose();
+ if (!target?.closest('.menu-item, button, a')) attrs.onClose();
}
}}
>
diff --git a/app/shared/component/modal.tsx b/app/shared/component/modal.tsx
@@ -38,7 +38,7 @@ export const Modal: m.Component<ModalAttrs> = {
view({ attrs, children }) {
return (
<div
- class="modal-overlay"
+ class="overlay"
onmousedown={(event: MouseEvent) => {
if (event.target === event.currentTarget) attrs.onClose();
}}
diff --git a/app/shared/component/select-menu.css b/app/shared/component/select-menu.css
@@ -0,0 +1,152 @@
+@layer components {
+ .select {
+ min-width: 0;
+ max-width: 100%;
+ display: block;
+ }
+
+ .select-trigger {
+ width: 100%;
+ min-width: 0;
+ max-width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 0.75rem;
+ padding: 0.5rem 0.75rem;
+ border: 0;
+ border-bottom: 1pt solid var(--field-line);
+ border-radius: 0;
+ background: var(--surface);
+ color: inherit;
+ font: inherit;
+ font-size: 0.875rem;
+ line-height: 1.5;
+ text-align: left;
+ cursor: pointer;
+ }
+
+ .select-trigger:focus,
+ .select-trigger:focus-visible,
+ .select-trigger[aria-expanded="true"],
+ .select-trigger[aria-expanded="true"]:focus-visible {
+ outline: 0;
+ border-bottom-color: var(--accent);
+ }
+
+ .select-trigger:disabled {
+ color: var(--muted);
+ cursor: default;
+ opacity: 1;
+ }
+
+ .select-trigger svg {
+ flex: none;
+ width: 1.125rem;
+ height: 1.125rem;
+ }
+
+ .select-value {
+ min-width: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+
+ .select-list {
+ position: fixed;
+ top: 0;
+ left: 0;
+ z-index: 120;
+ width: 10rem;
+ max-width: calc(100vw - 1rem);
+ max-height: min(18rem, 45vh);
+ padding: 0.25rem 0;
+ overflow-y: auto;
+ overscroll-behavior: contain;
+ background: var(--surface);
+ box-shadow: var(--shadow);
+ color: var(--text);
+ }
+
+ .select-list.is-measuring {
+ visibility: hidden;
+ top: 0;
+ right: auto;
+ bottom: auto;
+ left: 0;
+ width: auto;
+ max-height: none;
+ }
+
+ .select-option {
+ width: 100%;
+ min-height: 2.25rem;
+ display: flex;
+ align-items: center;
+ gap: 0;
+ padding: 0.5rem 0.75rem;
+ color: inherit;
+ font-size: 0.875rem;
+ line-height: 1.5;
+ cursor: pointer;
+ }
+
+ .select-option-mark {
+ width: 1.25rem;
+ height: 1.25rem;
+ flex: none;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ order: 2;
+ }
+
+ .select-option svg {
+ width: 1.125rem;
+ height: 1.125rem;
+ }
+
+ .select-option:not(.is-selected) .select-option-mark svg {
+ visibility: hidden;
+ }
+
+ .select-option-label {
+ min-width: 0;
+ flex: 1;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+
+ .select-option:hover {
+ background: var(--line-strong);
+ }
+
+ .select-option.is-active {
+ background: var(--line-strong);
+ }
+
+ .select-option.is-selected {
+ color: var(--accent-text);
+ }
+
+ @media (pointer: coarse) {
+ .select-trigger,
+ .select-option {
+ min-height: 2.75rem;
+ padding-block: 0.5rem;
+ touch-action: manipulation;
+ }
+
+ .select-trigger {
+ font-size: 1rem;
+ }
+ }
+
+ @media (min-width: 40em) {
+ .select.select-auto {
+ width: auto;
+ }
+ }
+}
diff --git a/app/shared/component/select-menu.tsx b/app/shared/component/select-menu.tsx
@@ -1,7 +1,7 @@
import { Check, ChevronDown } from 'lucide';
import m from 'mithril';
import { Icon } from '@component/icon';
-import '@style/select-menu.css';
+import './select-menu.css';
let nextSelectId = 0;
diff --git a/app/shared/component/status-page.tsx b/app/shared/component/status-page.tsx
@@ -24,14 +24,14 @@ export const StatusPage: m.Component<StatusPageAttrs> = {
)}
<h1>{attrs.title}</h1>
<p
- class={attrs.error ? 'status-error' : 'status-note'}
+ class={attrs.error ? 'alert' : 'note'}
role={attrs.error ? 'alert' : undefined}
>
{attrs.message}
</p>
{attrs.action ? (
<div class="status-actions">
- <a class="button" href={attrs.action.href}>
+ <a class="button button-primary" href={attrs.action.href}>
{attrs.action.label}
</a>
</div>
diff --git a/app/shared/component/user-menu.css b/app/shared/component/user-menu.css
@@ -0,0 +1,28 @@
+@layer components {
+ .user-menu {
+ display: none;
+ }
+
+ @media (min-width: 60em) {
+ .user-menu {
+ display: block;
+ }
+ }
+
+ .user-menu .menu-trigger svg {
+ width: 1.5rem;
+ height: 1.5rem;
+ }
+
+ .mobile-nav-account {
+ margin: 0 var(--space-6) calc(var(--space-4) + env(safe-area-inset-bottom));
+ }
+
+ .mobile-nav-account .menu-heading {
+ padding-inline: 0;
+ }
+
+ .mobile-nav-account .menu-list {
+ padding: 0;
+ }
+}
diff --git a/app/shared/component/user-menu.tsx b/app/shared/component/user-menu.tsx
@@ -2,6 +2,7 @@ import { CircleUserRound, LogOut, Settings, Sun } from 'lucide';
import m from 'mithril';
import { themeLabel, type Theme } from '@util/theme';
import { Icon } from '@component/icon';
+import './user-menu.css';
export interface AccountActionsAttrs {
accountHref?: string;
@@ -18,25 +19,25 @@ export interface UserMenuAttrs extends AccountActionsAttrs {
export const AccountActions: m.Component<AccountActionsAttrs> = {
view({ attrs }) {
return (
- <div class="user-menu-list">
+ <div class="menu-list">
{attrs.accountHref ? (
- <a class="user-menu-item" href={attrs.accountHref}>
+ <a class="menu-item" href={attrs.accountHref}>
{Icon(Settings)}
<span>Account settings</span>
</a>
) : null}
<button
- class="user-menu-item"
+ class="menu-item"
type="button"
aria-label={`Theme: ${themeLabel(attrs.theme)}`}
onclick={attrs.onCycleTheme}
>
{Icon(Sun)}
<span>Theme</span>
- <span class="user-menu-value">{themeLabel(attrs.theme)}</span>
+ <span class="menu-value">{themeLabel(attrs.theme)}</span>
</button>
<a
- class="user-menu-item"
+ class="menu-item"
href="#"
onclick={(event: Event) => {
event.preventDefault();
@@ -55,7 +56,7 @@ export const UserMenu: m.Component<UserMenuAttrs> = {
view({ attrs }) {
return (
<details
- class="user-menu"
+ class="menu user-menu"
oncreate={({ dom }: any) => {
const close = (event: Event) => {
if (dom.open && !dom.contains(event.target as Node)) dom.open = false;
@@ -67,11 +68,11 @@ export const UserMenu: m.Component<UserMenuAttrs> = {
document.removeEventListener('click', dom.closeOnOutsideClick);
}}
>
- <summary aria-label="Account menu">{Icon(CircleUserRound)}</summary>
- <div class="user-panel">
- <div class="user-summary">
- <span class="user-name">{attrs.name}</span>
- <span class="user-meta">{attrs.meta}</span>
+ <summary class="menu-trigger" aria-label="Account menu">{Icon(CircleUserRound)}</summary>
+ <div class="menu-panel">
+ <div class="menu-heading">
+ <span class="menu-heading-title">{attrs.name}</span>
+ <span class="menu-heading-meta">{attrs.meta}</span>
</div>
<AccountActions
accountHref={attrs.accountHref}
diff --git a/app/shared/style/global.css b/app/shared/style/global.css
@@ -1,1406 +1,1174 @@
-:root {
- font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
- --canvas: #f3f3f3;
- --page: #fff;
- --surface: #fff;
- --sidebar: #000;
- --sidebar-active: #333;
- --topbar: #000;
- --text: #1b1b1b;
- --muted: #656a70;
- --accent: #25a;
- --accent-hover: color-mix(in oklch, var(--accent), white 16%);
- --accent-active: color-mix(in oklch, var(--accent), black 18%);
- --accent-text: var(--accent);
- --accent-text-hover: var(--accent-hover);
- --accent-text-active: var(--accent-active);
- --on-accent: #fff;
- --menu-hover: #8884;
- --row: #00000008;
- --row-hover: #0000000d;
- --skeleton: #00000012;
- --danger: #c9190b;
- --danger-text: #c9190b;
- --warn: #9a6700;
- --field-line: rgba(0, 0, 0, 0.42);
- --shadow: 0 0.125em 0.25em #0008;
- --hex: url('./assets/hex-grid-light.svg');
- --topbar-height: 3.5rem;
-}
-
-*,
-*::before,
-*::after {
- box-sizing: border-box;
-}
-
-html {
- -webkit-text-size-adjust: 100%;
- text-size-adjust: 100%;
-}
-
-html,
-body {
- margin: 0;
- padding: 0;
-}
-
-body {
- background: var(--canvas);
- color: var(--text);
- -webkit-font-smoothing: antialiased;
-}
-
-html.modal-open body,
-html.mobile-nav-open body {
- overflow: hidden;
-}
-
-button,
-input,
-select,
-textarea {
- font: inherit;
-}
-
-.app-shell {
- min-height: 100vh;
- min-height: 100svh;
-}
-
-.topbar {
- position: sticky;
- top: 0;
- z-index: 40;
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 1rem;
- min-height: var(--topbar-height);
- padding: env(safe-area-inset-top) max(1.5rem, env(safe-area-inset-right)) 0
- max(1.5rem, env(safe-area-inset-left));
- background: var(--topbar);
- color: rgba(255, 255, 255, 0.76);
- font-size: 0.875rem;
-}
-
-.brand {
- display: flex;
- align-items: center;
- gap: 0.75rem;
- color: #fff;
- text-decoration: none;
-}
-
-.brand-icon {
- flex: none;
- width: 1.125rem;
- height: 1.125rem;
-}
-
-.brand-name {
- font-size: 1.125rem;
- font-weight: 500;
- line-height: 1.3;
-}
-
-.topbar-actions {
- display: flex;
- align-items: center;
- gap: 0.75rem;
-}
-
-.topbar .user-menu {
- display: none;
-}
-
-.app {
- display: grid;
- grid-template-columns: minmax(0, 1fr);
- grid-template-rows: minmax(0, 1fr);
- min-height: calc(100vh - var(--topbar-height));
- min-height: calc(100svh - var(--topbar-height));
-}
-
-.sidebar {
- min-width: 0;
- display: none;
- flex-direction: column;
- background: var(--sidebar);
- color: #fff;
-}
-
-.nav {
- min-width: 0;
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- overflow-x: auto;
- padding: 0.75rem 0;
- scrollbar-width: none;
-}
-
-.nav::-webkit-scrollbar {
- display: none;
-}
-
-.nav-label {
- display: none;
- margin: 0;
- padding: 0.5rem 1.5rem;
- color: rgba(255, 255, 255, 0.46);
- font-size: 0.6875rem;
- font-weight: 600;
- letter-spacing: 0.08em;
- text-transform: uppercase;
-}
-
-.nav-item {
- min-width: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- gap: 0.75rem;
- flex: 1 1 0;
- padding: 0.6875rem 0.5rem;
- color: rgba(255, 255, 255, 0.82);
- font-size: 0.875rem;
- line-height: 1.4;
- text-align: center;
- text-decoration: none;
- cursor: pointer;
- touch-action: manipulation;
- user-select: none;
- -webkit-tap-highlight-color: transparent;
-}
-
-.nav-item span {
- position: absolute;
- width: 1pt;
- height: 1pt;
- padding: 0;
- margin: -1pt;
- overflow: hidden;
- clip-path: inset(50%);
- white-space: nowrap;
- border: 0;
-}
-
-.nav-item svg {
- flex: none;
- width: 1.125rem;
- height: 1.125rem;
-}
-
-.nav-item:hover,
-.nav-item:active {
- background: var(--menu-hover);
- color: #fff;
-}
-
-.nav-item.is-active {
- background: var(--sidebar-active);
- box-shadow: inset 0 0.25rem 0 var(--accent);
- color: #fff;
-}
-
-.mobile-nav-toggle {
- position: relative;
- display: grid;
- place-items: center;
- width: 2.5rem;
- height: 2.5rem;
- padding: 0;
- border: 0;
- background: transparent;
- color: rgba(255, 255, 255, 0.86);
- cursor: pointer;
- touch-action: manipulation;
- user-select: none;
- -webkit-tap-highlight-color: transparent;
-}
-
-.mobile-nav-toggle:hover,
-.mobile-nav-toggle.is-open {
- color: #fff;
-}
-
-.mobile-nav-toggle-bars,
-.mobile-nav-toggle-bars::before,
-.mobile-nav-toggle-bars::after {
- position: absolute;
- width: 1.25rem;
- height: 1pt;
- background: currentColor;
- transition: transform 0.3s ease;
-}
-
-.mobile-nav-toggle-bars::before,
-.mobile-nav-toggle-bars::after {
- content: '';
- left: 0;
-}
-
-.mobile-nav-toggle-bars::before {
- top: -0.5rem;
-}
-
-.mobile-nav-toggle-bars::after {
- top: 0.5rem;
-}
-
-.mobile-nav-toggle.is-open .mobile-nav-toggle-bars {
- background: transparent;
-}
-
-.mobile-nav-toggle.is-open .mobile-nav-toggle-bars::before {
- transform: translateY(0.5rem) rotate(45deg);
-}
-
-.mobile-nav-toggle.is-open .mobile-nav-toggle-bars::after {
- transform: translateY(-0.5rem) rotate(-45deg);
-}
-
-.mobile-nav {
- position: fixed;
- top: calc(var(--topbar-height) + env(safe-area-inset-top));
- right: max(0rem, env(safe-area-inset-right));
- bottom: 0;
- left: max(0rem, env(safe-area-inset-left));
- z-index: 30;
- overflow-y: auto;
- overscroll-behavior: contain;
- background: var(--sidebar);
- color: #fff;
- visibility: hidden;
- opacity: 0;
- transform: translateX(100%);
- pointer-events: none;
- transition:
- transform 0.3s ease,
- opacity 0.2s ease,
- visibility 0.3s;
-}
-
-html.mobile-nav-open .mobile-nav {
- visibility: visible;
- opacity: 1;
- transform: none;
- pointer-events: auto;
-}
-
-.mobile-nav .nav {
- min-width: 0;
- min-height: 0;
- flex-direction: column;
- flex-wrap: nowrap;
- overflow: visible;
- padding: 1rem max(1.5rem, env(safe-area-inset-right))
- calc(1rem + env(safe-area-inset-bottom))
- max(1.5rem, env(safe-area-inset-left));
- gap: 0.25rem;
-}
-
-.mobile-nav .nav-label {
- display: block;
- padding: 0.5rem 0;
-}
-
-.mobile-nav .nav-item {
- width: 100%;
- flex: none;
- justify-content: flex-start;
- padding-inline: 1rem;
- text-align: left;
- opacity: 0;
- transform: translateX(2rem);
- transition:
- opacity 0.2s ease 0.2s,
- transform 0.3s ease 0.2s;
-}
-
-html.mobile-nav-open .mobile-nav .nav-item {
- opacity: 1;
- transform: none;
-}
-
-.mobile-nav .nav-item span {
- position: static;
- width: auto;
- height: auto;
- margin: 0;
- overflow: visible;
- clip-path: none;
- display: inline;
- white-space: normal;
-}
-
-.mobile-nav-divider {
- height: 1pt;
- margin: 1rem 1.5rem;
- background: rgba(255, 255, 255, 0.18);
-}
-
-.mobile-nav-account {
- margin: 0 1.5rem calc(1rem + env(safe-area-inset-bottom));
-}
-
-.mobile-nav-account .user-summary {
- padding-inline: 0;
-}
-
-.mobile-nav-account .user-menu-list {
- padding: 0;
-}
-
-.main {
- display: flex;
- flex-direction: column;
- min-width: 0;
-}
-
-.content {
- width: 100%;
- max-width: 72rem;
- margin: 0 auto;
- padding: 1.75rem clamp(1rem, 4vw, 2rem) calc(3rem + env(safe-area-inset-bottom));
-}
-
-.page-header {
- margin-bottom: 1.5rem;
-}
-
-.page-header h1 {
- margin: 0;
- font-size: 1.5rem;
- font-weight: 400;
- line-height: 1.3;
-}
-
-.page-header p {
- margin: 0.25rem 0 0;
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.5;
-}
-
-.page-header-row {
- display: grid;
- grid-template-columns: minmax(0, 1fr);
- align-items: start;
- gap: 1rem;
-}
-
-.grid {
- display: grid;
- grid-template-columns: minmax(0, 1fr);
- gap: 1rem;
-}
-
-.panel {
- min-width: 0;
- max-width: 100%;
- padding: 1.5rem;
- background: var(--surface);
- box-shadow: var(--shadow);
-}
-
-.panel-wide {
- grid-column: 1 / -1;
- margin-top: 1rem;
-}
-
-.panel h2 {
- margin: 0 0 1.25rem;
- font-size: 1.0625rem;
- font-weight: 500;
- line-height: 1.4;
-}
-
-.details {
- display: grid;
- gap: 0.875rem;
- margin: 0;
-}
-
-.details > div {
- display: grid;
- grid-template-columns: minmax(0, 1fr);
- gap: 1rem;
-}
-
-.details dt {
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.5;
-}
-
-.details dd {
- margin: 0;
- overflow-wrap: anywhere;
- font-size: 0.875rem;
- line-height: 1.5;
-}
-
-.note {
- margin: 0;
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.6;
-}
-
-.panel-header {
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- gap: 1rem;
- margin-bottom: 1rem;
-}
-
-.panel-header h2 {
- margin: 0;
-}
-
-.panel-header .note {
- margin-top: 0.25rem;
-}
-
-.button,
-.button-secondary,
-.button-danger {
- display: inline-block;
- padding: 0.625rem 1.25rem;
- border: 0;
- border-radius: 0;
- background: var(--accent);
- color: var(--on-accent);
- font: inherit;
- font-size: 0.8125rem;
- font-weight: 500;
- letter-spacing: 0.05em;
- line-height: 1.4;
- text-align: center;
- text-decoration: none;
- text-transform: uppercase;
- cursor: pointer;
-}
-
-.button:hover {
- background: var(--accent-hover);
-}
-
-.button:active {
- background: var(--accent-active);
-}
-
-.button-secondary {
- background: transparent;
- color: var(--accent-text);
-}
-
-.button-secondary:hover {
- background: var(--row-hover);
- color: var(--accent-text-hover);
-}
-
-.button-secondary:active {
- background: var(--row);
- color: var(--accent-text-active);
-}
-
-.button-danger {
- background: var(--danger);
- color: #fff;
-}
-
-.button-danger:hover {
- background: var(--danger);
- filter: brightness(1.08);
-}
-
-.button:disabled,
-.button-secondary:disabled,
-.button-danger:disabled {
- cursor: default;
- opacity: 0.55;
-}
-
-.alert {
- margin: 0 0 1rem;
- color: var(--danger-text);
- font-size: 0.875rem;
- line-height: 1.5;
-}
-
-.alert p {
- margin: 0 0 0.5rem;
-}
-
-.notice {
- margin: 0 0 1rem;
- padding: 0.75rem 1rem;
- background: var(--row);
- color: var(--text);
- font-size: 0.875rem;
- line-height: 1.5;
-}
-
-.loading {
- color: var(--muted);
- font-size: 0.875rem;
-}
-
-.empty {
- padding: 1.5rem;
- background: var(--surface);
- box-shadow: var(--shadow);
-}
-
-.empty p {
- margin: 0;
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.6;
-}
-
-.skeleton {
- height: 0.75rem;
- background: var(--skeleton);
-}
-
-.skeleton + .skeleton {
- margin-top: 0.75rem;
-}
-
-.skeleton-title {
- width: 8rem;
- height: 1rem;
-}
-
-.skeleton-short {
- width: 35%;
-}
-
-.user-menu {
- position: relative;
-}
-
-.user-menu summary {
- display: grid;
- place-items: center;
- width: 2.25rem;
- height: 2.25rem;
- color: rgba(255, 255, 255, 0.86);
- list-style: none;
- cursor: pointer;
- user-select: none;
-}
-
-.user-menu summary::-webkit-details-marker {
- display: none;
-}
-
-.user-menu summary::marker {
- content: '';
-}
-
-.user-menu summary:hover,
-.user-menu[open] summary {
- color: #fff;
-}
-
-.user-menu summary svg {
- width: 1.5rem;
- height: 1.5rem;
-}
-
-.user-panel {
- position: absolute;
- top: 2.75rem;
- right: 0;
- z-index: 10;
- width: min(15rem, calc(100vw - 2rem));
- max-width: calc(100vw - 2rem);
- background: var(--sidebar);
- color: #fff;
- box-shadow: var(--shadow);
-}
-
-.user-summary {
- display: grid;
- gap: 0.125rem;
- padding: 0.875rem 1rem;
-}
-
-.user-name {
- font-size: 0.875rem;
- font-weight: 500;
- line-height: 1.4;
-}
-
-.user-meta {
- color: rgba(255, 255, 255, 0.56);
- font-size: 0.75rem;
- line-height: 1.4;
-}
-
-.user-menu-list {
- display: flex;
- flex-direction: column;
- padding: 0.5rem 0;
-}
-
-.user-menu-item {
- display: flex;
- align-items: center;
- gap: 0.75rem;
- width: 100%;
- padding: 0.625rem 1rem;
- border: 0;
- background: transparent;
- color: rgba(255, 255, 255, 0.82);
- font: inherit;
- font-size: 0.875rem;
- line-height: 1.4;
- text-align: left;
- text-decoration: none;
- cursor: pointer;
- user-select: none;
+@layer tokens, base, primitives, components, themes, apps, mockups;
+
+/* ==========================================================================
+ tokens: the only layer (besides themes) allowed to carry literal colors.
+ ========================================================================== */
+@layer tokens {
+ :root {
+ /* color: surfaces and ink */
+ --canvas: #f3f3f3;
+ --surface: #fff;
+ --text: #1b1b1b;
+ --muted: #656a70;
+ --line: #00000008; /* hairline separators */
+ --line-strong: #0000000d; /* hover fills / raised */
+ --field-line: rgba(0,0,0,.42);
+
+ /* color: brand */
+ --accent: #2555aa;
+ --accent-hover: color-mix(in oklch, var(--accent), white 16%);
+ --accent-active: color-mix(in oklch, var(--accent), black 18%);
+ --accent-text: var(--accent);
+ --accent-text-hover: var(--accent-hover);
+ --on-accent: #fff;
+ --accent-tint: color-mix(in oklch, var(--accent) 12%, transparent);
+
+ /* color: semantic */
+ --danger: #c9190b;
+ --danger-text: var(--danger);
+ --danger-tint: color-mix(in oklch, var(--danger) 12%, transparent);
+ --warn: #9a6700;
+
+ /* color: shell chrome */
+ --sidebar: #000;
+ --sidebar-active: #333;
+ --topbar: #000;
+ --on-chrome: #fff;
+ --chrome-text: rgba(255,255,255,.76);
+ --chrome-item: rgba(255,255,255,.82);
+ --chrome-label: rgba(255,255,255,.46);
+ --chrome-toggle: rgba(255,255,255,.86);
+ --chrome-divider: rgba(255,255,255,.18);
+ --menu-hover: #8884;
+
+ /* color: scrim and fills */
+ --overlay: rgba(0,0,0,.58);
+ --skeleton: #00000012;
+
+ /* assets */
+ --hex: url("./assets/hex-grid-light.svg");
+
+ /* font stack */
+ --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
+ Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
+
+ /* type scale */
+ --font-xs: .75rem; /* labels, table column headers */
+ --font-sm: .8125rem; /* secondary/meta, inline action buttons */
+ --font-base: .875rem; /* body copy, table cell text (DEFAULT) */
+ --font-md: 1rem; /* toolbar search, emphasized body */
+ --font-lg: 1.0625rem; /* panel headings */
+ --font-xl: 1.125rem; /* brand wordmark */
+ --font-2xl: 1.5rem; /* page title (h1) */
+ --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
+
+ --lh-tight: 1.3;
+ --lh-snug: 1.4;
+ --lh-base: 1.5;
+ --lh-loose: 1.6;
+ --lh-body: var(--lh-base); /* the one line-height every table cell uses */
+
+ /* spacing scale (0.25rem step) */
+ --space-1: .25rem;
+ --space-2: .5rem;
+ --space-3: .75rem;
+ --space-4: 1rem;
+ --space-5: 1.25rem;
+ --space-6: 1.5rem;
+ --space-8: 2rem;
+
+ /* radius */
+ --radius-0: 0; /* buttons are square by design */
+ --radius-sm: .25rem; /* small interactive surfaces */
+ --radius-round: 50%; /* exact circles: dots, spinners, avatars */
+
+ /* control + table metrics */
+ --topbar-height: 3.5rem;
+ --control-h: 2.75rem; /* touch/primary form control height */
+ --cell-y: var(--space-3); /* .75rem desktop cell padding */
+ --cell-x: var(--space-6); /* 1.5rem desktop cell padding */
+
+ /* elevation */
+ --shadow: 0 .125em .25em #0008;
+
+ /* motion */
+ --dur-1: 120ms;
+ --dur-2: 180ms;
+ --ease: cubic-bezier(.2,0,0,1);
+ }
}
-.user-menu-item svg {
- flex: none;
- width: 1.125rem;
- height: 1.125rem;
-}
+/* ==========================================================================
+ base: reset, typography, app shell, focus, motion, touch.
+ ========================================================================== */
+@layer base {
+ *,
+ *::before,
+ *::after {
+ box-sizing: border-box;
+ }
-.user-menu-item:hover,
-.user-menu-item:active {
- background: var(--menu-hover);
- color: #fff;
-}
+ html {
+ font-family: var(--font-sans);
+ -webkit-text-size-adjust: 100%;
+ text-size-adjust: 100%;
+ }
-.user-menu-value {
- margin-left: auto;
- color: rgba(255, 255, 255, 0.56);
- font-size: 0.75rem;
-}
+ html,
+ body {
+ margin: 0;
+ padding: 0;
+ }
-.status-page {
- display: grid;
- place-items: center;
- min-height: 100vh;
- min-height: 100svh;
- padding: env(safe-area-inset-top) env(safe-area-inset-right)
- calc(1rem + env(safe-area-inset-bottom)) env(safe-area-inset-left);
- background: var(--surface);
- color: var(--text);
-}
+ body {
+ background: var(--canvas);
+ color: var(--text);
+ -webkit-font-smoothing: antialiased;
+ }
-.status-panel {
- position: relative;
- width: min(calc(100% - 2rem), 28rem);
- padding: 2rem;
- background: var(--surface);
-}
+ html.modal-open body,
+ html.mobile-nav-open body {
+ overflow: hidden;
+ }
-.status-panel h1 {
- margin: 0 0 1rem;
- padding-right: 3rem;
- font-size: 1.5rem;
- font-weight: 400;
- line-height: 1.3;
-}
+ button,
+ input,
+ select,
+ textarea {
+ font: inherit;
+ }
-.status-icon {
- position: absolute;
- top: 2rem;
- right: 2rem;
- width: 2rem;
- height: 2rem;
- color: currentColor;
-}
+ img,
+ svg {
+ display: block;
+ }
-.spinner {
- position: absolute;
- top: 2rem;
- right: 2rem;
- width: 2rem;
- height: 2rem;
- border: 0.1875rem solid var(--skeleton);
- border-top-color: var(--text);
- border-radius: 50%;
- animation: spin 1s linear infinite;
-}
+ h1 { margin: 0 0 var(--space-4); font-size: var(--font-2xl); }
+ h2 { margin: 0 0 var(--space-4); font-size: var(--font-lg); }
+ h3 { margin: 0 0 var(--space-4); font-size: var(--font-md); }
+ h4 { margin: 0 0 var(--space-4); font-size: var(--font-base); }
+ h1, h2, h3, h4 { font-weight: 500; line-height: var(--lh-tight); }
-@keyframes spin {
- to {
- transform: rotate(360deg);
+ :focus-visible {
+ outline: 2pt solid var(--accent);
+ outline-offset: .125rem;
}
-}
-.status-note {
- margin: 0;
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.6;
-}
+ .sr-only {
+ position: absolute;
+ width: 1pt;
+ height: 1pt;
+ padding: 0;
+ margin: -1pt;
+ overflow: hidden;
+ clip: rect(0, 0, 0, 0);
+ white-space: nowrap;
+ border: 0;
+ }
-.status-error {
- margin: 0;
- color: var(--danger-text);
- font-size: 0.875rem;
- line-height: 1.6;
-}
+ /* app shell: the stable frame every surface builds on */
+ .app-shell {
+ min-height: 100vh;
+ min-height: 100svh;
+ }
-.status-actions {
- display: grid;
- gap: 1rem;
- margin-top: 1.5rem;
-}
+ .topbar {
+ position: sticky;
+ top: 0;
+ z-index: 40;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: var(--space-4);
+ min-height: var(--topbar-height);
+ padding: env(safe-area-inset-top) max(var(--space-6), env(safe-area-inset-right)) 0
+ max(var(--space-6), env(safe-area-inset-left));
+ background: var(--topbar);
+ color: var(--chrome-text);
+ font-size: var(--font-base);
+ }
-.status-actions > .button,
-.status-actions > .button-secondary,
-.status-actions > .button-danger {
- justify-content: center;
- text-align: center;
-}
+ .brand {
+ display: flex;
+ align-items: center;
+ gap: var(--space-3);
+ color: var(--on-chrome);
+ text-decoration: none;
+ }
-.sr-only {
- position: absolute;
- width: 1pt;
- height: 1pt;
- padding: 0;
- margin: -1pt;
- overflow: hidden;
- clip: rect(0, 0, 0, 0);
- white-space: nowrap;
- border: 0;
-}
+ .brand-icon {
+ flex: none;
+ width: var(--font-xl);
+ height: var(--font-xl);
+ }
-.table-panel {
- color: var(--text);
-}
+ .brand-name {
+ font-size: var(--font-xl);
+ font-weight: 500;
+ line-height: var(--lh-tight);
+ }
-.table-toolbar {
- display: flex;
- flex-direction: column;
- gap: 1rem;
- margin-bottom: 1rem;
- padding: 1rem;
- background: var(--surface);
- box-shadow: var(--shadow);
-}
+ .topbar-actions {
+ display: flex;
+ align-items: center;
+ gap: var(--space-3);
+ }
-.table-search {
- flex: 1;
- min-width: 0;
-}
+ .app {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr);
+ grid-template-rows: minmax(0, 1fr);
+ min-height: calc(100vh - var(--topbar-height));
+ min-height: calc(100svh - var(--topbar-height));
+ }
-.table-search input {
- width: 100%;
- padding: 0.5rem 0;
- border: 0;
- border-bottom: 1pt solid var(--field-line);
- border-radius: 0;
- background: transparent;
- color: inherit;
- font: inherit;
- font-size: 1rem;
- line-height: 1.5;
- outline: none;
-}
+ .sidebar {
+ min-width: 0;
+ display: none;
+ flex-direction: column;
+ background: var(--sidebar);
+ color: var(--on-chrome);
+ }
-.table-search input:focus {
- border-bottom-color: var(--accent);
-}
+ .nav {
+ min-width: 0;
+ display: flex;
+ flex-direction: row;
+ flex-wrap: nowrap;
+ overflow-x: auto;
+ padding: var(--space-3) 0;
+ scrollbar-width: none;
+ }
-.table-actions {
- display: flex;
- justify-content: flex-end;
- flex-wrap: wrap;
- gap: 1rem;
-}
+ .nav::-webkit-scrollbar {
+ display: none;
+ }
-.data-table-wrap {
- overflow: visible;
-}
+ .nav-label {
+ display: none;
+ margin: 0;
+ padding: var(--space-2) var(--space-6);
+ color: var(--chrome-label);
+ font-size: .6875rem;
+ font-weight: 600;
+ letter-spacing: .08em;
+ text-transform: uppercase;
+ }
-.data-table {
- display: block;
- min-width: 0;
- width: 100%;
- border-collapse: collapse;
- font-size: 0.875rem;
-}
+ .nav-item {
+ min-width: 0;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ gap: var(--space-3);
+ flex: 1 1 0;
+ padding: .6875rem var(--space-2);
+ color: var(--chrome-item);
+ font-size: var(--font-base);
+ line-height: var(--lh-snug);
+ text-align: center;
+ text-decoration: none;
+ cursor: pointer;
+ touch-action: manipulation;
+ user-select: none;
+ -webkit-tap-highlight-color: transparent;
+ }
-.data-table thead {
- display: none;
-}
+ .nav-item span {
+ position: absolute;
+ width: 1pt;
+ height: 1pt;
+ padding: 0;
+ margin: -1pt;
+ overflow: hidden;
+ clip-path: inset(50%);
+ white-space: nowrap;
+ border: 0;
+ }
-.data-table tbody,
-.data-table tbody tr,
-.data-table td {
- display: block;
- width: 100%;
-}
+ .nav-item svg {
+ flex: none;
+ width: var(--font-xl);
+ height: var(--font-xl);
+ }
-.data-table tbody tr,
-.data-table-static tbody tr {
- min-height: 2.75rem;
- margin-bottom: 1rem;
- padding: 1rem;
- background: var(--surface);
- box-shadow: var(--shadow);
-}
+ .nav-item:hover,
+ .nav-item:active {
+ background: var(--menu-hover);
+ color: var(--on-chrome);
+ }
-.data-table tbody tr:last-child,
-.data-table-static tbody tr:last-child {
- margin-bottom: 0;
-}
+ .nav-item.is-active {
+ background: var(--sidebar-active);
+ box-shadow: inset 0 var(--space-1) 0 var(--accent);
+ color: var(--on-chrome);
+ }
-.data-table th,
-.data-table td {
- display: block;
- padding: 0.5rem 0;
- border: 0;
- text-align: left;
- vertical-align: middle;
-}
+ .mobile-nav-toggle {
+ position: relative;
+ display: grid;
+ place-items: center;
+ width: 2.5rem;
+ height: 2.5rem;
+ padding: 0;
+ border: 0;
+ background: transparent;
+ color: var(--chrome-toggle);
+ cursor: pointer;
+ touch-action: manipulation;
+ user-select: none;
+ -webkit-tap-highlight-color: transparent;
+ }
-.data-table td[data-label]::before {
- content: attr(data-label);
- display: block;
- margin-bottom: 0.25rem;
- color: var(--muted);
- font-size: 0.75rem;
- font-weight: 500;
- letter-spacing: 0.08em;
- text-transform: uppercase;
-}
+ .mobile-nav-toggle:hover,
+ .mobile-nav-toggle.is-open {
+ color: var(--on-chrome);
+ }
-.data-table td:last-child {
- padding-bottom: 0;
-}
+ .mobile-nav-toggle-bars,
+ .mobile-nav-toggle-bars::before,
+ .mobile-nav-toggle-bars::after {
+ position: absolute;
+ width: var(--space-5);
+ height: 1pt;
+ background: currentColor;
+ transition: transform var(--dur-2) var(--ease);
+ }
-.data-table th {
- color: var(--muted);
- font-size: 0.75rem;
- font-weight: 500;
- letter-spacing: 0.08em;
- text-transform: uppercase;
-}
+ .mobile-nav-toggle-bars::before,
+ .mobile-nav-toggle-bars::after {
+ content: '';
+ left: 0;
+ }
-.data-table tbody tr {
- cursor: pointer;
-}
+ .mobile-nav-toggle-bars::before {
+ top: calc(var(--space-2) * -1);
+ }
-.data-table tbody tr:hover {
- background: var(--row-hover);
-}
+ .mobile-nav-toggle-bars::after {
+ top: var(--space-2);
+ }
-.data-table tbody tr:focus-visible {
- outline: 2pt solid var(--accent);
- outline-offset: -2pt;
-}
+ .mobile-nav-toggle.is-open .mobile-nav-toggle-bars {
+ background: transparent;
+ }
-.data-table-static tbody tr {
- cursor: default;
-}
+ .mobile-nav-toggle.is-open .mobile-nav-toggle-bars::before {
+ transform: translateY(var(--space-2)) rotate(45deg);
+ }
-.data-table tbody tr:last-child td {
- border-bottom: 0;
-}
+ .mobile-nav-toggle.is-open .mobile-nav-toggle-bars::after {
+ transform: translateY(calc(var(--space-2) * -1)) rotate(-45deg);
+ }
-.data-table .table-icon-column {
- display: none;
-}
+ .mobile-nav {
+ position: fixed;
+ top: calc(var(--topbar-height) + env(safe-area-inset-top));
+ right: max(0rem, env(safe-area-inset-right));
+ bottom: 0;
+ left: max(0rem, env(safe-area-inset-left));
+ z-index: 30;
+ overflow-y: auto;
+ overscroll-behavior: contain;
+ background: var(--sidebar);
+ color: var(--on-chrome);
+ visibility: hidden;
+ opacity: 0;
+ transform: translateX(100%);
+ pointer-events: none;
+ transition:
+ transform var(--dur-2) var(--ease),
+ opacity var(--dur-1) var(--ease),
+ visibility var(--dur-2);
+ }
-.data-table-primary {
- min-width: 0;
- margin-bottom: 0.75rem;
- padding-bottom: 0.75rem;
- border-bottom: 1pt solid var(--row);
-}
+ html.mobile-nav-open .mobile-nav {
+ visibility: visible;
+ opacity: 1;
+ transform: none;
+ pointer-events: auto;
+ }
-.data-table-sub {
- display: block;
- margin-top: 0.125rem;
- color: var(--muted);
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
- font-size: 0.8125rem;
- overflow-wrap: anywhere;
-}
+ .mobile-nav .nav {
+ min-width: 0;
+ min-height: 0;
+ flex-direction: column;
+ flex-wrap: nowrap;
+ overflow: visible;
+ padding: var(--space-4) max(var(--space-6), env(safe-area-inset-right))
+ calc(var(--space-4) + env(safe-area-inset-bottom))
+ max(var(--space-6), env(safe-area-inset-left));
+ gap: var(--space-1);
+ }
-.data-table-status {
- display: block;
- margin-top: 0.125rem;
- color: var(--muted);
- font-size: 0.8125rem;
-}
+ .mobile-nav .nav-label {
+ display: block;
+ padding: var(--space-2) 0;
+ }
-.table-icon {
- display: grid;
- place-items: center;
- width: 2rem;
- height: 2rem;
- flex: none;
- overflow: hidden;
- background: var(--row);
- color: var(--muted);
-}
+ .mobile-nav .nav-item {
+ width: 100%;
+ flex: none;
+ justify-content: flex-start;
+ padding-inline: var(--space-4);
+ text-align: left;
+ opacity: 0;
+ transform: translateX(var(--space-8));
+ transition:
+ opacity var(--dur-1) var(--ease) var(--dur-2),
+ transform var(--dur-2) var(--ease) var(--dur-2);
+ }
-.table-icon img {
- width: 100%;
- height: 100%;
- object-fit: contain;
-}
+ html.mobile-nav-open .mobile-nav .nav-item {
+ opacity: 1;
+ transform: none;
+ }
-.table-icon svg {
- width: 1.125rem;
- height: 1.125rem;
-}
+ .mobile-nav .nav-item span {
+ position: static;
+ width: auto;
+ height: auto;
+ margin: 0;
+ overflow: visible;
+ clip-path: none;
+ display: inline;
+ white-space: normal;
+ }
-/* Data tables embedded inside a panel: align to panel content, use row rules */
-.panel .table-toolbar {
- padding: 0;
- margin: 1.25rem 0 1rem;
- background: transparent;
- box-shadow: none;
- border-bottom: 0;
-}
+ .mobile-nav-divider {
+ height: 1pt;
+ margin: var(--space-4) var(--space-6);
+ background: var(--chrome-divider);
+ }
-.panel .data-table tbody tr {
- padding: 0;
- background: transparent;
- box-shadow: none;
-}
+ .menu {
+ position: relative;
+ }
-.panel .data-table th,
-.panel .data-table td {
- padding-right: 0;
- padding-left: 0;
-}
+ .menu-trigger {
+ display: grid;
+ place-items: center;
+ width: 2.25rem;
+ height: 2.25rem;
+ color: var(--chrome-toggle);
+ list-style: none;
+ cursor: pointer;
+ user-select: none;
+ }
-.panel .data-table tbody tr:last-child td {
- border-bottom: 0;
-}
+ .menu-trigger::-webkit-details-marker {
+ display: none;
+ }
-.modal-overlay {
- position: fixed;
- inset: 0;
- z-index: 100;
- display: grid;
- place-items: end center;
- padding: 0;
- background: rgba(0, 0, 0, 0.58);
- touch-action: manipulation;
-}
+ .menu-trigger::marker {
+ content: '';
+ }
-.modal {
- width: 100%;
- max-height: 100vh;
- max-height: calc(100dvh - env(safe-area-inset-top));
- overflow: auto;
- overscroll-behavior: contain;
- border-top: 0.25rem solid var(--accent);
- background: var(--surface);
- color: var(--text);
- box-shadow: var(--shadow);
-}
+ .menu-trigger:hover,
+ .menu[open] > .menu-trigger {
+ color: var(--on-chrome);
+ }
-.modal-header {
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- gap: 1rem;
- padding: 1rem 1rem 0;
-}
+ .menu-panel {
+ position: absolute;
+ inset-block-start: 2.75rem;
+ inset-inline-end: 0;
+ z-index: 10;
+ width: min(15rem, calc(100vw - 2rem));
+ background: var(--sidebar);
+ color: var(--on-chrome);
+ box-shadow: var(--shadow);
+ }
-.modal-header h2 {
- margin: 0;
- font-size: 1.25rem;
- font-weight: 400;
- line-height: 1.3;
-}
+ .menu-heading {
+ display: grid;
+ gap: 0.125rem;
+ padding: 0.875rem 1rem;
+ }
-.modal-close {
- display: grid;
- place-items: center;
- width: 2rem;
- height: 2rem;
- padding: 0;
- border: 0;
- border-radius: 0;
- background: transparent;
- color: var(--muted);
- cursor: pointer;
-}
+ .menu-heading-title {
+ font-size: var(--font-base);
+ font-weight: 500;
+ line-height: var(--lh-snug);
+ }
-.modal-close:hover {
- color: var(--text);
-}
+ .menu-heading-meta {
+ color: var(--chrome-label);
+ font-size: var(--font-xs);
+ line-height: var(--lh-snug);
+ }
-.modal-close svg {
- width: 1.25rem;
- height: 1.25rem;
-}
+ .menu-list {
+ display: flex;
+ flex-direction: column;
+ padding: var(--space-2) 0;
+ }
-.modal-body {
- padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
-}
+ .menu-item {
+ display: flex;
+ align-items: center;
+ gap: var(--space-3);
+ width: 100%;
+ padding: 0.625rem 1rem;
+ border: 0;
+ background: transparent;
+ color: var(--chrome-item);
+ font: inherit;
+ font-size: var(--font-base);
+ line-height: var(--lh-snug);
+ text-align: left;
+ text-decoration: none;
+ cursor: pointer;
+ user-select: none;
+ }
-.modal-note {
- margin: 0;
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.6;
-}
+ .menu-item:hover {
+ background: var(--menu-hover);
+ color: var(--on-chrome);
+ }
-.modal-actions {
- position: sticky;
- bottom: 0;
- display: flex;
- flex-wrap: wrap;
- justify-content: flex-end;
- gap: 0.5rem;
- margin: 1rem -1rem calc(-1rem - env(safe-area-inset-bottom));
- padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
- background: var(--surface);
- border-top: 1pt solid var(--row);
-}
+ .menu-item svg {
+ flex: none;
+ width: var(--font-xl);
+ height: var(--font-xl);
+ }
-.modal-actions > .button,
-.modal-actions > .button-secondary,
-.modal-actions > .button-danger {
- flex: 1;
- justify-content: center;
- text-align: center;
-}
+ .menu-value {
+ margin-inline-start: auto;
+ color: var(--chrome-label);
+ font-size: var(--font-xs);
+ }
-a:focus-visible,
-button:focus-visible,
-summary:focus-visible,
-select:focus-visible {
- outline: 2pt solid var(--accent);
- outline-offset: 2pt;
-}
+ .main {
+ display: flex;
+ flex-direction: column;
+ min-width: 0;
+ }
-@media (min-width: 35em) {
- .status-page {
- background-color: var(--page);
- background-image: var(--hex);
- background-position: center;
- background-repeat: no-repeat;
- background-size: cover;
+ .content {
+ width: min(100%, 72rem);
+ margin: 0 auto;
+ padding: 1.75rem clamp(var(--space-4), 4vw, var(--space-8))
+ calc(var(--space-8) + env(safe-area-inset-bottom));
}
- .status-panel {
- box-shadow: var(--shadow);
+ .page-header {
+ margin-block-end: var(--space-6);
}
- .status-actions {
- display: flex;
- justify-content: flex-end;
- align-items: center;
+ .page-header h1 {
+ margin: 0;
+ font-size: var(--font-2xl);
+ font-weight: 400;
+ line-height: var(--lh-tight);
}
- .status-actions > .button,
- .status-actions > .button-secondary,
- .status-actions > .button-danger {
- flex: 0 auto;
+ .page-header p {
+ margin: var(--space-1) 0 0;
+ color: var(--muted);
+ font-size: var(--font-base);
+ line-height: var(--lh-base);
}
-}
-@media (min-width: 40em) {
- .table-panel {
- background: var(--surface);
- box-shadow: var(--shadow);
+ .page-header-row {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr);
+ align-items: start;
+ gap: var(--space-4);
}
- .table-toolbar {
- flex-direction: row;
- align-items: center;
- margin-bottom: 0;
- padding: 1rem 1.5rem;
- background: transparent;
- box-shadow: none;
- border-bottom: 1pt solid var(--row);
+ @media (min-width: 40em) {
+ .page-header-row {
+ grid-template-columns: minmax(0, 1fr) auto;
+ }
}
- .data-table-wrap {
- overflow-x: auto;
+ @media (min-width: 60em) {
+ .app {
+ grid-template-columns: 15rem minmax(0, 1fr);
+ grid-template-rows: minmax(0, 1fr);
+ }
+
+ .sidebar {
+ display: flex;
+ min-height: calc(100vh - var(--topbar-height));
+ min-height: calc(100svh - var(--topbar-height));
+ }
+
+ .mobile-nav-toggle,
+ .mobile-nav {
+ display: none;
+ }
+
+ .nav {
+ flex: 1;
+ overflow: visible;
+ flex-direction: column;
+ flex-wrap: nowrap;
+ padding: var(--space-3) 0;
+ gap: 0;
+ }
+
+ .nav-label {
+ display: block;
+ padding: var(--space-2) var(--space-6);
+ }
+
+ .nav-item {
+ min-width: 0;
+ width: 100%;
+ flex: none;
+ padding-inline: var(--space-6);
+ justify-content: flex-start;
+ text-align: left;
+ opacity: 1;
+ transform: none;
+ transition: none;
+ }
+
+ .nav-item span {
+ position: static;
+ width: auto;
+ height: auto;
+ margin: 0;
+ overflow: visible;
+ clip-path: none;
+ display: inline;
+ white-space: normal;
+ }
}
- .data-table {
- display: table;
- font-size: 0.875rem;
+ @media (pointer: coarse) {
+ .button,
+ .field-control,
+ .checkbox input,
+ .select-trigger {
+ min-height: var(--control-h);
+ }
}
- .data-table thead {
- display: table-header-group;
+ @media (prefers-reduced-motion: reduce) {
+ .spinner {
+ animation: none;
+ }
+
+ .mobile-nav,
+ .mobile-nav .nav-item,
+ .mobile-nav-toggle-bars,
+ .mobile-nav-toggle-bars::before,
+ .mobile-nav-toggle-bars::after {
+ transition: none;
+ }
+
+ .mobile-nav,
+ .mobile-nav .nav-item {
+ transform: none;
+ }
}
+}
- .data-table tbody {
- display: table-row-group;
+/* ==========================================================================
+ primitives: small, composable, token-driven building blocks.
+ ========================================================================== */
+@layer primitives {
+ /* structure: boxed, default filled */
+ .button {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ gap: var(--space-2);
+ min-height: var(--control-h);
+ padding: var(--space-2) var(--space-4);
+ border: 0;
+ border-radius: var(--radius-0);
+ font: inherit;
+ font-size: var(--font-base);
+ font-weight: 500;
+ text-transform: uppercase;
+ letter-spacing: .02em;
+ text-align: center;
+ text-decoration: none;
+ cursor: pointer;
+ transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
+ background: var(--btn-fill, var(--accent));
+ color: var(--btn-on, var(--on-accent));
}
+ .button:disabled { opacity: .55; cursor: default; }
+ .button:hover:not(:disabled) { background: var(--btn-fill-hover, var(--accent-hover)); }
+ .button:active:not(:disabled) { background: var(--btn-fill-active, var(--accent-active)); }
- .data-table tbody tr,
- .data-table-static tbody tr {
- display: table-row;
+ /* structure: text, default text theming */
+ .button-inline {
+ display: inline-block;
min-height: 0;
- margin-bottom: 0;
padding: 0;
- background: transparent;
- box-shadow: none;
+ border: 0;
+ background: none;
+ color: var(--btn-text, var(--accent-text));
+ text-transform: none;
+ letter-spacing: normal;
+ line-height: var(--lh-body);
+ white-space: nowrap;
+ text-decoration: none;
+ cursor: pointer;
}
-
- .data-table tbody tr:hover {
- background: var(--row-hover);
+ .button-inline:disabled { cursor: default; }
+ .button-inline:hover { color: var(--btn-text-hover, var(--accent-text-hover));
+ text-decoration: underline; }
+
+ /* pattern theming */
+ .button-filled { background: var(--btn-fill, var(--accent));
+ color: var(--btn-on, var(--on-accent)); }
+ .button-filled:hover:not(:disabled) { background: var(--btn-fill-hover, var(--accent-hover)); }
+ .button-filled:active:not(:disabled) { background: var(--btn-fill-active, var(--accent-active)); }
+ .button-text { background: none; color: var(--btn-text, var(--accent-text)); }
+ .button-text:hover:not(:disabled) { background: none; color: var(--btn-text-hover, var(--accent-text-hover)); }
+ .button-text:active:not(:disabled) { background: none; }
+ .button-outline { background: transparent; color: var(--btn-text, var(--accent-text));
+ box-shadow: inset 0 0 0 1pt var(--btn-line, var(--accent)); }
+ .button-outline:hover:not(:disabled) { background: var(--btn-tint, var(--accent-tint)); }
+ .button-outline:active:not(:disabled) { background: var(--btn-tint, var(--accent-tint)); }
+
+ /* color theming */
+ .button-primary {
+ --btn-fill: var(--accent);
+ --btn-fill-hover: var(--accent-hover);
+ --btn-fill-active: var(--accent-active);
+ --btn-on: var(--on-accent);
+ --btn-text: var(--accent-text);
+ --btn-text-hover: var(--accent-text-hover);
+ --btn-line: var(--accent);
+ --btn-tint: var(--accent-tint);
}
-
- .data-table-static tbody tr:hover {
- background: transparent;
+ .button-secondary {
+ --btn-fill: var(--accent-tint);
+ --btn-fill-hover: var(--accent-tint);
+ --btn-fill-active: var(--accent-tint);
+ --btn-on: var(--accent-text);
+ --btn-text: var(--accent-text);
+ --btn-text-hover: var(--accent-text-hover);
+ --btn-line: var(--accent);
+ --btn-tint: var(--accent-tint);
}
-
- .data-table th,
- .data-table td {
- display: table-cell;
- padding: 0.75rem 1.5rem;
- border-bottom: 1pt solid var(--row);
+ .button-danger {
+ --btn-fill: var(--danger);
+ --btn-fill-hover: var(--danger);
+ --btn-fill-active: var(--danger);
+ --btn-on: var(--on-accent);
+ --btn-text: var(--danger-text);
+ --btn-text-hover: var(--danger-text);
+ --btn-line: var(--danger);
+ --btn-tint: var(--danger-tint);
}
- .data-table td[data-label]::before {
- content: none;
- }
+ /* theming-only compounds carry pattern-specific deltas */
+ .button-filled.button-danger:hover:not(:disabled) { filter: brightness(1.08); }
+ .button-filled.button-danger:active:not(:disabled) { filter: brightness(.94); }
- .data-table-primary {
- min-width: 16rem;
- margin-bottom: 0;
- padding-bottom: 0;
- border-bottom: 0;
+ /* coarse pointer: taller hit area, layout unchanged */
+ @media (pointer: coarse) {
+ .button-inline {
+ padding-block: var(--space-3);
+ margin-block: calc(var(--space-3) * -1);
+ }
}
- .data-table .table-icon-column {
- display: table-cell;
- width: 1%;
- }
+ .button-inline + .button-inline { margin-inline-start: var(--space-4); }
- .details > div {
- grid-template-columns: 8.5rem minmax(0, 1fr);
+ .field { display: grid; gap: var(--space-1); margin-block-end: var(--space-4); min-width: 0; }
+ .field-label { color: var(--muted); font-size: var(--font-xs); line-height: var(--lh-snug); }
+ .field-control,
+ .field-textarea {
+ width: 100%; min-width: 0; padding: var(--space-2) var(--space-3);
+ border: 0; border-bottom: 1pt solid var(--field-line); border-radius: var(--radius-0);
+ background: var(--surface); color: inherit; font: inherit;
+ font-size: var(--font-base); line-height: var(--lh-base);
+ }
+ .field-control:focus, .field-textarea:focus { border-bottom-color: var(--accent); outline: none; }
+ .field-textarea { min-height: 6rem; resize: vertical; }
+ .field-hint { color: var(--muted); font-size: var(--font-sm); line-height: var(--lh-base); margin: var(--space-1) 0 0; }
+
+ .checkbox { display: flex; align-items: center; gap: var(--space-2);
+ font-size: var(--font-base); line-height: var(--lh-base); }
+ .checkbox input { width: 1rem; height: 1rem; flex: none; }
+ .checkbox + .checkbox,
+ .field + .checkbox { margin-block-start: var(--space-4); }
+
+ .status { display: inline; color: var(--muted); font-size: var(--font-base);
+ white-space: nowrap; }
+ .status-warn { color: var(--warn); }
+ .status-muted { color: var(--muted); }
+ .status-dot {
+ display: inline-block; width: .4375rem; height: .4375rem; border-radius: 50%;
+ background: currentColor; vertical-align: .125em; margin-inline-end: var(--space-2);
}
- .page-header-row {
- grid-template-columns: minmax(0, 1fr) auto;
+ .spinner { width: 1.25rem; height: 1.25rem; border-radius: 50%;
+ border: 2pt solid var(--line-strong); border-top-color: var(--accent);
+ animation: spin var(--dur-2) linear infinite; }
+ @keyframes spin { to { transform: rotate(1turn); } }
+
+ /* feedback text */
+ .alert { margin: 0 0 var(--space-4); color: var(--danger-text);
+ font-size: var(--font-base); line-height: var(--lh-base); }
+ .alert p { margin: 0 0 var(--space-2); }
+ .notice { margin: 0 0 var(--space-4); padding: var(--space-3) var(--space-4);
+ background: var(--line); color: var(--text);
+ font-size: var(--font-base); line-height: var(--lh-base); }
+ .note { margin: 0; color: var(--muted); font-size: var(--font-base); line-height: var(--lh-loose); }
+ .empty { margin: 0; color: var(--muted); font-size: var(--font-base); line-height: var(--lh-loose); }
+
+ /* text-styled action (anchor or button) */
+ .link {
+ padding: 0; border: 0; background: none;
+ color: var(--accent-text); font: inherit; font-size: var(--font-base);
+ text-decoration: none; cursor: pointer;
+ }
+ .link:hover { color: var(--accent-text-hover); text-decoration: underline; }
+
+ /* skeleton shimmer blocks */
+ .skeleton { height: var(--space-3); background: var(--skeleton); }
+ .skeleton + .skeleton { margin-block-start: var(--space-3); }
+ .skeleton-title { width: 8rem; }
+ .skeleton-short { width: 35%; }
+ .skeleton-medium { width: 62%; }
+
+ /* utilities (closed set) */
+ .u-mono { font-family: var(--font-mono); }
+ .u-muted { color: var(--muted); }
+ .u-full { width: 100%; }
+ .u-nowrap { white-space: nowrap; }
+ .u-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
+ .u-center { text-align: center; }
+ .u-stack { display: flex; flex-direction: column; gap: var(--stack-gap, var(--space-4)); }
+ .u-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--cluster-gap, var(--space-4)); }
+}
+
+/* ==========================================================================
+ components: the shared blocks. The table is the default model; cells hold
+ inline content or a block title pair, never flex or forced heights.
+ ========================================================================== */
+@layer components {
+ .table { width: 100%; font-size: var(--font-base); line-height: var(--lh-body); }
+
+ /* DEFAULT (mobile): stacked cards. */
+ .table, .table tbody, .table tr, .table th, .table td { display: block; }
+ .table thead { display: none; }
+ .table tbody tr { margin-block-end: var(--space-4); padding: var(--space-4);
+ background: var(--surface); box-shadow: var(--shadow); }
+ .table td { padding: var(--space-1) 0; text-align: left; }
+ .table td[data-label]::before {
+ content: attr(data-label); display: block; margin-block-end: var(--space-1);
+ color: var(--muted); font-size: var(--font-xs); font-weight: 500;
+ letter-spacing: .08em; text-transform: uppercase; }
+ .table td:last-child { padding-block-end: 0; }
+
+ /* Cell content -- the invariant the harness enforces: a cell holds inline
+ content (text, .status, .button-inline) or a block (.table-title over
+ .table-sub for a 2-line primary). No flex, no min-height inside a cell. */
+ .table-title { font-weight: 500; }
+ .table-sub { display: block; margin-block-start: var(--space-1);
+ color: var(--muted); font-size: var(--font-sm); font-family: var(--font-mono); }
+ .table-meta { color: var(--muted); }
+ .table-mono { font-family: var(--font-mono); line-height: 1em; overflow-wrap: anywhere; }
+
+ /* Cursor/interaction states apply at every size. */
+ .table tbody tr { cursor: default; }
+ .table-linkable tbody tr { cursor: pointer; }
+ .table-linkable tbody tr:hover { background: var(--line-strong); }
+
+ .table tbody tr:focus-visible {
+ outline: 2pt solid var(--accent);
+ outline-offset: -2pt;
}
- .modal-overlay {
- place-items: center;
- padding: 1rem;
+ /* GROW >= 40em: the real table. */
+ @media (min-width: 40em) {
+ .table { display: table; border-collapse: collapse; }
+ .table thead { display: table-header-group; }
+ .table tbody { display: table-row-group; }
+ .table tr { display: table-row; }
+ .table th,
+ .table td { display: table-cell; }
+ .table th,
+ .table td {
+ /* middle is the HTML default for table-cell: never restated, never fought. */
+ text-align: left;
+ padding: var(--cell-y) var(--cell-x);
+ border-bottom: 1pt solid var(--line);
+ }
+ .table thead th { color: var(--muted); font-size: var(--font-xs); font-weight: 500;
+ letter-spacing: .08em; text-transform: uppercase; }
+ .table td[data-label]::before { content: none; } /* labels are the <th> now */
+ /* Undo the stacked-mode card trim. The :last-child longhand (0-2-1)
+ outranks the padding shorthand above (0-1-1) regardless of order, so it
+ must be cancelled at equal-or-higher specificity in this layer. */
+ .table td:last-child { padding-block-end: var(--cell-y); }
+ .table tbody tr { margin-block-end: 0; padding: 0; background: transparent; box-shadow: none; }
+
+ /* Opt-in fixed columns -- ONLY when a screen needs stable gutters. */
+ .table-fixed { table-layout: fixed; }
}
- .modal {
- width: min(100%, 32rem);
- max-height: calc(100vh - 2rem);
- max-height: calc(100dvh - 2rem);
- border-top: 0;
+ /* toolbar: column by default, row at 40em+ */
+ .toolbar {
+ display: flex; flex-direction: column; gap: var(--space-4);
+ margin-block-end: var(--space-4); padding: var(--space-4);
+ background: var(--surface); box-shadow: var(--shadow);
}
+ .toolbar-search { flex: 1; min-width: 0; }
+ .toolbar-search input {
+ width: 100%; padding: var(--space-2) 0;
+ border: 0; border-bottom: 1pt solid var(--field-line); border-radius: var(--radius-0);
+ background: transparent; color: inherit; font: inherit;
+ font-size: var(--font-md); line-height: var(--lh-base); outline: none;
+ }
+ .toolbar-search input:focus { border-bottom-color: var(--accent); }
+ .toolbar-actions {
+ display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-4);
+ }
+ .toolbar-panel { padding: 0; background: transparent; box-shadow: none; }
- .modal-header {
- padding: 1.5rem 1.5rem 0;
+ @media (min-width: 40em) {
+ .toolbar { flex-direction: row; align-items: center; }
+ .toolbar-actions { margin-inline-start: auto; }
}
- .modal-body {
- padding: 1.5rem;
+ /* panel and card */
+ .panel {
+ min-width: 0; padding: var(--space-6);
+ background: var(--surface); box-shadow: var(--shadow);
}
+ .panel-wide { grid-column: 1 / -1; margin-block-start: var(--space-4); }
+ .panel h2 { margin: 0 0 var(--space-5); font-size: var(--font-lg);
+ font-weight: 500; line-height: var(--lh-snug); }
+ .card { padding: var(--space-6); background: var(--surface); box-shadow: var(--shadow); }
- .modal-actions {
- position: static;
- flex-wrap: nowrap;
- gap: 1rem;
- margin: 1.5rem 0 0;
- padding: 0;
- background: transparent;
- border-top: 0;
+ /* status page: full-height centered scaffold for auth and error views */
+ .status-page {
+ display: grid;
+ place-items: center;
+ min-height: 100vh;
+ min-height: 100svh;
+ padding: env(safe-area-inset-top) env(safe-area-inset-right)
+ calc(var(--space-4) + env(safe-area-inset-bottom)) env(safe-area-inset-left);
+ background: var(--canvas);
+ color: var(--text);
}
- .modal-actions > .button,
- .modal-actions > .button-secondary,
- .modal-actions > .button-danger {
- flex: 0 auto;
+ .status-panel {
+ width: min(calc(100% - var(--space-8)), 28rem);
+ padding: var(--space-8);
+ background: var(--surface);
+ box-shadow: var(--shadow);
}
-}
-@media (min-width: 60em) {
- .app {
- grid-template-columns: 15rem minmax(0, 1fr);
- grid-template-rows: minmax(0, 1fr);
+ .status-icon {
+ width: var(--space-8);
+ height: var(--space-8);
+ margin-block-end: var(--space-4);
}
- .sidebar {
- display: flex;
- min-height: calc(100vh - var(--topbar-height));
- min-height: calc(100svh - var(--topbar-height));
+ .status-actions {
+ display: grid;
+ gap: var(--space-4);
+ margin-block-start: var(--space-6);
}
- .mobile-nav-toggle,
- .mobile-nav {
- display: none;
+ @media (min-width: 35em) {
+ .status-actions {
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ }
}
- .topbar .user-menu {
- display: block;
+ .status-danger { color: var(--danger-text); }
+
+ /* grids: one column, --grid-cols columns once there is room */
+ .grid,
+ .field-grid {
+ display: grid;
+ grid-template-columns: minmax(0, 1fr);
+ gap: var(--space-4);
}
- .nav {
- flex: 1;
- overflow: visible;
- flex-direction: column;
- flex-wrap: nowrap;
- padding: 0.75rem 0;
- gap: 0;
+ .grid > *,
+ .field-grid > * {
+ margin-block-start: 0;
+ margin-block-end: 0;
}
- .nav-label {
- display: block;
- padding: 0.5rem 1.5rem;
+ @media (min-width: 40em) {
+ .grid,
+ .field-grid {
+ grid-template-columns: repeat(var(--grid-cols, 2), minmax(0, 1fr));
+ }
}
- .nav-item {
- min-width: 0;
- width: 100%;
- flex: none;
- padding-inline: 1.5rem;
- justify-content: flex-start;
- text-align: left;
- opacity: 1;
- transform: none;
- transition: none;
+ /* modal: bottom sheet by default, centered dialog at 40em+ */
+ .overlay {
+ position: fixed;
+ inset: 0;
+ z-index: 100;
+ display: grid;
+ place-items: end center;
+ padding: 0;
+ background: var(--overlay);
+ touch-action: manipulation;
}
- .nav-item span {
- position: static;
- width: auto;
- height: auto;
- margin: 0;
- overflow: visible;
- clip-path: none;
- display: inline;
- white-space: normal;
+ .modal {
+ width: 100%;
+ max-height: 100vh;
+ max-height: calc(100dvh - env(safe-area-inset-top));
+ overflow: auto;
+ overscroll-behavior: contain;
+ border-top: var(--space-1) solid var(--accent);
+ background: var(--surface);
+ color: var(--text);
+ box-shadow: var(--shadow);
}
- .grid {
- grid-template-columns: repeat(2, minmax(0, 1fr));
+ .modal-header {
+ display: flex;
+ align-items: flex-start;
+ justify-content: space-between;
+ gap: var(--space-4);
+ padding: var(--space-4) var(--space-4) 0;
}
-}
-@media (pointer: coarse) {
- .button,
- .button-secondary,
- .button-danger,
- .auth-button,
- .auth-link,
- .nav-item,
- .summary-row,
- .surface-row,
- .user-menu-item {
- min-height: 2.75rem;
- touch-action: manipulation;
+ .modal-header h2 {
+ margin: 0;
+ font-size: 1.25rem;
+ font-weight: 400;
+ line-height: var(--lh-tight);
}
- .mobile-nav-toggle,
- .user-menu summary,
.modal-close {
- min-width: 2.75rem;
- width: 2.75rem;
- height: 2.75rem;
- touch-action: manipulation;
+ display: grid;
+ place-items: center;
+ width: var(--space-8);
+ height: var(--space-8);
+ padding: 0;
+ border: 0;
+ border-radius: var(--radius-0);
+ background: transparent;
+ color: var(--muted);
+ cursor: pointer;
}
+ .modal-close:hover { color: var(--text); }
+ .modal-close svg { width: var(--space-5); height: var(--space-5); }
- .table-search input,
- .field-control,
- .field-textarea,
- .checkbox-row,
- .auth-choice {
- min-height: 2.75rem;
- padding-block: 0.5rem;
- touch-action: manipulation;
- }
+ .modal-body { padding: var(--space-4) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom)); }
+ .modal-note { margin: 0; color: var(--muted); font-size: var(--font-base); line-height: var(--lh-loose); }
- .user-menu summary:hover,
- .user-menu summary:active,
- .user-menu-item:hover,
- .user-menu-item:active {
- background: var(--menu-hover);
- color: #fff;
+ .modal-actions {
+ position: sticky;
+ bottom: 0;
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: flex-end;
+ gap: var(--space-2);
+ margin: var(--space-4) calc(var(--space-4) * -1) calc((var(--space-4) + env(safe-area-inset-bottom)) * -1);
+ padding: var(--space-4) var(--space-4) calc(var(--space-4) + env(safe-area-inset-bottom));
+ background: var(--surface);
+ border-top: 1pt solid var(--line);
+ }
+ .modal-actions > .button { flex: 1; justify-content: center; text-align: center; }
+
+ @media (min-width: 40em) {
+ .overlay { place-items: center; padding: var(--space-4); }
+ .modal {
+ width: min(100%, 32rem);
+ max-height: calc(100vh - var(--space-8));
+ max-height: calc(100dvh - var(--space-8));
+ border-top: 0;
+ }
+ .modal-header { padding: var(--space-6) var(--space-6) 0; }
+ .modal-body { padding: var(--space-6); }
+ .modal-actions {
+ position: static;
+ flex-wrap: nowrap;
+ gap: var(--space-4);
+ margin: var(--space-6) 0 0;
+ padding: 0;
+ background: transparent;
+ border-top: 0;
+ }
+ .modal-actions > .button { flex: 0 auto; }
}
-}
-@media (prefers-reduced-motion: reduce) {
- .spinner {
- animation: none;
+ /* misc shared blocks */
+ .breadcrumb {
+ display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2);
+ margin-block-end: var(--space-4); color: var(--muted);
+ font-size: var(--font-sm); line-height: var(--lh-snug);
}
+ .breadcrumb a { color: var(--accent-text); text-decoration: none; }
- .mobile-nav,
- .mobile-nav .nav-item,
- .mobile-nav-toggle-bars,
- .mobile-nav-toggle-bars::before,
- .mobile-nav-toggle-bars::after {
- transition: none;
+ .stack { display: grid; gap: var(--stack-gap, var(--space-4)); min-width: 0; }
+
+ .section-header {
+ display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
+ gap: var(--space-4); margin-block-end: var(--space-5);
}
+ .section-header h2 { margin: 0; }
- .mobile-nav,
- .mobile-nav .nav-item {
- transform: none;
+ .details { display: grid; gap: .875rem; margin: 0; }
+ .details > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
+ .details dt { color: var(--muted); font-size: var(--font-base); line-height: var(--lh-base); }
+ .details dd { margin: 0; overflow-wrap: anywhere; font-size: var(--font-base); line-height: var(--lh-base); }
+
+ @media (min-width: 40em) {
+ .details > div { grid-template-columns: 8.5rem minmax(0, 1fr); }
}
}
-@media (prefers-color-scheme: dark) {
- :root:not([data-theme]) {
- --canvas: #181818;
- --page: #000;
- --surface: #282828;
- --sidebar: #000;
- --sidebar-active: #333;
- --topbar: #000;
- --text: #e7e7e7;
- --muted: #a0a4a8;
- --accent-text: color-mix(in oklch, var(--accent), white 45%);
+/* ==========================================================================
+ themes: token overrides only.
+ ========================================================================== */
+@layer themes {
+ @media (prefers-color-scheme: dark) {
+ :root:not([data-theme]) {
+ --canvas: #181818;
+ --surface: #282828;
+ --text: #e7e7e7;
+ --muted: #a0a4a8;
+ --line: #ffffff0d;
+ --line-strong: #ffffff14;
+ --field-line: rgba(255,255,255,.42);
+ --accent-text: color-mix(in oklch, var(--accent), white 45%);
+ --accent-text-hover: color-mix(in oklch, var(--accent), white 58%);
+ --danger-text: #f28b82;
+ --warn: #e3b341;
+ --skeleton: #ffffff14;
+ --hex: url("./assets/hex-grid-dark.svg");
+ color-scheme: dark;
+ }
+ }
+
+ :root[data-theme="dark"] {
+ --canvas: #181818;
+ --surface: #282828;
+ --text: #e7e7e7;
+ --muted: #a0a4a8;
+ --line: #ffffff0d;
+ --line-strong: #ffffff14;
+ --field-line: rgba(255,255,255,.42);
+ --accent-text: color-mix(in oklch, var(--accent), white 45%);
--accent-text-hover: color-mix(in oklch, var(--accent), white 58%);
- --accent-text-active: color-mix(in oklch, var(--accent), white 35%);
- --row: #ffffff0d;
- --row-hover: #ffffff14;
- --skeleton: #ffffff14;
- --danger-text: #f28b82;
- --warn: #e3b341;
- --field-line: rgba(255, 255, 255, 0.42);
- --hex: url('./assets/hex-grid-dark.svg');
+ --danger-text: #f28b82;
+ --warn: #e3b341;
+ --skeleton: #ffffff14;
+ --hex: url("./assets/hex-grid-dark.svg");
color-scheme: dark;
}
-}
-:root[data-theme="light"] {
- color-scheme: light;
+ :root[data-theme="light"] {
+ color-scheme: light;
+ }
}
-:root[data-theme="dark"] {
- --canvas: #181818;
- --page: #000;
- --surface: #282828;
- --sidebar: #000;
- --sidebar-active: #333;
- --topbar: #000;
- --text: #e7e7e7;
- --muted: #a0a4a8;
- --accent-text: color-mix(in oklch, var(--accent), white 45%);
- --accent-text-hover: color-mix(in oklch, var(--accent), white 58%);
- --accent-text-active: color-mix(in oklch, var(--accent), white 35%);
- --row: #ffffff0d;
- --row-hover: #ffffff14;
- --skeleton: #ffffff14;
- --danger-text: #f28b82;
- --warn: #e3b341;
- --field-line: rgba(255, 255, 255, 0.42);
- --hex: url('./assets/hex-grid-dark.svg');
- color-scheme: dark;
-}
+/* Unlayered: beats every layer's display rules. The one allowed !important. */
+[hidden] { display: none !important; }
diff --git a/app/shared/style/select-menu.css b/app/shared/style/select-menu.css
@@ -1,150 +0,0 @@
-.select {
- min-width: 0;
- max-width: 100%;
- display: block;
-}
-
-.select-trigger {
- width: 100%;
- min-width: 0;
- max-width: 100%;
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 0.75rem;
- padding: 0.5rem 0.75rem;
- border: 0;
- border-bottom: 1pt solid var(--field-line);
- border-radius: 0;
- background: var(--surface);
- color: inherit;
- font: inherit;
- font-size: 0.875rem;
- line-height: 1.5;
- text-align: left;
- cursor: pointer;
-}
-
-.select-trigger:focus,
-.select-trigger:focus-visible,
-.select-trigger[aria-expanded="true"],
-.select-trigger[aria-expanded="true"]:focus-visible {
- outline: 0;
- border-bottom-color: var(--accent);
-}
-
-.select-trigger:disabled {
- color: var(--muted);
- cursor: default;
- opacity: 1;
-}
-
-.select-trigger svg {
- flex: none;
- width: 1.125rem;
- height: 1.125rem;
-}
-
-.select-value {
- min-width: 0;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-
-.select-list {
- position: fixed;
- top: 0;
- left: 0;
- z-index: 120;
- width: 10rem;
- max-width: calc(100vw - 1rem);
- max-height: min(18rem, 45vh);
- padding: 0.25rem 0;
- overflow-y: auto;
- overscroll-behavior: contain;
- background: var(--surface);
- box-shadow: var(--shadow);
- color: var(--text);
-}
-
-.select-list.is-measuring {
- visibility: hidden;
- top: 0;
- right: auto;
- bottom: auto;
- left: 0;
- width: auto;
- max-height: none;
-}
-
-.select-option {
- width: 100%;
- min-height: 2.25rem;
- display: flex;
- align-items: center;
- gap: 0;
- padding: 0.5rem 0.75rem;
- color: inherit;
- font-size: 0.875rem;
- line-height: 1.5;
- cursor: pointer;
-}
-
-.select-option-mark {
- width: 1.25rem;
- height: 1.25rem;
- flex: none;
- display: flex;
- align-items: center;
- justify-content: center;
- order: 2;
-}
-
-.select-option svg {
- width: 1.125rem;
- height: 1.125rem;
-}
-
-.select-option:not(.is-selected) .select-option-mark svg {
- visibility: hidden;
-}
-
-.select-option-label {
- min-width: 0;
- flex: 1;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-
-.select-option:hover {
- background: var(--row-hover);
-}
-
-.select-option.is-active {
- background: var(--row-hover);
-}
-
-.select-option.is-selected {
- color: var(--accent-text);
-}
-
-@media (pointer: coarse) {
- .select-trigger,
- .select-option {
- min-height: 2.75rem;
- padding-block: 0.5rem;
- touch-action: manipulation;
- }
-
- .select-trigger {
- font-size: 1rem;
- }
-}
-
-@media (min-width: 40em) {
- .select.select-auto {
- width: auto;
- }
-}
diff --git a/mockup/plain/account.html b/mockup/plain/account.html
@@ -4,186 +4,9 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Account mockup</title>
- <link rel="stylesheet" href="./global.css" />
- <style>
- .summary-list {
- display: grid;
- gap: 0.25rem;
- margin: 0;
- padding: 0;
- list-style: none;
- }
-
- .summary-row {
- display: grid;
- grid-template-columns: 1.5rem minmax(0, 1fr);
- align-items: center;
- gap: 1rem;
- min-height: 2.75rem;
- padding: 0.875rem 0.75rem;
- color: inherit;
- text-decoration: none;
- cursor: pointer;
- touch-action: manipulation;
- user-select: none;
- }
-
- .summary-row:hover,
- .summary-row:active {
- background: var(--row-hover);
- }
-
- .summary-row svg {
- width: 1.25rem;
- height: 1.25rem;
- }
-
- .summary-body {
- display: grid;
- gap: 0.125rem;
- min-width: 0;
- }
-
- .summary-title {
- font-size: 0.9375rem;
- font-weight: 500;
- line-height: 1.4;
- }
-
- .summary-meta {
- color: var(--muted);
- font-size: 0.8125rem;
- line-height: 1.4;
- }
-
- .summary-arrow {
- display: none;
- color: var(--muted);
- font-size: 1.125rem;
- line-height: 1;
- }
-
- .security-stack,
- .apps-stack {
- display: grid;
- gap: 1rem;
- max-width: 56rem;
- margin: 0 auto;
- }
-
- .surface-row {
- display: grid;
- grid-template-columns: 1.5rem minmax(0, 1fr);
- align-items: center;
- gap: 1rem;
- min-height: 2.75rem;
- padding: 1rem 0.75rem;
- background: var(--row);
- touch-action: manipulation;
- }
-
- .surface-row svg {
- width: 1.25rem;
- height: 1.25rem;
- }
-
- .surface-row strong {
- display: block;
- font-size: 0.9375rem;
- font-weight: 500;
- line-height: 1.4;
- }
-
- .surface-row span {
- color: var(--muted);
- font-size: 0.8125rem;
- line-height: 1.4;
- }
-
- .status {
- display: none;
- color: var(--muted);
- font-size: 0.8125rem;
- line-height: 1.4;
- }
-
- .danger-link {
- display: inline-flex;
- align-items: center;
- min-height: 2.75rem;
- padding: 0.5rem 0;
- border: 0;
- background: none;
- color: var(--danger-text, var(--danger));
- font: inherit;
- font-size: 0.875rem;
- cursor: pointer;
- touch-action: manipulation;
- }
-
- .danger-link:hover {
- filter: brightness(1.1);
- }
-
- .details + .note {
- margin-top: 1rem;
- }
-
- .note + .note {
- margin-top: 1rem;
- }
-
- .panel-heading {
- display: flex;
- align-items: center;
- gap: 0.75rem;
- margin-bottom: 1rem;
- }
-
- .panel-heading svg {
- flex: none;
- width: 1.25rem;
- height: 1.25rem;
- }
-
- .panel-heading h2 {
- margin: 0;
- }
-
- .skeleton {
- height: 0.75rem;
- background: var(--skeleton);
- }
-
- .skeleton + .skeleton {
- margin-top: 0.75rem;
- }
-
- .skeleton-title {
- width: 8rem;
- height: 1rem;
- }
-
- .skeleton-short {
- width: 35%;
- }
-
- .skeleton-medium {
- width: 62%;
- }
-
- @media (min-width: 40em) {
- .summary-row,
- .surface-row {
- grid-template-columns: 1.5rem minmax(0, 1fr) auto;
- }
-
- .summary-arrow,
- .status {
- display: inline;
- }
- }
- </style>
+ <link rel="stylesheet" href="../../app/shared/style/global.css" />
+ <link rel="stylesheet" href="../../app/shared/component/user-menu.css" />
+ <link rel="stylesheet" href="./mockups.css" />
</head>
<body>
<div class="mockup-controls" aria-label="Mockup state">
@@ -210,21 +33,21 @@
<button class="mobile-nav-toggle" type="button" id="mobile-nav-toggle" aria-controls="mobile-navigation" aria-expanded="false" aria-label="Open navigation">
<span class="mobile-nav-toggle-bars" aria-hidden="true"></span>
</button>
- <details class="user-menu" open>
- <summary aria-label="Account menu">
+ <details class="menu user-menu" open>
+ <summary class="menu-trigger" aria-label="Account menu">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="10" />
<circle cx="12" cy="10" r="3" />
<path d="M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662" />
</svg>
</summary>
- <div class="user-panel">
- <div class="user-summary">
- <span class="user-name">Demo User</span>
- <span class="user-meta">demo@example.com</span>
+ <div class="menu-panel">
+ <div class="menu-heading">
+ <span class="menu-heading-title">Demo User</span>
+ <span class="menu-heading-meta">demo@example.com</span>
</div>
- <div class="user-menu-list">
- <button class="user-menu-item" type="button" data-user-theme>
+ <div class="menu-list">
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -237,9 +60,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -284,12 +107,12 @@
</nav>
<div class="mobile-nav-divider" aria-hidden="true"></div>
<section class="mobile-nav-account" aria-label="Account">
- <div class="user-summary">
- <span class="user-name">Demo User</span>
- <span class="user-meta">demo@example.com</span>
+ <div class="menu-heading">
+ <span class="menu-heading-title">Demo User</span>
+ <span class="menu-heading-meta">demo@example.com</span>
</div>
- <div class="user-menu-list">
- <button class="user-menu-item" type="button" data-user-theme>
+ <div class="menu-list">
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -302,9 +125,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -404,36 +227,32 @@
<section class="panel panel-wide">
<h2>Manage</h2>
- <ul class="summary-list">
- <li>
- <a class="summary-row" href="#" data-go="security">
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
- <path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" />
- </svg>
- <span class="summary-body">
- <span class="summary-title">Security</span>
- <span class="summary-meta">Password, multi-factor authentication and sessions.</span>
- </span>
- <span class="summary-arrow" aria-hidden="true">›</span>
- </a>
- </li>
- <li>
- <a class="summary-row" href="#" data-go="apps">
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
- <rect x="3" y="3" width="7" height="7" />
- <rect x="14" y="3" width="7" height="7" />
- <rect x="3" y="14" width="7" height="7" />
- <path d="M14 17.5h7" />
- <path d="M17.5 14v7" />
- </svg>
- <span class="summary-body">
- <span class="summary-title">Apps</span>
- <span class="summary-meta">Applications with access to this account.</span>
- </span>
- <span class="summary-arrow" aria-hidden="true">›</span>
- </a>
- </li>
- </ul>
+ <div class="stack">
+ <a class="card summary-row" href="#" data-go="security">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
+ <path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" />
+ </svg>
+ <span class="summary-body">
+ <span class="summary-title">Security</span>
+ <span class="summary-meta">Password, multi-factor authentication and sessions.</span>
+ </span>
+ <span class="summary-arrow" aria-hidden="true">›</span>
+ </a>
+ <a class="card summary-row" href="#" data-go="apps">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
+ <rect x="3" y="3" width="7" height="7" />
+ <rect x="14" y="3" width="7" height="7" />
+ <rect x="3" y="14" width="7" height="7" />
+ <path d="M14 17.5h7" />
+ <path d="M17.5 14v7" />
+ </svg>
+ <span class="summary-body">
+ <span class="summary-title">Apps</span>
+ <span class="summary-meta">Applications with access to this account.</span>
+ </span>
+ <span class="summary-arrow" aria-hidden="true">›</span>
+ </a>
+ </div>
</section>
</section>
@@ -443,7 +262,7 @@
<p>Manage how you sign in and where this account is active.</p>
</div>
- <div class="security-stack">
+ <div class="stack reading-column">
<section class="panel">
<div class="panel-heading">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
@@ -506,10 +325,10 @@
<path d="M12 17v4" />
</svg>
<span>
- <strong>Current session</strong>
- <span>account · This device · Active</span>
+ <strong class="surface-title">Current session</strong>
+ <span class="surface-meta">account · This device · Active</span>
</span>
- <span class="status">Read-only</span>
+ <span class="status surface-state">Read-only</span>
</div>
<p class="note">Session revocation arrives in a later slice.</p>
</section>
@@ -522,7 +341,7 @@
<p>Applications with access to this account.</p>
</div>
- <div class="apps-stack">
+ <div class="stack reading-column">
<section class="panel">
<h2>Authorized apps</h2>
<p class="note">App permission management arrives in a later slice.</p>
@@ -606,34 +425,34 @@
<section class="panel panel-wide">
<h2>Access</h2>
- <dl class="details">
- <div>
- <dt>Consent</dt>
- <dd>Granted</dd>
- </div>
- <div>
- <dt>Session</dt>
- <dd>Active</dd>
- </div>
- </dl>
- <p class="note">
- Revoking access removes Acme Portal's consent. The app must ask
- again the next time it signs you in.
- </p>
- <p class="note">
- <button class="danger-link" type="button">Revoke access</button>
- </p>
+ <div class="stack">
+ <dl class="details">
+ <div>
+ <dt>Consent</dt>
+ <dd>Granted</dd>
+ </div>
+ <div>
+ <dt>Session</dt>
+ <dd>Active</dd>
+ </div>
+ </dl>
+ <p class="note">
+ Revoking access removes Acme Portal's consent. The app must ask
+ again the next time it signs you in.
+ </p>
+ <button class="button-inline button-danger" type="button">Revoke access</button>
+ </div>
</section>
<section class="panel panel-wide">
<h2>Full account management</h2>
- <p class="note">
- Manage your identity, security and app permissions on the Acme
- account host.
- </p>
- <p class="note">
- <a class="button" href="#">Open full account</a>
- </p>
+ <div class="stack">
+ <p class="note">
+ Manage your identity, security and app permissions on the Acme
+ account host.
+ </p>
+ <a class="button button-primary" href="#">Open full account</a>
+ </div>
</section>
</section>
</main>
diff --git a/mockup/plain/admin-client-detail.html b/mockup/plain/admin-client-detail.html
@@ -4,103 +4,9 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Admin client detail mockup</title>
- <link rel="stylesheet" href="./global.css" />
- <style>
- .host-name {
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
- font-size: 0.8125rem;
- overflow-wrap: anywhere;
- }
-
- .host-added {
- color: var(--muted);
- font-size: 0.8125rem;
- }
-
- .host-row-action {
- display: flex;
- align-items: center;
- }
-
- .action-button {
- display: inline-flex;
- align-items: center;
- min-height: 2rem;
- padding: 0.25rem 0.625rem;
- border: 0;
- border-radius: 0.25rem;
- background: transparent;
- color: var(--muted);
- font: inherit;
- font-size: 0.8125rem;
- font-weight: 500;
- line-height: 1.4;
- white-space: nowrap;
- cursor: pointer;
- }
-
- .action-button:hover {
- background: var(--row-hover);
- color: var(--text);
- }
-
- .action-button:first-child {
- margin-left: -0.625rem;
- }
-
- .action-button.is-danger {
- color: var(--danger-text);
- }
-
- .action-button.is-danger:hover {
- background: color-mix(in oklch, var(--danger) 12%, transparent);
- color: var(--danger-text);
- }
-
- .host-table td.host-action-column {
- padding-bottom: 0.75rem;
- }
-
- .empty {
- padding: 2rem;
- color: var(--muted);
- font-size: 0.875rem;
- }
-
- .empty p {
- margin: 0;
- }
-
- @media (max-width: 39.999em) {
- .table-actions {
- width: 100%;
- flex-direction: column;
- align-items: stretch;
- }
-
- .table-actions .button {
- width: 100%;
- }
- }
-
- @media (min-width: 40em) {
- .host-table {
- table-layout: fixed;
- }
-
- .host-table .host-added-column {
- width: 10rem;
- }
-
- .host-table .host-action-column {
- width: 9rem;
- }
-
- .host-row-action {
- justify-content: flex-start;
- }
- }
- </style>
+ <link rel="stylesheet" href="../../app/shared/style/global.css" />
+ <link rel="stylesheet" href="../../app/shared/component/user-menu.css" />
+ <link rel="stylesheet" href="./mockups.css" />
</head>
<body>
<header class="topbar">
@@ -114,28 +20,28 @@
<button class="mobile-nav-toggle" type="button" id="mobile-nav-toggle" aria-controls="mobile-navigation" aria-expanded="false" aria-label="Open navigation">
<span class="mobile-nav-toggle-bars" aria-hidden="true"></span>
</button>
- <details class="user-menu">
- <summary aria-label="Account menu">
+ <details class="menu user-menu">
+ <summary class="menu-trigger" aria-label="Account menu">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="10" />
<circle cx="12" cy="10" r="3" />
<path d="M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662" />
</svg>
</summary>
- <div class="user-panel">
- <div class="user-summary">
- <span class="user-name">System Admin</span>
- <span class="user-meta">admin@system.test</span>
+ <div class="menu-panel">
+ <div class="menu-heading">
+ <span class="menu-heading-title">System Admin</span>
+ <span class="menu-heading-meta">admin@system.test</span>
</div>
- <div class="user-menu-list">
- <a class="user-menu-item" href="#">
+ <div class="menu-list">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span>Account settings</span>
</a>
- <button class="user-menu-item" type="button" data-user-theme>
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -148,9 +54,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -220,19 +126,19 @@
</nav>
<div class="mobile-nav-divider" aria-hidden="true"></div>
<section class="mobile-nav-account" aria-label="Account">
- <div class="user-summary">
- <span class="user-name">System Admin</span>
- <span class="user-meta">admin@system.test</span>
+ <div class="menu-heading">
+ <span class="menu-heading-title">System Admin</span>
+ <span class="menu-heading-meta">admin@system.test</span>
</div>
- <div class="user-menu-list">
- <a class="user-menu-item" href="#">
+ <div class="menu-list">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span>Account settings</span>
</a>
- <button class="user-menu-item" type="button" data-user-theme>
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -245,9 +151,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -320,7 +226,7 @@
<main class="content">
<div class="page-header page-header-row">
<div>
- <div class="client-breadcrumb">
+ <div class="breadcrumb">
<a href="./admin-clients.html">Clients</a>
<span aria-hidden="true">/</span>
<span>Internal App</span>
@@ -328,10 +234,10 @@
<h1>Internal App</h1>
<p>internal-app</p>
</div>
- <button class="button" type="button">Save changes</button>
+ <button class="button button-primary" type="button">Save changes</button>
</div>
- <div class="client-stack">
+ <div class="stack">
<section class="panel">
<h2>Settings</h2>
<dl class="details">
@@ -365,8 +271,8 @@
<section class="panel">
<h2>Secret</h2>
<p class="note">No client secret is configured. Creating one switches this client to confidential authentication.</p>
- <div class="client-actions">
- <button class="button" type="button">Create secret</button>
+ <div class="action-row">
+ <button class="button button-primary" type="button">Create secret</button>
</div>
</section>
@@ -376,40 +282,34 @@
<div id="client-hosts-notice" class="notice" role="status" hidden></div>
- <div class="table-toolbar">
- <div class="table-search">
+ <div class="toolbar toolbar-panel">
+ <div class="toolbar-search">
<input id="client-hosts-search" type="search" aria-label="Search hosts" placeholder="Search hosts" />
</div>
- <div class="table-actions">
- <button id="client-hosts-add-button" class="button" type="button">Add host</button>
+ <div class="toolbar-actions">
+ <button id="client-hosts-add-button" class="button button-primary" type="button">Add host</button>
</div>
</div>
- <div class="data-table-wrap">
- <table class="data-table data-table-static host-table">
- <thead>
- <tr>
- <th class="data-table-primary host-name-column" scope="col">Hostname</th>
- <th class="host-added-column" scope="col">Added</th>
- <th class="host-action-column" scope="col">Actions</th>
- </tr>
- </thead>
- <tbody id="client-hosts-rows"></tbody>
- </table>
- <div id="client-hosts-search-empty" class="empty" hidden>
- <p>No hosts match this search.</p>
- </div>
- <div id="client-hosts-empty" class="empty" hidden>
- <p>No hosts are assigned to this client.</p>
- </div>
- </div>
+ <table class="table">
+ <thead>
+ <tr>
+ <th scope="col">Hostname</th>
+ <th scope="col">Added</th>
+ <th scope="col">Actions</th>
+ </tr>
+ </thead>
+ <tbody id="client-hosts-rows"></tbody>
+ </table>
+ <p id="client-hosts-search-empty" class="empty" hidden>No hosts match this search.</p>
+ <p id="client-hosts-empty" class="empty" hidden>No hosts are assigned to this client.</p>
</section>
<section class="panel danger-zone">
<h2>Danger zone</h2>
<p class="note">Deleting removes the client registration and related authorization state.</p>
- <div class="client-actions">
- <button class="button-danger" type="button" data-dialog-open="client-delete-dialog">Delete client</button>
+ <div class="action-row">
+ <button class="button button-danger" type="button" data-dialog-open="client-delete-dialog">Delete client</button>
</div>
</section>
</div>
@@ -417,7 +317,7 @@
</div>
</div>
- <div id="client-delete-dialog" class="modal-overlay" hidden>
+ <div id="client-delete-dialog" class="overlay" hidden>
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="client-delete-title">
<div class="modal-header">
<h2 id="client-delete-title">Delete client</h2>
@@ -433,14 +333,14 @@
Delete Internal App (internal-app) from acme? This cannot be undone.
</p>
<div class="modal-actions">
- <button class="button-secondary" type="button" data-dialog-close>Cancel</button>
- <button class="button-danger" type="button" data-dialog-close>Delete client</button>
+ <button class="button button-secondary" type="button" data-dialog-close>Cancel</button>
+ <button class="button button-danger" type="button" data-dialog-close>Delete client</button>
</div>
</div>
</div>
</div>
- <div id="client-hosts-create-dialog" class="modal-overlay" hidden>
+ <div id="client-hosts-create-dialog" class="overlay" hidden>
<form id="client-hosts-create-form" class="modal" role="dialog" aria-modal="true" aria-labelledby="client-hosts-create-title" novalidate>
<div class="modal-header">
<h2 id="client-hosts-create-title">Add host</h2>
@@ -454,21 +354,21 @@
<div class="modal-body">
<div id="client-hosts-create-alert" class="alert" role="alert" hidden></div>
- <label class="form-field" for="client-hosts-host-input">
+ <label class="field" for="client-hosts-host-input">
<span class="field-label">Hostname</span>
<input id="client-hosts-host-input" class="field-control" type="text" maxlength="253" placeholder="app.acme.test" autocomplete="off" spellcheck="false" />
</label>
<p class="modal-note">Lowercase hostname. Do not include a scheme, port, path or wildcard.</p>
<div class="modal-actions">
- <button class="button-secondary" type="button" data-dialog-close>Cancel</button>
- <button class="button" type="submit">Add host</button>
+ <button class="button button-secondary" type="button" data-dialog-close>Cancel</button>
+ <button class="button button-primary" type="submit">Add host</button>
</div>
</div>
</form>
</div>
- <div id="client-hosts-remove-dialog" class="modal-overlay" hidden>
+ <div id="client-hosts-remove-dialog" class="overlay" hidden>
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="client-hosts-remove-title">
<div class="modal-header">
<h2 id="client-hosts-remove-title">Remove host</h2>
@@ -481,14 +381,14 @@
</div>
<div class="modal-body">
<p id="client-hosts-remove-message" class="modal-note"></p>
- <label class="form-field" for="client-hosts-remove-confirm">
+ <label class="field" for="client-hosts-remove-confirm">
<span class="field-label">Confirm hostname</span>
<input id="client-hosts-remove-confirm" class="field-control" type="text" maxlength="253" autocomplete="off" spellcheck="false" />
</label>
<p class="modal-note">Type the hostname exactly to confirm.</p>
<div class="modal-actions">
- <button class="button-secondary" type="button" data-dialog-close>Cancel</button>
- <button id="client-hosts-remove-confirm-button" class="button-danger" type="button" disabled>Remove host</button>
+ <button class="button button-secondary" type="button" data-dialog-close>Cancel</button>
+ <button id="client-hosts-remove-confirm-button" class="button button-danger" type="button" disabled>Remove host</button>
</div>
</div>
</div>
@@ -542,7 +442,7 @@
});
function visibleDialogs() {
- return [...document.querySelectorAll('.modal-overlay:not([hidden])')];
+ return [...document.querySelectorAll('.overlay:not([hidden])')];
}
document.querySelectorAll('[data-dialog-open]').forEach((button) => {
@@ -556,11 +456,11 @@
document.querySelectorAll('[data-dialog-close]').forEach((button) => {
button.addEventListener('click', () => {
- button.closest('.modal-overlay').hidden = true;
+ button.closest('.overlay').hidden = true;
});
});
- document.querySelectorAll('.modal-overlay').forEach((overlay) => {
+ document.querySelectorAll('.overlay').forEach((overlay) => {
overlay.addEventListener('mousedown', (event) => {
if (event.target === overlay) overlay.hidden = true;
});
@@ -631,13 +531,11 @@
row.className = 'host-row';
row.dataset.search = entry.host.toLowerCase();
row.innerHTML =
- '<td class="data-table-primary host-name-column" data-label="Hostname">' +
- '<span class="host-name">' + escapeHtml(entry.host) + '</span>' +
- '</td>' +
- '<td class="host-added-column" data-label="Added"><span class="host-added">' + escapeHtml(entry.added) + '</span></td>' +
- '<td class="host-action-column" data-label="Actions"><div class="host-row-action">' +
- '<button class="action-button is-danger" type="button" data-remove-host="' + escapeHtml(entry.host) + '">Remove</button>' +
- '</div></td>';
+ '<td data-label="Hostname"><span class="table-mono">' + escapeHtml(entry.host) + '</span></td>' +
+ '<td data-label="Added"><span class="table-meta">' + escapeHtml(entry.added) + '</span></td>' +
+ '<td data-label="Actions">' +
+ '<button class="button-inline button-danger" type="button" data-remove-host="' + escapeHtml(entry.host) + '">Remove</button>' +
+ '</td>';
return row;
})
);
diff --git a/mockup/plain/admin-clients.html b/mockup/plain/admin-clients.html
@@ -4,8 +4,10 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Admin clients mockup</title>
- <link rel="stylesheet" href="./global.css" />
- <link rel="stylesheet" href="./select-menu.css" />
+ <link rel="stylesheet" href="../../app/shared/style/global.css" />
+ <link rel="stylesheet" href="../../app/shared/component/select-menu.css" />
+ <link rel="stylesheet" href="../../app/shared/component/user-menu.css" />
+ <link rel="stylesheet" href="./mockups.css" />
</head>
<body>
<header class="topbar">
@@ -19,28 +21,28 @@
<button class="mobile-nav-toggle" type="button" id="mobile-nav-toggle" aria-controls="mobile-navigation" aria-expanded="false" aria-label="Open navigation">
<span class="mobile-nav-toggle-bars" aria-hidden="true"></span>
</button>
- <details class="user-menu">
- <summary aria-label="Account menu">
+ <details class="menu user-menu">
+ <summary class="menu-trigger" aria-label="Account menu">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="10" />
<circle cx="12" cy="10" r="3" />
<path d="M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662" />
</svg>
</summary>
- <div class="user-panel">
- <div class="user-summary">
- <span class="user-name">System Admin</span>
- <span class="user-meta">admin@system.test</span>
+ <div class="menu-panel">
+ <div class="menu-heading">
+ <span class="menu-heading-title">System Admin</span>
+ <span class="menu-heading-meta">admin@system.test</span>
</div>
- <div class="user-menu-list">
- <a class="user-menu-item" href="#">
+ <div class="menu-list">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span>Account settings</span>
</a>
- <button class="user-menu-item" type="button" data-user-theme>
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -53,9 +55,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -125,19 +127,19 @@
</nav>
<div class="mobile-nav-divider" aria-hidden="true"></div>
<section class="mobile-nav-account" aria-label="Account">
- <div class="user-summary">
- <span class="user-name">System Admin</span>
- <span class="user-meta">admin@system.test</span>
+ <div class="menu-heading">
+ <span class="menu-heading-title">System Admin</span>
+ <span class="menu-heading-meta">admin@system.test</span>
</div>
- <div class="user-menu-list">
- <a class="user-menu-item" href="#">
+ <div class="menu-list">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span>Account settings</span>
</a>
- <button class="user-menu-item" type="button" data-user-theme>
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -150,9 +152,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -225,14 +227,14 @@
<main class="content">
<div class="page-header page-header-row">
<div>
- <div class="client-breadcrumb">
+ <div class="breadcrumb">
<span aria-current="page">Clients</span>
</div>
<h1>Clients</h1>
<p>OIDC clients registered in this realm.</p>
</div>
- <div class="realm-select">
- <span id="clients-realm-label">Realm</span>
+ <div class="field">
+ <span class="field-label" id="clients-realm-label">Realm</span>
<div class="select" data-select data-value="acme">
<button
class="select-trigger"
@@ -271,106 +273,102 @@
</div>
</div>
- <section class="table-panel" aria-labelledby="client-table-title">
+ <section class="card" aria-labelledby="client-table-title">
<h2 id="client-table-title" class="sr-only">Registered clients</h2>
- <div class="table-toolbar">
- <div class="table-search">
+ <div class="toolbar toolbar-panel">
+ <div class="toolbar-search">
<input id="client-search" type="search" aria-label="Search clients" placeholder="Search clients" />
</div>
- <div class="table-actions">
- <button class="button" type="button" data-dialog-open="client-create-dialog">New client</button>
+ <div class="toolbar-actions">
+ <button class="button button-primary" type="button" data-dialog-open="client-create-dialog">New client</button>
</div>
</div>
- <div class="data-table-wrap">
- <table class="data-table">
- <thead>
- <tr>
- <th class="table-icon-column" scope="col"><span class="sr-only">Icon</span></th>
- <th class="data-table-primary" scope="col">Application</th>
- <th scope="col">Access</th>
- </tr>
- </thead>
- <tbody id="client-rows">
- <tr data-row-href="./admin-client-detail.html" data-search="internal app internal-app internal">
- <td class="table-icon-column">
- <span class="table-icon" aria-hidden="true">
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
- <rect x="2" y="4" width="20" height="16" rx="2" />
- <path d="M10 4v4" />
- <path d="M2 8h20" />
- <path d="M6 4v4" />
- </svg>
- </span>
- </td>
- <td class="data-table-primary">
- <a href="./admin-client-detail.html">Internal App</a>
- <span class="data-table-sub">internal-app</span>
- </td>
- <td data-label="Access">Internal</td>
- </tr>
- <tr data-row-href="./admin-client-detail.html" data-search="members portal members-app members">
- <td class="table-icon-column">
- <span class="table-icon" aria-hidden="true">
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
- <path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" />
- <circle cx="9" cy="7" r="4" />
- <path d="M22 21v-2a4 4 0 0 0-3-3.87" />
- <path d="M16 3.13a4 4 0 0 1 0 7.75" />
- </svg>
- </span>
- </td>
- <td class="data-table-primary">
- <a href="./admin-client-detail.html">Members Portal</a>
- <span class="data-table-sub">members-app</span>
- </td>
- <td data-label="Access">Members</td>
- </tr>
- <tr data-row-href="./admin-client-detail.html" data-search="public site public-app public">
- <td class="table-icon-column">
- <span class="table-icon" aria-hidden="true">
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
- <circle cx="12" cy="12" r="10" />
- <path d="M12 2a15.3 15.3 0 0 1 0 20" />
- <path d="M12 2a15.3 15.3 0 0 0 0 20" />
- <path d="M2 12h20" />
- </svg>
- </span>
- </td>
- <td class="data-table-primary">
- <a href="./admin-client-detail.html">Public Site</a>
- <span class="data-table-sub">public-app</span>
- </td>
- <td data-label="Access">Public</td>
- </tr>
- <tr data-row-href="./admin-client-detail.html" data-search="secure service secure-app members disabled confidential">
- <td class="table-icon-column">
- <span class="table-icon" aria-hidden="true">
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
- <rect x="3" y="11" width="18" height="11" rx="2" />
- <path d="M7 11V7a5 5 0 0 1 10 0v4" />
- </svg>
- </span>
- </td>
- <td class="data-table-primary">
- <a href="./admin-client-detail.html">Secure Service</a>
- <span class="data-table-sub">secure-app</span>
- <span class="data-table-status">Disabled</span>
- </td>
- <td data-label="Access">Members</td>
- </tr>
- </tbody>
- </table>
- <div id="client-search-empty" class="empty" hidden>
- <p>No clients match this search.</p>
- </div>
- </div>
+ <table class="table table-linkable">
+ <thead>
+ <tr>
+ <th scope="col"><span class="sr-only">Icon</span></th>
+ <th scope="col">Application</th>
+ <th scope="col">Access</th>
+ </tr>
+ </thead>
+ <tbody id="client-rows">
+ <tr data-row-href="./admin-client-detail.html" data-search="internal app internal-app internal">
+ <td>
+ <span class="table-icon" aria-hidden="true">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
+ <rect x="2" y="4" width="20" height="16" rx="2" />
+ <path d="M10 4v4" />
+ <path d="M2 8h20" />
+ <path d="M6 4v4" />
+ </svg>
+ </span>
+ </td>
+ <td>
+ <span class="table-title"><a class="link" href="./admin-client-detail.html">Internal App</a></span>
+ <span class="table-sub">internal-app</span>
+ </td>
+ <td data-label="Access">Internal</td>
+ </tr>
+ <tr data-row-href="./admin-client-detail.html" data-search="members portal members-app members">
+ <td>
+ <span class="table-icon" aria-hidden="true">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
+ <path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" />
+ <circle cx="9" cy="7" r="4" />
+ <path d="M22 21v-2a4 4 0 0 0-3-3.87" />
+ <path d="M16 3.13a4 4 0 0 1 0 7.75" />
+ </svg>
+ </span>
+ </td>
+ <td>
+ <span class="table-title"><a class="link" href="./admin-client-detail.html">Members Portal</a></span>
+ <span class="table-sub">members-app</span>
+ </td>
+ <td data-label="Access">Members</td>
+ </tr>
+ <tr data-row-href="./admin-client-detail.html" data-search="public site public-app public">
+ <td>
+ <span class="table-icon" aria-hidden="true">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
+ <circle cx="12" cy="12" r="10" />
+ <path d="M12 2a15.3 15.3 0 0 1 0 20" />
+ <path d="M12 2a15.3 15.3 0 0 0 0 20" />
+ <path d="M2 12h20" />
+ </svg>
+ </span>
+ </td>
+ <td>
+ <span class="table-title"><a class="link" href="./admin-client-detail.html">Public Site</a></span>
+ <span class="table-sub">public-app</span>
+ </td>
+ <td data-label="Access">Public</td>
+ </tr>
+ <tr data-row-href="./admin-client-detail.html" data-search="secure service secure-app members disabled confidential">
+ <td>
+ <span class="table-icon" aria-hidden="true">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
+ <rect x="3" y="11" width="18" height="11" rx="2" />
+ <path d="M7 11V7a5 5 0 0 1 10 0v4" />
+ </svg>
+ </span>
+ </td>
+ <td>
+ <span class="table-title"><a class="link" href="./admin-client-detail.html">Secure Service</a></span>
+ <span class="table-sub">secure-app</span>
+ <span class="status-muted">Disabled</span>
+ </td>
+ <td data-label="Access">Members</td>
+ </tr>
+ </tbody>
+ </table>
+ <p id="client-search-empty" class="empty" hidden>No clients match this search.</p>
</section>
</main>
</div>
</div>
- <div id="client-create-dialog" class="modal-overlay" hidden>
+ <div id="client-create-dialog" class="overlay" hidden>
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="client-create-title">
<div class="modal-header">
<h2 id="client-create-title">Register a client</h2>
@@ -382,15 +380,15 @@
</button>
</div>
<div class="modal-body">
- <label class="form-field">
+ <label class="field">
<span class="field-label">Client ID</span>
<input class="field-control" type="text" placeholder="my-app" />
</label>
- <label class="form-field">
+ <label class="field">
<span class="field-label">Name</span>
<input class="field-control" type="text" placeholder="My App" />
</label>
- <div class="form-field">
+ <div class="field">
<span class="field-label" id="client-access-mode-label">Access mode</span>
<div class="select" data-select data-value="members">
<button
@@ -436,13 +434,13 @@
</div>
</div>
</div>
- <label class="form-field">
+ <label class="field">
<span class="field-label">Redirect URIs</span>
- <textarea class="field-control" rows="3" placeholder="https://app.example.test/callback"></textarea>
+ <textarea class="field-textarea" rows="3" placeholder="https://app.example.test/callback"></textarea>
</label>
<div class="modal-actions">
- <button class="button-secondary" type="button" data-dialog-close>Cancel</button>
- <button class="button" type="button" data-dialog-close>Create client</button>
+ <button class="button button-secondary" type="button" data-dialog-close>Cancel</button>
+ <button class="button button-primary" type="button" data-dialog-close>Create client</button>
</div>
</div>
</div>
@@ -496,7 +494,7 @@
});
function visibleDialogs() {
- return [...document.querySelectorAll('.modal-overlay:not([hidden])')];
+ return [...document.querySelectorAll('.overlay:not([hidden])')];
}
document.querySelectorAll('[data-dialog-open]').forEach((button) => {
@@ -510,11 +508,11 @@
document.querySelectorAll('[data-dialog-close]').forEach((button) => {
button.addEventListener('click', () => {
- button.closest('.modal-overlay').hidden = true;
+ button.closest('.overlay').hidden = true;
});
});
- document.querySelectorAll('.modal-overlay').forEach((overlay) => {
+ document.querySelectorAll('.overlay').forEach((overlay) => {
overlay.addEventListener('mousedown', (event) => {
if (event.target === overlay) overlay.hidden = true;
});
diff --git a/mockup/plain/admin-dashboard.html b/mockup/plain/admin-dashboard.html
@@ -4,42 +4,9 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Admin dashboard mockup</title>
- <link rel="stylesheet" href="./global.css" />
- <style>
- .stats {
- display: grid;
- grid-template-columns: minmax(0, 1fr);
- gap: 1rem;
- margin-bottom: 1rem;
- }
-
- .stat {
- padding: 1.25rem 1.5rem;
- background: var(--surface);
- box-shadow: var(--shadow);
- }
-
- .stat-label {
- display: block;
- color: var(--muted);
- font-size: 0.8125rem;
- line-height: 1.4;
- }
-
- .stat-value {
- display: block;
- margin-top: 0.5rem;
- font-size: 1.75rem;
- font-weight: 300;
- line-height: 1.2;
- }
-
- @media (min-width: 60em) {
- .stats {
- grid-template-columns: repeat(4, minmax(0, 1fr));
- }
- }
- </style>
+ <link rel="stylesheet" href="../../app/shared/style/global.css" />
+ <link rel="stylesheet" href="../../app/shared/component/user-menu.css" />
+ <link rel="stylesheet" href="./mockups.css" />
</head>
<body>
<header class="topbar">
@@ -53,28 +20,28 @@
<button class="mobile-nav-toggle" type="button" id="mobile-nav-toggle" aria-controls="mobile-navigation" aria-expanded="false" aria-label="Open navigation">
<span class="mobile-nav-toggle-bars" aria-hidden="true"></span>
</button>
- <details class="user-menu" open>
- <summary aria-label="Account menu">
+ <details class="menu user-menu" open>
+ <summary class="menu-trigger" aria-label="Account menu">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="10" />
<circle cx="12" cy="10" r="3" />
<path d="M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662" />
</svg>
</summary>
- <div class="user-panel">
- <div class="user-summary">
- <span class="user-name">System Admin</span>
- <span class="user-meta">admin@system.test</span>
+ <div class="menu-panel">
+ <div class="menu-heading">
+ <span class="menu-heading-title">System Admin</span>
+ <span class="menu-heading-meta">admin@system.test</span>
</div>
- <div class="user-menu-list">
- <a class="user-menu-item" href="#">
+ <div class="menu-list">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span>Account settings</span>
</a>
- <button class="user-menu-item" type="button" data-user-theme>
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -87,9 +54,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -159,19 +126,19 @@
</nav>
<div class="mobile-nav-divider" aria-hidden="true"></div>
<section class="mobile-nav-account" aria-label="Account">
- <div class="user-summary">
- <span class="user-name">System Admin</span>
- <span class="user-meta">admin@system.test</span>
+ <div class="menu-heading">
+ <span class="menu-heading-title">System Admin</span>
+ <span class="menu-heading-meta">admin@system.test</span>
</div>
- <div class="user-menu-list">
- <a class="user-menu-item" href="#">
+ <div class="menu-list">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span>Account settings</span>
</a>
- <button class="user-menu-item" type="button" data-user-theme>
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -184,9 +151,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -258,28 +225,28 @@
<div class="main">
<main class="content">
<div class="page-header">
- <div class="client-breadcrumb">
+ <div class="breadcrumb">
<span aria-current="page">Overview</span>
</div>
<h1>Overview</h1>
<p>Provider summary and administration.</p>
</div>
- <section class="stats" aria-label="Provider summary">
- <article class="stat">
- <span class="stat-label">Realms</span>
+ <section class="grid stats" aria-label="Provider summary">
+ <article class="card">
+ <span class="field-label">Realms</span>
<strong class="stat-value">2</strong>
</article>
- <article class="stat">
- <span class="stat-label">Users</span>
+ <article class="card">
+ <span class="field-label">Users</span>
<strong class="stat-value">6</strong>
</article>
- <article class="stat">
- <span class="stat-label">OIDC clients</span>
+ <article class="card">
+ <span class="field-label">OIDC clients</span>
<strong class="stat-value">6</strong>
</article>
- <article class="stat">
- <span class="stat-label">Active sessions</span>
+ <article class="card">
+ <span class="field-label">Active sessions</span>
<strong class="stat-value">3</strong>
</article>
</section>
diff --git a/mockup/plain/admin-realm-email-domains.html b/mockup/plain/admin-realm-email-domains.html
@@ -4,170 +4,10 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Admin realm email domains mockup</title>
- <link rel="stylesheet" href="./global.css" />
- <link rel="stylesheet" href="./select-menu.css" />
- <style>
- .domain-name {
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
- font-size: 0.8125rem;
- overflow-wrap: anywhere;
- }
-
- .domain-status {
- display: inline-flex;
- align-items: center;
- gap: 0.4rem;
- color: var(--muted);
- font-size: 0.8125rem;
- }
-
- .domain-status-dot {
- width: 0.4375rem;
- height: 0.4375rem;
- flex: none;
- border-radius: 50%;
- background: var(--muted);
- }
-
- .domain-status.is-pending {
- color: var(--warn);
- }
-
- .domain-status.is-pending .domain-status-dot {
- background: var(--warn);
- }
-
- .domain-added {
- color: var(--muted);
- font-size: 0.8125rem;
- }
-
- .domain-row-action {
- display: flex;
- align-items: center;
- flex-wrap: wrap;
- gap: 0.125rem;
- }
-
- .action-button {
- display: inline-flex;
- align-items: center;
- min-height: 2rem;
- padding: 0.25rem 0.625rem;
- border: 0;
- border-radius: 0.25rem;
- background: transparent;
- color: var(--muted);
- font: inherit;
- font-size: 0.8125rem;
- font-weight: 500;
- line-height: 1.4;
- white-space: nowrap;
- cursor: pointer;
- }
-
- .action-button:hover {
- background: var(--row-hover);
- color: var(--text);
- }
-
- .action-button:first-child {
- margin-left: -0.625rem;
- }
-
- .action-button.is-primary {
- color: var(--accent-text);
- }
-
- .action-button.is-primary:hover {
- background: color-mix(in oklch, var(--accent) 12%, transparent);
- color: var(--accent-text-hover);
- }
-
- .action-button.is-danger {
- color: var(--danger-text);
- }
-
- .action-button.is-danger:hover {
- background: color-mix(in oklch, var(--danger) 12%, transparent);
- color: var(--danger-text);
- }
-
- .verify-record-name,
- .verify-record-value {
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
- font-size: 0.8125rem;
- }
-
- .verify-copy-row {
- display: flex;
- justify-content: flex-end;
- margin-top: 0.5rem;
- }
-
- .empty {
- padding: 2rem;
- color: var(--muted);
- font-size: 0.875rem;
- }
-
- .empty p {
- margin: 0;
- }
-
- .state-preview {
- margin-top: 2rem;
- }
-
- .state-preview > h2 {
- margin-bottom: 0.75rem;
- }
-
- @media (max-width: 39.999em) {
- .mockup-controls {
- flex-direction: column;
- align-items: flex-start;
- width: min(18rem, calc(100vw - 2rem));
- }
-
- .mockup-separator {
- display: none;
- }
-
- .table-actions {
- width: 100%;
- flex-direction: column;
- align-items: stretch;
- }
-
- .table-actions .button {
- width: 100%;
- }
- }
-
- @media (min-width: 40em) {
- .domain-table {
- table-layout: fixed;
- }
-
- .domain-table .domain-status-column {
- width: 12rem;
- }
-
- .domain-table .domain-action-column {
- width: 14rem;
- }
-
- .domain-table td.domain-action-column {
- padding-bottom: 0.75rem;
- }
-
- .domain-row-action {
- flex-wrap: nowrap;
- justify-content: flex-start;
- }
- }
- </style>
+ <link rel="stylesheet" href="../../app/shared/style/global.css" />
+ <link rel="stylesheet" href="../../app/shared/component/select-menu.css" />
+ <link rel="stylesheet" href="../../app/shared/component/user-menu.css" />
+ <link rel="stylesheet" href="./mockups.css" />
</head>
<body>
<header class="topbar">
@@ -181,28 +21,28 @@
<button class="mobile-nav-toggle" type="button" id="mobile-nav-toggle" aria-controls="mobile-navigation" aria-expanded="false" aria-label="Open navigation">
<span class="mobile-nav-toggle-bars" aria-hidden="true"></span>
</button>
- <details class="user-menu">
- <summary aria-label="Account menu">
+ <details class="menu user-menu">
+ <summary class="menu-trigger" aria-label="Account menu">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="10" />
<circle cx="12" cy="10" r="3" />
<path d="M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662" />
</svg>
</summary>
- <div class="user-panel">
- <div class="user-summary">
- <span class="user-name">System Admin</span>
- <span class="user-meta">admin@system.test</span>
+ <div class="menu-panel">
+ <div class="menu-heading">
+ <span class="menu-heading-title">System Admin</span>
+ <span class="menu-heading-meta">admin@system.test</span>
</div>
- <div class="user-menu-list">
- <a class="user-menu-item" href="#">
+ <div class="menu-list">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1-1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span>Account settings</span>
</a>
- <button class="user-menu-item" type="button" data-user-theme>
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -215,9 +55,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -287,19 +127,19 @@
</nav>
<div class="mobile-nav-divider" aria-hidden="true"></div>
<section class="mobile-nav-account" aria-label="Account">
- <div class="user-summary">
- <span class="user-name">System Admin</span>
- <span class="user-meta">admin@system.test</span>
+ <div class="menu-heading">
+ <span class="menu-heading-title">System Admin</span>
+ <span class="menu-heading-meta">admin@system.test</span>
</div>
- <div class="user-menu-list">
- <a class="user-menu-item" href="#">
+ <div class="menu-list">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1-1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span>Account settings</span>
</a>
- <button class="user-menu-item" type="button" data-user-theme>
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -312,9 +152,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -387,7 +227,7 @@
<main class="content">
<div class="page-header page-header-row">
<div>
- <div class="client-breadcrumb">
+ <div class="breadcrumb">
<a id="domains-breadcrumb-root" href="./admin-realms.html"><span data-realm-breadcrumb-root>Realms</span></a>
<span>/</span>
<a id="domains-breadcrumb-realm" href="./admin-settings.html?realm=acme">Acme</a>
@@ -397,8 +237,8 @@
<h1>Email domains</h1>
<p>Domains used to assign new accounts to this realm.</p>
</div>
- <div class="realm-select">
- <span id="domains-realm-label">Realm</span>
+ <div class="field">
+ <span class="field-label" id="domains-realm-label">Realm</span>
<div class="select" id="domains-realm-select" data-select data-value="acme">
<button
class="select-trigger"
@@ -447,35 +287,29 @@
<div id="domains-notice" class="notice" role="status" hidden></div>
- <section class="table-panel" aria-labelledby="domains-table-title">
+ <section class="card" aria-labelledby="domains-table-title">
<h2 id="domains-table-title" class="sr-only">Realm email domains</h2>
- <div class="table-toolbar">
- <div class="table-search">
+ <div class="toolbar toolbar-panel">
+ <div class="toolbar-search">
<input id="domains-search" type="search" aria-label="Search email domains" placeholder="Search email domains" />
</div>
- <div class="table-actions">
- <button id="domains-add-button" class="button" type="button">Add email domain</button>
+ <div class="toolbar-actions">
+ <button id="domains-add-button" class="button button-primary" type="button">Add email domain</button>
</div>
</div>
- <div class="data-table-wrap">
- <table class="data-table data-table-static domain-table">
- <thead>
- <tr>
- <th class="data-table-primary domain-name-column" scope="col">Domain</th>
- <th class="domain-status-column" scope="col">Status</th>
- <th class="domain-action-column" scope="col">Actions</th>
- </tr>
- </thead>
- <tbody id="domains-rows"></tbody>
- </table>
- <div id="domains-search-empty" class="empty" hidden>
- <p>No email domains match this search.</p>
- </div>
- <div id="domains-realm-empty" class="empty" hidden>
- <p>No email domains are assigned to this realm.</p>
- </div>
- </div>
+ <table class="table">
+ <thead>
+ <tr>
+ <th scope="col">Domain</th>
+ <th scope="col">Status</th>
+ <th scope="col">Actions</th>
+ </tr>
+ </thead>
+ <tbody id="domains-rows"></tbody>
+ </table>
+ <p id="domains-search-empty" class="empty" hidden>No email domains match this search.</p>
+ <p id="domains-realm-empty" class="empty" hidden>No email domains are assigned to this realm.</p>
</section>
<section class="state-preview">
@@ -490,7 +324,7 @@
</div>
</div>
- <div id="domains-create-dialog" class="modal-overlay" hidden>
+ <div id="domains-create-dialog" class="overlay" hidden>
<form id="domains-create-form" class="modal" role="dialog" aria-modal="true" aria-labelledby="domains-create-title" novalidate>
<div class="modal-header">
<h2 id="domains-create-title">Add email domain</h2>
@@ -504,21 +338,21 @@
<div class="modal-body">
<div id="domains-create-alert" class="alert" role="alert" hidden></div>
- <label class="form-field" for="domains-domain-input">
+ <label class="field" for="domains-domain-input">
<span class="field-label">Email domain</span>
<input id="domains-domain-input" class="field-control" type="text" maxlength="253" placeholder="acme.test" autocomplete="off" spellcheck="false" />
</label>
<p class="modal-note">Enter the domain without @ or a protocol. New accounts matching this domain are assigned to the realm once the domain is verified.</p>
<div class="modal-actions">
- <button class="button-secondary" type="button" data-dialog-close>Cancel</button>
- <button class="button" type="submit">Add domain</button>
+ <button class="button button-secondary" type="button" data-dialog-close>Cancel</button>
+ <button class="button button-primary" type="submit">Add domain</button>
</div>
</div>
</form>
</div>
- <div id="domains-verify-dialog" class="modal-overlay" hidden>
+ <div id="domains-verify-dialog" class="overlay" hidden>
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="domains-verify-title">
<div class="modal-header">
<h2 id="domains-verify-title">Verify email domain</h2>
@@ -532,30 +366,28 @@
<div class="modal-body">
<p id="domains-verify-message" class="modal-note"></p>
- <div class="form-field">
+ <div class="field">
<span class="field-label" id="domains-verify-name-label">TXT record name</span>
- <input id="domains-verify-name" class="field-control verify-record-name" type="text" readonly aria-labelledby="domains-verify-name-label" />
+ <input id="domains-verify-name" class="field-control u-mono" type="text" readonly aria-labelledby="domains-verify-name-label" />
</div>
- <div class="form-field">
+ <div class="field">
<span class="field-label" id="domains-verify-value-label">TXT record value</span>
- <input id="domains-verify-value" class="field-control verify-record-value" type="text" readonly aria-labelledby="domains-verify-value-label" />
- <div class="verify-copy-row">
- <button id="domains-verify-copy" class="button-secondary" type="button">Copy value</button>
- </div>
+ <input id="domains-verify-value" class="field-control u-mono" type="text" readonly aria-labelledby="domains-verify-value-label" />
+ <button id="domains-verify-copy" class="button button-secondary verify-record-copy" type="button">Copy value</button>
</div>
<p class="modal-note">Automated DNS checking arrives in a later slice; mark the domain verified once the record is in place.</p>
<div class="modal-actions">
- <button class="button-secondary" type="button" data-dialog-close>Close</button>
- <button id="domains-verify-mark" class="button" type="button">Mark as verified</button>
+ <button class="button button-secondary" type="button" data-dialog-close>Close</button>
+ <button id="domains-verify-mark" class="button button-primary" type="button">Mark as verified</button>
</div>
</div>
</div>
</div>
- <div id="domains-remove-dialog" class="modal-overlay" hidden>
+ <div id="domains-remove-dialog" class="overlay" hidden>
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="domains-remove-title">
<div class="modal-header">
<h2 id="domains-remove-title">Remove email domain</h2>
@@ -568,14 +400,14 @@
</div>
<div class="modal-body">
<p id="domains-remove-message" class="modal-note"></p>
- <label class="form-field" for="domains-remove-confirm">
+ <label class="field" for="domains-remove-confirm">
<span class="field-label">Confirm domain</span>
<input id="domains-remove-confirm" class="field-control" type="text" maxlength="253" autocomplete="off" spellcheck="false" />
</label>
<p class="modal-note">Type the domain exactly to confirm.</p>
<div class="modal-actions">
- <button class="button-secondary" type="button" data-dialog-close>Cancel</button>
- <button id="domains-remove-confirm-button" class="button-danger" type="button" disabled>Remove domain</button>
+ <button class="button button-secondary" type="button" data-dialog-close>Cancel</button>
+ <button id="domains-remove-confirm-button" class="button button-danger" type="button" disabled>Remove domain</button>
</div>
</div>
</div>
@@ -639,11 +471,11 @@
document.querySelectorAll('[data-dialog-close]').forEach((button) => {
button.addEventListener('click', () => {
- button.closest('.modal-overlay').hidden = true;
+ button.closest('.overlay').hidden = true;
});
});
- document.querySelectorAll('.modal-overlay').forEach((overlay) => {
+ document.querySelectorAll('.overlay').forEach((overlay) => {
overlay.addEventListener('mousedown', (event) => {
if (event.target === overlay) overlay.hidden = true;
});
@@ -651,7 +483,7 @@
document.addEventListener('keydown', (event) => {
if (event.key === 'Escape') {
- document.querySelectorAll('.modal-overlay:not([hidden])').forEach((dialog) => {
+ document.querySelectorAll('.overlay:not([hidden])').forEach((dialog) => {
dialog.hidden = true;
});
}
@@ -741,23 +573,19 @@
const verifyButton =
entry.status === 'pending'
- ? `<button class="action-button is-primary" type="button" data-verify-domain="${escapeHtml(entry.domain)}">Verify</button>`
+ ? `<button class="button-inline" type="button" data-verify-domain="${escapeHtml(entry.domain)}">Verify</button>`
: '';
const isPending = entry.status === 'pending';
row.innerHTML = `
- <td class="data-table-primary domain-name-column" data-label="Domain">
- <span class="domain-name">${escapeHtml(entry.domain)}</span>
+ <td data-label="Domain"><span class="table-mono">${escapeHtml(entry.domain)}</span></td>
+ <td data-label="Status">
+ <span class="status${isPending ? ' status-warn' : ''}"><span class="status-dot" aria-hidden="true"></span>${statusText(entry.status)}</span>
</td>
- <td class="domain-status-column" data-label="Status">
- <span class="domain-status${isPending ? ' is-pending' : ''}"><span class="domain-status-dot" aria-hidden="true"></span>${statusText(entry.status)}</span>
- </td>
- <td class="domain-action-column" data-label="Actions">
- <div class="domain-row-action">
- ${verifyButton}
- <button class="action-button is-danger" type="button" data-remove-domain="${escapeHtml(entry.domain)}">Remove</button>
- </div>
+ <td data-label="Actions">
+ ${verifyButton}
+ <button class="button-inline button-danger" type="button" data-remove-domain="${escapeHtml(entry.domain)}">Remove</button>
</td>`;
return row;
}
@@ -854,10 +682,10 @@
currentRole.value = role;
const identity = identities[role];
- document.querySelectorAll('.user-name').forEach((element) => {
+ document.querySelectorAll('.menu-heading-title').forEach((element) => {
element.textContent = identity.name;
});
- document.querySelectorAll('.user-meta').forEach((element) => {
+ document.querySelectorAll('.menu-heading-meta').forEach((element) => {
element.textContent = identity.email;
});
diff --git a/mockup/plain/admin-realm-hosts.html b/mockup/plain/admin-realm-hosts.html
@@ -4,122 +4,10 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Admin realm hosts mockup</title>
- <link rel="stylesheet" href="./global.css" />
- <link rel="stylesheet" href="./select-menu.css" />
- <style>
- .host-name {
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
- font-size: 0.8125rem;
- overflow-wrap: anywhere;
- }
-
- .host-added {
- color: var(--muted);
- font-size: 0.8125rem;
- }
-
- .host-row-action {
- display: flex;
- align-items: center;
- }
-
- .action-button {
- display: inline-flex;
- align-items: center;
- min-height: 2rem;
- padding: 0.25rem 0.625rem;
- border: 0;
- border-radius: 0.25rem;
- background: transparent;
- color: var(--muted);
- font: inherit;
- font-size: 0.8125rem;
- font-weight: 500;
- line-height: 1.4;
- white-space: nowrap;
- cursor: pointer;
- }
-
- .action-button:hover {
- background: var(--row-hover);
- color: var(--text);
- }
-
- .action-button:first-child {
- margin-left: -0.625rem;
- }
-
- .action-button.is-danger {
- color: var(--danger-text);
- }
-
- .action-button.is-danger:hover {
- background: color-mix(in oklch, var(--danger) 12%, transparent);
- color: var(--danger-text);
- }
-
- .host-table td.host-action-column {
- padding-bottom: 0.75rem;
- }
-
- .empty {
- padding: 2rem;
- color: var(--muted);
- font-size: 0.875rem;
- }
-
- .empty p {
- margin: 0;
- }
-
- .state-preview {
- margin-top: 2rem;
- }
-
- .state-preview > h2 {
- margin-bottom: 0.75rem;
- }
-
- @media (max-width: 39.999em) {
- .mockup-controls {
- flex-direction: column;
- align-items: flex-start;
- width: min(18rem, calc(100vw - 2rem));
- }
-
- .mockup-separator {
- display: none;
- }
-
- .table-actions {
- width: 100%;
- flex-direction: column;
- align-items: stretch;
- }
-
- .table-actions .button {
- width: 100%;
- }
- }
-
- @media (min-width: 40em) {
- .host-table {
- table-layout: fixed;
- }
-
- .host-table .host-added-column {
- width: 10rem;
- }
-
- .host-table .host-action-column {
- width: 9rem;
- }
-
- .host-row-action {
- justify-content: flex-start;
- }
- }
- </style>
+ <link rel="stylesheet" href="../../app/shared/style/global.css" />
+ <link rel="stylesheet" href="../../app/shared/component/select-menu.css" />
+ <link rel="stylesheet" href="../../app/shared/component/user-menu.css" />
+ <link rel="stylesheet" href="./mockups.css" />
</head>
<body>
<header class="topbar">
@@ -133,28 +21,28 @@
<button class="mobile-nav-toggle" type="button" id="mobile-nav-toggle" aria-controls="mobile-navigation" aria-expanded="false" aria-label="Open navigation">
<span class="mobile-nav-toggle-bars" aria-hidden="true"></span>
</button>
- <details class="user-menu">
- <summary aria-label="Account menu">
+ <details class="menu user-menu">
+ <summary class="menu-trigger" aria-label="Account menu">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="10" />
<circle cx="12" cy="10" r="3" />
<path d="M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662" />
</svg>
</summary>
- <div class="user-panel">
- <div class="user-summary">
- <span class="user-name">System Admin</span>
- <span class="user-meta">admin@system.test</span>
+ <div class="menu-panel">
+ <div class="menu-heading">
+ <span class="menu-heading-title">System Admin</span>
+ <span class="menu-heading-meta">admin@system.test</span>
</div>
- <div class="user-menu-list">
- <a class="user-menu-item" href="#">
+ <div class="menu-list">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1-1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span>Account settings</span>
</a>
- <button class="user-menu-item" type="button" data-user-theme>
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -167,9 +55,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -239,19 +127,19 @@
</nav>
<div class="mobile-nav-divider" aria-hidden="true"></div>
<section class="mobile-nav-account" aria-label="Account">
- <div class="user-summary">
- <span class="user-name">System Admin</span>
- <span class="user-meta">admin@system.test</span>
+ <div class="menu-heading">
+ <span class="menu-heading-title">System Admin</span>
+ <span class="menu-heading-meta">admin@system.test</span>
</div>
- <div class="user-menu-list">
- <a class="user-menu-item" href="#">
+ <div class="menu-list">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1-1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span>Account settings</span>
</a>
- <button class="user-menu-item" type="button" data-user-theme>
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -264,9 +152,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -339,7 +227,7 @@
<main class="content">
<div class="page-header page-header-row">
<div>
- <div class="client-breadcrumb">
+ <div class="breadcrumb">
<a id="hosts-breadcrumb-root" href="./admin-realms.html"><span data-realm-breadcrumb-root>Realms</span></a>
<span>/</span>
<a id="hosts-breadcrumb-realm" href="./admin-settings.html?realm=acme">Acme</a>
@@ -349,8 +237,8 @@
<h1>Hosts</h1>
<p>Hostnames that resolve to this realm.</p>
</div>
- <div class="realm-select">
- <span id="hosts-realm-label">Realm</span>
+ <div class="field">
+ <span class="field-label" id="hosts-realm-label">Realm</span>
<div class="select" id="hosts-realm-select" data-select data-value="acme">
<button
class="select-trigger"
@@ -399,35 +287,29 @@
<div id="hosts-notice" class="notice" role="status" hidden></div>
- <section class="table-panel" aria-labelledby="hosts-table-title">
+ <section class="card" aria-labelledby="hosts-table-title">
<h2 id="hosts-table-title" class="sr-only">Realm hosts</h2>
- <div class="table-toolbar">
- <div class="table-search">
+ <div class="toolbar toolbar-panel">
+ <div class="toolbar-search">
<input id="hosts-search" type="search" aria-label="Search hosts" placeholder="Search hosts" />
</div>
- <div class="table-actions">
- <button id="hosts-add-button" class="button" type="button">Add host</button>
+ <div class="toolbar-actions">
+ <button id="hosts-add-button" class="button button-primary" type="button">Add host</button>
</div>
</div>
- <div class="data-table-wrap">
- <table class="data-table data-table-static host-table">
- <thead>
- <tr>
- <th class="data-table-primary host-name-column" scope="col">Hostname</th>
- <th class="host-added-column" scope="col">Added</th>
- <th class="host-action-column" scope="col">Actions</th>
- </tr>
- </thead>
- <tbody id="hosts-rows"></tbody>
- </table>
- <div id="hosts-search-empty" class="empty" hidden>
- <p>No hosts match this search.</p>
- </div>
- <div id="hosts-realm-empty" class="empty" hidden>
- <p>No hosts are assigned to this realm.</p>
- </div>
- </div>
+ <table class="table">
+ <thead>
+ <tr>
+ <th scope="col">Hostname</th>
+ <th scope="col">Added</th>
+ <th scope="col">Actions</th>
+ </tr>
+ </thead>
+ <tbody id="hosts-rows"></tbody>
+ </table>
+ <p id="hosts-search-empty" class="empty" hidden>No hosts match this search.</p>
+ <p id="hosts-realm-empty" class="empty" hidden>No hosts are assigned to this realm.</p>
</section>
<section class="state-preview">
@@ -442,7 +324,7 @@
</div>
</div>
- <div id="hosts-create-dialog" class="modal-overlay" hidden>
+ <div id="hosts-create-dialog" class="overlay" hidden>
<form id="hosts-create-form" class="modal" role="dialog" aria-modal="true" aria-labelledby="hosts-create-title" novalidate>
<div class="modal-header">
<h2 id="hosts-create-title">Add host</h2>
@@ -456,21 +338,21 @@
<div class="modal-body">
<div id="hosts-create-alert" class="alert" role="alert" hidden></div>
- <label class="form-field" for="hosts-host-input">
+ <label class="field" for="hosts-host-input">
<span class="field-label">Hostname</span>
<input id="hosts-host-input" class="field-control" type="text" maxlength="253" placeholder="login.acme.test" autocomplete="off" spellcheck="false" />
</label>
<p class="modal-note">Lowercase hostname. Do not include a scheme, port, path or wildcard.</p>
<div class="modal-actions">
- <button class="button-secondary" type="button" data-dialog-close>Cancel</button>
- <button class="button" type="submit">Add host</button>
+ <button class="button button-secondary" type="button" data-dialog-close>Cancel</button>
+ <button class="button button-primary" type="submit">Add host</button>
</div>
</div>
</form>
</div>
- <div id="hosts-remove-dialog" class="modal-overlay" hidden>
+ <div id="hosts-remove-dialog" class="overlay" hidden>
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="hosts-remove-title">
<div class="modal-header">
<h2 id="hosts-remove-title">Remove host</h2>
@@ -483,14 +365,14 @@
</div>
<div class="modal-body">
<p id="hosts-remove-message" class="modal-note"></p>
- <label class="form-field" for="hosts-remove-confirm">
+ <label class="field" for="hosts-remove-confirm">
<span class="field-label">Confirm hostname</span>
<input id="hosts-remove-confirm" class="field-control" type="text" maxlength="253" autocomplete="off" spellcheck="false" />
</label>
<p class="modal-note">Type the hostname exactly to confirm.</p>
<div class="modal-actions">
- <button class="button-secondary" type="button" data-dialog-close>Cancel</button>
- <button id="hosts-remove-confirm-button" class="button-danger" type="button" disabled>Remove host</button>
+ <button class="button button-secondary" type="button" data-dialog-close>Cancel</button>
+ <button id="hosts-remove-confirm-button" class="button button-danger" type="button" disabled>Remove host</button>
</div>
</div>
</div>
@@ -554,11 +436,11 @@
document.querySelectorAll('[data-dialog-close]').forEach((button) => {
button.addEventListener('click', () => {
- button.closest('.modal-overlay').hidden = true;
+ button.closest('.overlay').hidden = true;
});
});
- document.querySelectorAll('.modal-overlay').forEach((overlay) => {
+ document.querySelectorAll('.overlay').forEach((overlay) => {
overlay.addEventListener('mousedown', (event) => {
if (event.target === overlay) overlay.hidden = true;
});
@@ -566,7 +448,7 @@
document.addEventListener('keydown', (event) => {
if (event.key === 'Escape') {
- document.querySelectorAll('.modal-overlay:not([hidden])').forEach((dialog) => {
+ document.querySelectorAll('.overlay:not([hidden])').forEach((dialog) => {
dialog.hidden = true;
});
}
@@ -649,14 +531,10 @@
row.className = 'host-row';
row.dataset.search = entry.host.toLowerCase();
row.innerHTML = `
- <td class="data-table-primary host-name-column" data-label="Hostname">
- <span class="host-name">${escapeHtml(entry.host)}</span>
- </td>
- <td class="host-added-column" data-label="Added"><span class="host-added">${escapeHtml(entry.added)}</span></td>
- <td class="host-action-column" data-label="Actions">
- <div class="host-row-action">
- <button class="action-button is-danger" type="button" data-remove-host="${escapeHtml(entry.host)}">Remove</button>
- </div>
+ <td data-label="Hostname"><span class="table-mono">${escapeHtml(entry.host)}</span></td>
+ <td data-label="Added"><span class="table-meta">${escapeHtml(entry.added)}</span></td>
+ <td data-label="Actions">
+ <button class="button-inline button-danger" type="button" data-remove-host="${escapeHtml(entry.host)}">Remove</button>
</td>`;
return row;
}
@@ -753,10 +631,10 @@
currentRole.value = role;
const identity = identities[role];
- document.querySelectorAll('.user-name').forEach((element) => {
+ document.querySelectorAll('.menu-heading-title').forEach((element) => {
element.textContent = identity.name;
});
- document.querySelectorAll('.user-meta').forEach((element) => {
+ document.querySelectorAll('.menu-heading-meta').forEach((element) => {
element.textContent = identity.email;
});
diff --git a/mockup/plain/admin-realms.html b/mockup/plain/admin-realms.html
@@ -4,223 +4,9 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Admin realms mockup</title>
- <link rel="stylesheet" href="./global.css" />
- <style>
- .realm-meta {
- display: block;
- color: var(--muted);
- font-size: 0.8125rem;
- line-height: 1.4;
- }
-
- .realm-meta > span,
- .realm-meta > a {
- display: inline;
- margin-right: 0.75rem;
- }
-
- .realm-meta > span:last-child,
- .realm-meta > a:last-child {
- margin-right: 0;
- }
-
- .realm-count-link {
- color: var(--muted);
- text-decoration: none;
- }
-
- .realm-count-link:hover {
- color: var(--accent-text);
- text-decoration: underline;
- }
-
- .realm-slug,
- .realm-owner-meta {
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
- }
-
- .realm-owner-name {
- display: block;
- font-weight: 500;
- line-height: 1.4;
- }
-
- .realm-owner-meta {
- display: block;
- margin-top: 0.125rem;
- color: var(--muted);
- font-size: 0.8125rem;
- line-height: 1.4;
- overflow-wrap: normal;
- }
-
- .realm-table td.realm-action-column {
- padding-bottom: 0.75rem;
- }
-
- .realm-row-action {
- display: flex;
- align-items: center;
- }
-
- .action-button {
- display: inline-flex;
- align-items: center;
- min-height: 2rem;
- padding: 0.25rem 0.625rem;
- border: 0;
- border-radius: 0.25rem;
- background: transparent;
- color: var(--muted);
- font: inherit;
- font-size: 0.8125rem;
- font-weight: 500;
- line-height: 1.4;
- white-space: nowrap;
- cursor: pointer;
- }
-
- .action-button:hover {
- background: var(--row-hover);
- color: var(--text);
- }
-
- .action-button:first-child {
- margin-left: -0.625rem;
- }
-
- .action-button.is-danger {
- color: var(--danger-text);
- }
-
- .action-button.is-danger:hover {
- background: color-mix(in oklch, var(--danger) 12%, transparent);
- color: var(--danger-text);
- }
-
- .field-grid {
- display: grid;
- grid-template-columns: minmax(0, 1fr);
- gap: 1rem;
- margin-bottom: 1rem;
- }
-
- .branding-preview {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- gap: 0.75rem;
- margin-top: 0.25rem;
- }
-
- .branding-logo-preview,
- .branding-color-preview {
- width: 2rem;
- height: 2rem;
- overflow: hidden;
- background: var(--row);
- }
-
- .branding-logo-preview {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- color: var(--muted);
- }
-
- .branding-logo-preview img {
- width: 100%;
- height: 100%;
- object-fit: contain;
- }
-
- .branding-color-preview {
- border-radius: 0.25rem;
- background: var(--field-line);
- }
-
- .branding-logo-preview.is-empty,
- .branding-color-preview.is-empty {
- border-bottom: 1pt solid var(--field-line);
- }
-
- .state-preview {
- margin-top: 2rem;
- }
-
- .state-preview > h2 {
- margin-bottom: 0.75rem;
- }
-
- .empty {
- padding: 2rem;
- color: var(--muted);
- font-size: 0.875rem;
- }
-
- .empty p {
- margin: 0;
- }
-
- @media (max-width: 39.999em) {
- .mockup-controls {
- flex-direction: column;
- align-items: flex-start;
- width: min(18rem, calc(100vw - 2rem));
- }
-
- .mockup-separator {
- display: none;
- }
-
- .table-actions {
- width: 100%;
- flex-direction: column;
- align-items: stretch;
- }
-
- .table-actions .button {
- width: 100%;
- }
- }
-
- @media (min-width: 40em) {
- .field-grid {
- grid-template-columns: repeat(2, minmax(0, 1fr));
- }
-
- .realm-meta {
- display: flex;
- flex-wrap: wrap;
- gap: 0.25rem 0.75rem;
- }
-
- .realm-meta > span,
- .realm-meta > a {
- margin-right: 0;
- }
-
- .realm-table {
- table-layout: fixed;
- }
-
- .realm-table .table-icon-column {
- width: 4rem;
- }
-
- .realm-table .realm-owner-column {
- width: 13rem;
- }
-
- .realm-table .realm-action-column {
- width: 12rem;
- }
-
- .realm-row-action {
- justify-content: flex-start;
- }
- }
- </style>
+ <link rel="stylesheet" href="../../app/shared/style/global.css" />
+ <link rel="stylesheet" href="../../app/shared/component/user-menu.css" />
+ <link rel="stylesheet" href="./mockups.css" />
</head>
<body>
<header class="topbar">
@@ -234,28 +20,28 @@
<button class="mobile-nav-toggle" type="button" id="mobile-nav-toggle" aria-controls="mobile-navigation" aria-expanded="false" aria-label="Open navigation">
<span class="mobile-nav-toggle-bars" aria-hidden="true"></span>
</button>
- <details class="user-menu">
- <summary aria-label="Account menu">
+ <details class="menu user-menu">
+ <summary class="menu-trigger" aria-label="Account menu">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="10" />
<circle cx="12" cy="10" r="3" />
<path d="M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662" />
</svg>
</summary>
- <div class="user-panel">
- <div class="user-summary">
- <span class="user-name">System Admin</span>
- <span class="user-meta">admin@system.test</span>
+ <div class="menu-panel">
+ <div class="menu-heading">
+ <span class="menu-heading-title">System Admin</span>
+ <span class="menu-heading-meta">admin@system.test</span>
</div>
- <div class="user-menu-list">
- <a class="user-menu-item" href="#">
+ <div class="menu-list">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span>Account settings</span>
</a>
- <button class="user-menu-item" type="button" data-user-theme>
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -268,9 +54,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -340,19 +126,19 @@
</nav>
<div class="mobile-nav-divider" aria-hidden="true"></div>
<section class="mobile-nav-account" aria-label="Account">
- <div class="user-summary">
- <span class="user-name">System Admin</span>
- <span class="user-meta">admin@system.test</span>
+ <div class="menu-heading">
+ <span class="menu-heading-title">System Admin</span>
+ <span class="menu-heading-meta">admin@system.test</span>
</div>
- <div class="user-menu-list">
- <a class="user-menu-item" href="#">
+ <div class="menu-list">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span>Account settings</span>
</a>
- <button class="user-menu-item" type="button" data-user-theme>
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -365,9 +151,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -439,7 +225,7 @@
<div class="main">
<main class="content">
<div class="page-header">
- <div class="client-breadcrumb">
+ <div class="breadcrumb">
<span id="realm-breadcrumb-root" aria-current="page">Realms</span>
</div>
<h1 id="realm-page-title">Realms</h1>
@@ -448,28 +234,27 @@
<div id="realm-notice" class="notice" role="status" hidden></div>
- <section class="table-panel" aria-labelledby="realm-table-title">
+ <section class="card" aria-labelledby="realm-table-title">
<h2 id="realm-table-title" class="sr-only">Realm registry</h2>
- <div class="table-toolbar">
- <div class="table-search">
+ <div class="toolbar toolbar-panel">
+ <div class="toolbar-search">
<input id="realm-search" type="search" aria-label="Search realms" placeholder="Search realms" />
</div>
- <div class="table-actions">
- <button id="realm-register-button" class="button" type="button">Register realm</button>
+ <div class="toolbar-actions">
+ <button id="realm-register-button" class="button button-primary" type="button">Register realm</button>
</div>
</div>
- <div class="data-table-wrap">
- <table class="data-table realm-table">
- <thead>
- <tr>
- <th class="table-icon-column" scope="col"><span class="sr-only">Realm</span></th>
- <th class="data-table-primary realm-name-column" scope="col">Realm</th>
- <th class="realm-owner-column" scope="col">Owner</th>
- <th class="realm-action-column" scope="col">Actions</th>
- </tr>
- </thead>
- <tbody id="realm-rows">
+ <table class="table table-linkable">
+ <thead>
+ <tr>
+ <th scope="col"><span class="sr-only">Realm</span></th>
+ <th scope="col">Realm</th>
+ <th scope="col">Owner</th>
+ <th scope="col">Actions</th>
+ </tr>
+ </thead>
+ <tbody id="realm-rows">
<tr
class="realm-row"
tabindex="0"
@@ -478,7 +263,7 @@
data-delete-roles="system owner"
data-owners='{"system":{"name":"Acme IT","meta":"it@acme.test"},"owner":{"name":"Realm Owner","meta":"owner@acme.test"},"admin":{"name":"Acme IT","meta":"it@acme.test"}}'
>
- <td class="table-icon-column">
+ <td>
<span class="table-icon" aria-hidden="true">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" />
@@ -491,24 +276,22 @@
</svg>
</span>
</td>
- <td class="data-table-primary realm-name-column">
- <a class="realm-display" href="./admin-settings.html">Acme</a>
+ <td>
+ <span class="table-title"><a class="link realm-display" href="./admin-settings.html">Acme</a></span>
<span class="realm-meta">
- <span class="realm-slug">acme</span>
+ <span class="realm-slug table-mono">acme</span>
<span class="realm-count">6 members</span>
<a class="realm-count realm-count-link" data-count-kind="hosts" href="./admin-realm-hosts.html?realm=acme">2 hosts</a>
<a class="realm-count realm-count-link" data-count-kind="domains" href="./admin-realm-email-domains.html?realm=acme">3 domains</a>
<span class="realm-count">4 clients</span>
</span>
</td>
- <td class="realm-owner-column" data-label="Owner">
- <span class="realm-owner-name">Acme IT</span>
- <span class="realm-owner-meta">it@acme.test</span>
+ <td data-label="Owner">
+ <span class="realm-owner-name table-title">Acme IT</span>
+ <span class="realm-owner-meta table-sub">it@acme.test</span>
</td>
- <td class="realm-action-column" data-label="Actions">
- <div class="realm-row-action">
- <button class="action-button is-danger" type="button" data-delete-realm>Delete realm</button>
- </div>
+ <td data-label="Actions">
+ <button class="button-inline button-danger" type="button" data-delete-realm>Delete realm</button>
</td>
</tr>
<tr
@@ -519,7 +302,7 @@
data-delete-roles="system"
data-owners='{"system":{"name":"Globex IT","meta":"it@globex.test"},"admin":{"name":"Globex IT","meta":"it@globex.test"}}'
>
- <td class="table-icon-column">
+ <td>
<span class="table-icon" aria-hidden="true">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" />
@@ -532,24 +315,22 @@
</svg>
</span>
</td>
- <td class="data-table-primary realm-name-column">
- <a class="realm-display" href="./admin-settings.html">Globex</a>
+ <td>
+ <span class="table-title"><a class="link realm-display" href="./admin-settings.html">Globex</a></span>
<span class="realm-meta">
- <span class="realm-slug">globex</span>
+ <span class="realm-slug table-mono">globex</span>
<span class="realm-count">5 members</span>
<a class="realm-count realm-count-link" data-count-kind="hosts" href="./admin-realm-hosts.html?realm=globex">1 host</a>
<a class="realm-count realm-count-link" data-count-kind="domains" href="./admin-realm-email-domains.html?realm=globex">1 domain</a>
<span class="realm-count">2 clients</span>
</span>
</td>
- <td class="realm-owner-column" data-label="Owner">
- <span class="realm-owner-name">Globex IT</span>
- <span class="realm-owner-meta">it@globex.test</span>
+ <td data-label="Owner">
+ <span class="realm-owner-name table-title">Globex IT</span>
+ <span class="realm-owner-meta table-sub">it@globex.test</span>
</td>
- <td class="realm-action-column" data-label="Actions">
- <div class="realm-row-action">
- <button class="action-button is-danger" type="button" data-delete-realm>Delete realm</button>
- </div>
+ <td data-label="Actions">
+ <button class="button-inline button-danger" type="button" data-delete-realm>Delete realm</button>
</td>
</tr>
<tr
@@ -560,7 +341,7 @@
data-delete-roles="system"
data-owners='{"system":{"name":"Unassigned","meta":"No owner assigned"}}'
>
- <td class="table-icon-column">
+ <td>
<span class="table-icon" aria-hidden="true">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" />
@@ -573,24 +354,22 @@
</svg>
</span>
</td>
- <td class="data-table-primary realm-name-column">
- <a class="realm-display" href="./admin-settings.html">Northwind</a>
+ <td>
+ <span class="table-title"><a class="link realm-display" href="./admin-settings.html">Northwind</a></span>
<span class="realm-meta">
- <span class="realm-slug">northwind</span>
+ <span class="realm-slug table-mono">northwind</span>
<span class="realm-count">0 members</span>
<a class="realm-count realm-count-link" data-count-kind="hosts" href="./admin-realm-hosts.html?realm=northwind">0 hosts</a>
<a class="realm-count realm-count-link" data-count-kind="domains" href="./admin-realm-email-domains.html?realm=northwind">0 domains</a>
<span class="realm-count">0 clients</span>
</span>
</td>
- <td class="realm-owner-column" data-label="Owner">
- <span class="realm-owner-name">Unassigned</span>
- <span class="realm-owner-meta">No owner assigned</span>
+ <td data-label="Owner">
+ <span class="realm-owner-name table-title">Unassigned</span>
+ <span class="realm-owner-meta table-sub">No owner assigned</span>
</td>
- <td class="realm-action-column" data-label="Actions">
- <div class="realm-row-action">
- <button class="action-button is-danger" type="button" data-delete-realm>Delete realm</button>
- </div>
+ <td data-label="Actions">
+ <button class="button-inline button-danger" type="button" data-delete-realm>Delete realm</button>
</td>
</tr>
</tbody>
@@ -617,25 +396,23 @@
<section class="state-preview">
<h2>Empty state</h2>
- <div class="table-panel">
- <div class="table-toolbar">
- <div class="table-search">
+ <div class="card">
+ <div class="toolbar toolbar-panel">
+ <div class="toolbar-search">
<input type="search" aria-label="Search realms" placeholder="Search realms" disabled />
</div>
- <div class="table-actions">
- <button class="button" type="button">Register realm</button>
+ <div class="toolbar-actions">
+ <button class="button button-primary" type="button">Register realm</button>
</div>
</div>
- <div class="empty">
- <p>No realms are available for this account.</p>
- </div>
+ <p class="empty">No realms are available for this account.</p>
</div>
</section>
</main>
</div>
</div>
- <div id="realm-create-dialog" class="modal-overlay" hidden>
+ <div id="realm-create-dialog" class="overlay" hidden>
<form id="realm-create-form" class="modal" role="dialog" aria-modal="true" aria-labelledby="realm-create-title" novalidate>
<div class="modal-header">
<h2 id="realm-create-title">Register a realm</h2>
@@ -649,24 +426,24 @@
<div class="modal-body">
<div id="realm-create-alert" class="alert" role="alert" hidden></div>
- <label class="form-field" for="realm-display-name">
+ <label class="field" for="realm-display-name">
<span class="field-label">Display name</span>
<input id="realm-display-name" class="field-control" type="text" maxlength="100" placeholder="Acme Inc" />
</label>
- <label class="form-field" for="realm-slug-input">
+ <label class="field" for="realm-slug-input">
<span class="field-label">Realm ID</span>
<input id="realm-slug-input" class="field-control" type="text" maxlength="63" placeholder="acme" spellcheck="false" />
</label>
<p class="modal-note">Lowercase letters, numbers and hyphens. admin, account and global are reserved.</p>
- <div class="field-grid">
- <label class="form-field" for="realm-logo-url">
+ <div class="grid">
+ <label class="field" for="realm-logo-url">
<span class="field-label">Logo URL</span>
<input id="realm-logo-url" class="field-control" type="text" placeholder="https://app.example.test/logo.svg" maxlength="2048" />
</label>
- <label class="form-field" for="realm-primary-color">
+ <label class="field" for="realm-primary-color">
<span class="field-label">Primary color</span>
<input id="realm-primary-color" class="field-control" type="text" placeholder="#25a" maxlength="7" spellcheck="false" />
</label>
@@ -678,14 +455,14 @@
</div>
<div class="modal-actions">
- <button class="button-secondary" type="button" data-dialog-close>Cancel</button>
- <button class="button" type="submit">Create realm</button>
+ <button class="button button-secondary" type="button" data-dialog-close>Cancel</button>
+ <button class="button button-primary" type="submit">Create realm</button>
</div>
</div>
</form>
</div>
- <div id="realm-delete-dialog" class="modal-overlay" hidden>
+ <div id="realm-delete-dialog" class="overlay" hidden>
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="realm-delete-title">
<div class="modal-header">
<h2 id="realm-delete-title">Delete realm</h2>
@@ -698,14 +475,14 @@
</div>
<div class="modal-body">
<p id="realm-delete-message" class="modal-note"></p>
- <label class="form-field" for="realm-delete-confirm">
+ <label class="field" for="realm-delete-confirm">
<span class="field-label">Confirm realm ID</span>
<input id="realm-delete-confirm" class="field-control" type="text" maxlength="63" autocomplete="off" spellcheck="false" />
</label>
<p class="modal-note">Type the realm ID exactly to confirm.</p>
<div class="modal-actions">
- <button class="button-secondary" type="button" data-dialog-close>Cancel</button>
- <button id="realm-delete-confirm-button" class="button-danger" type="button" disabled>Delete realm</button>
+ <button class="button button-secondary" type="button" data-dialog-close>Cancel</button>
+ <button id="realm-delete-confirm-button" class="button button-danger" type="button" disabled>Delete realm</button>
</div>
</div>
</div>
@@ -768,11 +545,11 @@
document.querySelectorAll('[data-dialog-close]').forEach((button) => {
button.addEventListener('click', () => {
- button.closest('.modal-overlay').hidden = true;
+ button.closest('.overlay').hidden = true;
});
});
- document.querySelectorAll('.modal-overlay').forEach((overlay) => {
+ document.querySelectorAll('.overlay').forEach((overlay) => {
overlay.addEventListener('mousedown', (event) => {
if (event.target === overlay) overlay.hidden = true;
});
@@ -780,7 +557,7 @@
document.addEventListener('keydown', (event) => {
if (event.key === 'Escape') {
- document.querySelectorAll('.modal-overlay:not([hidden])').forEach((dialog) => {
+ document.querySelectorAll('.overlay:not([hidden])').forEach((dialog) => {
dialog.hidden = true;
});
}
@@ -900,10 +677,10 @@
currentRole.value = role;
const identity = identities[role];
- document.querySelectorAll('.user-name').forEach((element) => {
+ document.querySelectorAll('.menu-heading-title').forEach((element) => {
element.textContent = identity.name;
});
- document.querySelectorAll('.user-meta').forEach((element) => {
+ document.querySelectorAll('.menu-heading-meta').forEach((element) => {
element.textContent = identity.email;
});
@@ -1120,7 +897,7 @@
[currentRole.value]: { name: identity.name, meta: identity.email },
});
row.innerHTML = `
- <td class="table-icon-column">
+ <td>
<span class="table-icon" aria-hidden="true">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" />
@@ -1133,24 +910,22 @@
</svg>
</span>
</td>
- <td class="data-table-primary realm-name-column">
- <a class="realm-display" href="./admin-settings.html">${escapeHtml(displayName)}</a>
+ <td>
+ <span class="table-title"><a class="link realm-display" href="./admin-settings.html">${escapeHtml(displayName)}</a></span>
<span class="realm-meta">
- <span class="realm-slug">${escapeHtml(slug)}</span>
+ <span class="realm-slug table-mono">${escapeHtml(slug)}</span>
<span class="realm-count">0 members</span>
<a class="realm-count realm-count-link" data-count-kind="hosts" href="./admin-realm-hosts.html?realm=${escapeHtml(slug)}">0 hosts</a>
<a class="realm-count realm-count-link" data-count-kind="domains" href="./admin-realm-email-domains.html?realm=${escapeHtml(slug)}">0 domains</a>
<span class="realm-count">0 clients</span>
</span>
</td>
- <td class="realm-owner-column" data-label="Owner">
- <span class="realm-owner-name">${escapeHtml(identity.name)}</span>
- <span class="realm-owner-meta">${escapeHtml(identity.email)}</span>
+ <td data-label="Owner">
+ <span class="realm-owner-name table-title">${escapeHtml(identity.name)}</span>
+ <span class="realm-owner-meta table-sub">${escapeHtml(identity.email)}</span>
</td>
- <td class="realm-action-column" data-label="Actions">
- <div class="realm-row-action">
- <button class="action-button is-danger" type="button" data-delete-realm>Delete realm</button>
- </div>
+ <td data-label="Actions">
+ <button class="button-inline button-danger" type="button" data-delete-realm>Delete realm</button>
</td>`;
realmRows.prepend(row);
}
diff --git a/mockup/plain/admin-settings.html b/mockup/plain/admin-settings.html
@@ -4,129 +4,10 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Admin realm settings mockup</title>
- <link rel="stylesheet" href="./global.css" />
- <link rel="stylesheet" href="./select-menu.css" />
- <style>
- .settings-form {
- min-width: 0;
- display: grid;
- grid-template-columns: minmax(0, 1fr);
- width: 100%;
- max-width: 100%;
- gap: 1rem;
- margin-top: 1rem;
- }
-
- .settings-form .form-field {
- margin-bottom: 0;
- }
-
- .settings-form .checkbox-row {
- min-width: 0;
- }
-
- .settings-actions {
- display: flex;
- flex-wrap: wrap;
- justify-content: flex-start;
- gap: 0.5rem;
- margin-top: 1rem;
- }
-
- .settings-actions .button {
- max-width: 100%;
- }
-
- .settings-stack {
- min-width: 0;
- display: grid;
- grid-template-columns: minmax(0, 1fr);
- gap: 1rem;
- }
-
- .field-grid {
- display: grid;
- grid-template-columns: minmax(0, 1fr);
- gap: 1rem;
- }
-
- .branding-preview {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- gap: 0.75rem;
- margin-top: 0.25rem;
- }
-
- .branding-logo-preview,
- .branding-color-preview {
- width: 2rem;
- height: 2rem;
- overflow: hidden;
- background: var(--row);
- }
-
- .branding-logo-preview {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- color: var(--muted);
- }
-
- .branding-logo-preview svg {
- width: 1.25rem;
- height: 1.25rem;
- }
-
- .branding-logo-preview img {
- width: 100%;
- height: 100%;
- object-fit: contain;
- }
-
- .branding-color-preview {
- border-radius: 0.25rem;
- background: var(--field-line);
- }
-
- .branding-logo-preview.is-empty,
- .branding-color-preview.is-empty {
- border-bottom: 1pt solid var(--field-line);
- }
-
- .state-preview {
- margin-top: 2rem;
- }
-
- .state-preview > h2 {
- margin-bottom: 0.75rem;
- }
-
- .realm-access-links {
- display: flex;
- flex-wrap: wrap;
- gap: 0.75rem;
- margin-top: 1rem;
- }
-
- .realm-access-count {
- margin-left: 0.375rem;
- opacity: 0.7;
- }
-
- @media (max-width: 39.999em) {
- .realm-access-links .button-secondary {
- width: 100%;
- text-align: center;
- }
- }
-
- @media (min-width: 40em) {
- .field-grid {
- grid-template-columns: repeat(2, minmax(0, 1fr));
- }
- }
- </style>
+ <link rel="stylesheet" href="../../app/shared/style/global.css" />
+ <link rel="stylesheet" href="../../app/shared/component/select-menu.css" />
+ <link rel="stylesheet" href="../../app/shared/component/user-menu.css" />
+ <link rel="stylesheet" href="./mockups.css" />
</head>
<body>
<header class="topbar">
@@ -140,28 +21,28 @@
<button class="mobile-nav-toggle" type="button" id="mobile-nav-toggle" aria-controls="mobile-navigation" aria-expanded="false" aria-label="Open navigation">
<span class="mobile-nav-toggle-bars" aria-hidden="true"></span>
</button>
- <details class="user-menu">
- <summary aria-label="Account menu">
+ <details class="menu user-menu">
+ <summary class="menu-trigger" aria-label="Account menu">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="10" />
<circle cx="12" cy="10" r="3" />
<path d="M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662" />
</svg>
</summary>
- <div class="user-panel">
- <div class="user-summary">
- <span class="user-name">System Admin</span>
- <span class="user-meta">admin@system.test</span>
+ <div class="menu-panel">
+ <div class="menu-heading">
+ <span class="menu-heading-title">System Admin</span>
+ <span class="menu-heading-meta">admin@system.test</span>
</div>
- <div class="user-menu-list">
- <a class="user-menu-item" href="#">
+ <div class="menu-list">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span>Account settings</span>
</a>
- <button class="user-menu-item" type="button" data-user-theme>
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -174,9 +55,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -246,19 +127,19 @@
</nav>
<div class="mobile-nav-divider" aria-hidden="true"></div>
<section class="mobile-nav-account" aria-label="Account">
- <div class="user-summary">
- <span class="user-name">System Admin</span>
- <span class="user-meta">admin@system.test</span>
+ <div class="menu-heading">
+ <span class="menu-heading-title">System Admin</span>
+ <span class="menu-heading-meta">admin@system.test</span>
</div>
- <div class="user-menu-list">
- <a class="user-menu-item" href="#">
+ <div class="menu-list">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span>Account settings</span>
</a>
- <button class="user-menu-item" type="button" data-user-theme>
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -271,9 +152,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -346,7 +227,7 @@
<main class="content">
<div class="page-header page-header-row">
<div>
- <div class="client-breadcrumb">
+ <div class="breadcrumb">
<a id="realm-breadcrumb-link" href="./admin-realms.html"><span data-realm-breadcrumb-root>Realms</span></a>
<span id="realm-breadcrumb-root-text" hidden><span data-realm-breadcrumb-root>Realm</span></span>
<span id="realm-breadcrumb-separator">/</span>
@@ -355,8 +236,8 @@
<h1>Realm settings</h1>
<p>Realm name, branding, and login behavior.</p>
</div>
- <div class="realm-select">
- <span id="settings-realm-label">Realm</span>
+ <div class="field">
+ <span class="field-label" id="settings-realm-label">Realm</span>
<div class="select" data-select data-value="acme">
<button
class="select-trigger"
@@ -395,21 +276,21 @@
</div>
</div>
- <div class="settings-stack">
+ <div class="stack">
<section class="panel">
<h2>Realm details</h2>
<form class="settings-form">
- <div class="form-field">
+ <div class="field">
<span class="field-label">Realm ID</span>
<input class="field-control" value="acme" disabled />
</div>
- <div class="form-field">
+ <div class="field">
<span class="field-label">Display name</span>
<input class="field-control" value="Acme" maxlength="100" />
</div>
- <label class="checkbox-row">
+ <label class="checkbox">
<input type="checkbox" checked />
<span>Show "Keep me signed in" on login</span>
</label>
@@ -420,8 +301,8 @@
<h2>Realm branding</h2>
<p class="note">Shown on login and consent for clients in this realm.</p>
<div class="settings-form">
- <div class="field-grid">
- <div class="form-field">
+ <div class="grid">
+ <div class="field">
<span class="field-label">Logo URL</span>
<input
class="field-control"
@@ -432,7 +313,7 @@
/>
</div>
- <div class="form-field">
+ <div class="field">
<span class="field-label">Primary color</span>
<input class="field-control" value="#2255aa" placeholder="#25a" maxlength="7" spellcheck="false" />
</div>
@@ -447,18 +328,18 @@
<span class="branding-color-preview" style="background: #2255aa"></span>
</div>
- <div class="settings-actions">
- <button class="button" type="submit">Save changes</button>
+ <div class="action-row">
+ <button class="button button-primary" type="submit">Save changes</button>
</div>
</div>
</section>
- <section class="panel realm-access-panel">
+ <section class="panel">
<h2>Realm access</h2>
<p class="note">Configure the hostnames and email domains that route to this realm.</p>
- <div class="realm-access-links">
- <a id="settings-hosts-link" class="button-secondary" href="./admin-realm-hosts.html?realm=acme">Hosts <span class="realm-access-count">2</span></a>
- <a id="settings-domains-link" class="button-secondary" href="./admin-realm-email-domains.html?realm=acme">Email domains <span class="realm-access-count">3</span></a>
+ <div class="u-cluster">
+ <a id="settings-hosts-link" class="button button-secondary" href="./admin-realm-hosts.html?realm=acme">Hosts <span class="realm-access-count">2</span></a>
+ <a id="settings-domains-link" class="button button-secondary" href="./admin-realm-email-domains.html?realm=acme">Email domains <span class="realm-access-count">3</span></a>
</div>
</section>
</div>
@@ -475,21 +356,21 @@
<section class="state-preview">
<h2>Saved state</h2>
<div class="notice" role="status">Realm settings saved.</div>
- <div class="settings-stack">
+ <div class="stack">
<section class="panel">
<h2>Realm details</h2>
<form class="settings-form">
- <div class="form-field">
+ <div class="field">
<span class="field-label">Realm ID</span>
<input class="field-control" value="acme" disabled />
</div>
- <div class="form-field">
+ <div class="field">
<span class="field-label">Display name</span>
<input class="field-control" value="Acme Inc" maxlength="100" />
</div>
- <label class="checkbox-row">
+ <label class="checkbox">
<input type="checkbox" />
<span>Show "Keep me signed in" on login</span>
</label>
@@ -500,8 +381,8 @@
<h2>Realm branding</h2>
<p class="note">Shown on login and consent for clients in this realm.</p>
<div class="settings-form">
- <div class="field-grid">
- <div class="form-field">
+ <div class="grid">
+ <div class="field">
<span class="field-label">Logo URL</span>
<input
class="field-control"
@@ -512,7 +393,7 @@
/>
</div>
- <div class="form-field">
+ <div class="field">
<span class="field-label">Primary color</span>
<input class="field-control" value="#2255aa" placeholder="#25a" maxlength="7" spellcheck="false" />
</div>
@@ -527,8 +408,8 @@
<span class="branding-color-preview" style="background: #2255aa"></span>
</div>
- <div class="settings-actions">
- <button class="button" type="submit">Save changes</button>
+ <div class="action-row">
+ <button class="button button-primary" type="submit">Save changes</button>
</div>
</div>
</section>
@@ -538,21 +419,21 @@
<section class="state-preview">
<h2>Validation error</h2>
<div class="alert" role="alert">Display name is required.</div>
- <div class="settings-stack">
+ <div class="stack">
<section class="panel">
<h2>Realm details</h2>
<form class="settings-form">
- <div class="form-field">
+ <div class="field">
<span class="field-label">Realm ID</span>
<input class="field-control" value="acme" disabled />
</div>
- <div class="form-field">
+ <div class="field">
<span class="field-label">Display name</span>
<input class="field-control" value="" aria-invalid="true" maxlength="100" />
</div>
- <label class="checkbox-row">
+ <label class="checkbox">
<input type="checkbox" checked />
<span>Show "Keep me signed in" on login</span>
</label>
@@ -563,8 +444,8 @@
<h2>Realm branding</h2>
<p class="note">Shown on login and consent for clients in this realm.</p>
<div class="settings-form">
- <div class="field-grid">
- <div class="form-field">
+ <div class="grid">
+ <div class="field">
<span class="field-label">Logo URL</span>
<input
class="field-control"
@@ -576,7 +457,7 @@
/>
</div>
- <div class="form-field">
+ <div class="field">
<span class="field-label">Primary color</span>
<input class="field-control" value="#25a" placeholder="#25a" maxlength="7" spellcheck="false" />
</div>
@@ -587,8 +468,8 @@
<span class="branding-color-preview" style="background: #2255aa"></span>
</div>
- <div class="settings-actions">
- <button class="button" type="submit">Save changes</button>
+ <div class="action-row">
+ <button class="button button-primary" type="submit">Save changes</button>
</div>
</div>
</section>
@@ -610,20 +491,6 @@
<button class="mockup-button" type="button" data-role-target="admin" aria-pressed="false">Realm admin</button>
</div>
- <style>
- @media (max-width: 39.999em) {
- .mockup-controls {
- flex-direction: column;
- align-items: flex-start;
- width: min(18rem, calc(100vw - 2rem));
- }
-
- .mockup-separator {
- display: none;
- }
- }
- </style>
-
<script>
const root = document.documentElement;
const themeButtons = document.querySelectorAll('[data-theme-target]');
@@ -709,10 +576,10 @@
const label = count === 1 ? 'Realm' : 'Realms';
const identity = identities[role];
- document.querySelectorAll('.user-name').forEach((element) => {
+ document.querySelectorAll('.menu-heading-title').forEach((element) => {
element.textContent = identity.name;
});
- document.querySelectorAll('.user-meta').forEach((element) => {
+ document.querySelectorAll('.menu-heading-meta').forEach((element) => {
element.textContent = identity.email;
});
roleButtons.forEach((button) => {
diff --git a/mockup/plain/admin-system-settings.html b/mockup/plain/admin-system-settings.html
@@ -4,98 +4,9 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Admin system settings mockup</title>
- <link rel="stylesheet" href="./global.css" />
- <style>
- .settings-form {
- min-width: 0;
- display: grid;
- grid-template-columns: minmax(0, 1fr);
- width: 100%;
- max-width: 100%;
- gap: 1rem;
- margin-top: 1rem;
- }
-
- .settings-form .form-field {
- margin-bottom: 0;
- }
-
- .settings-actions {
- display: flex;
- flex-wrap: wrap;
- justify-content: flex-start;
- gap: 0.5rem;
- margin-top: 1rem;
- }
-
- .settings-actions .button {
- max-width: 100%;
- }
-
- .field-grid {
- display: grid;
- grid-template-columns: minmax(0, 1fr);
- gap: 1rem;
- }
-
- .branding-preview {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- gap: 0.75rem;
- margin-top: 0.25rem;
- }
-
- .branding-logo-preview,
- .branding-color-preview {
- width: 2rem;
- height: 2rem;
- overflow: hidden;
- background: var(--row);
- }
-
- .branding-logo-preview {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- color: var(--muted);
- }
-
- .branding-logo-preview svg {
- width: 1.25rem;
- height: 1.25rem;
- }
-
- .branding-logo-preview img {
- width: 100%;
- height: 100%;
- object-fit: contain;
- }
-
- .branding-color-preview {
- border-radius: 0.25rem;
- background: var(--field-line);
- }
-
- .branding-logo-preview.is-empty,
- .branding-color-preview.is-empty {
- border-bottom: 1pt solid var(--field-line);
- }
-
- .state-preview {
- margin-top: 2rem;
- }
-
- .state-preview > h2 {
- margin-bottom: 0.75rem;
- }
-
- @media (min-width: 40em) {
- .field-grid {
- grid-template-columns: repeat(2, minmax(0, 1fr));
- }
- }
- </style>
+ <link rel="stylesheet" href="../../app/shared/style/global.css" />
+ <link rel="stylesheet" href="../../app/shared/component/user-menu.css" />
+ <link rel="stylesheet" href="./mockups.css" />
</head>
<body>
<header class="topbar">
@@ -109,28 +20,28 @@
<button class="mobile-nav-toggle" type="button" id="mobile-nav-toggle" aria-controls="mobile-navigation" aria-expanded="false" aria-label="Open navigation">
<span class="mobile-nav-toggle-bars" aria-hidden="true"></span>
</button>
- <details class="user-menu">
- <summary aria-label="Account menu">
+ <details class="menu user-menu">
+ <summary class="menu-trigger" aria-label="Account menu">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="10" />
<circle cx="12" cy="10" r="3" />
<path d="M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662" />
</svg>
</summary>
- <div class="user-panel">
- <div class="user-summary">
- <span class="user-name">System Admin</span>
- <span class="user-meta">admin@system.test</span>
+ <div class="menu-panel">
+ <div class="menu-heading">
+ <span class="menu-heading-title">System Admin</span>
+ <span class="menu-heading-meta">admin@system.test</span>
</div>
- <div class="user-menu-list">
- <a class="user-menu-item" href="#">
+ <div class="menu-list">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span>Account settings</span>
</a>
- <button class="user-menu-item" type="button" data-user-theme>
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -143,9 +54,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -215,19 +126,19 @@
</nav>
<div class="mobile-nav-divider" aria-hidden="true"></div>
<section class="mobile-nav-account" aria-label="Account">
- <div class="user-summary">
- <span class="user-name">System Admin</span>
- <span class="user-meta">admin@system.test</span>
+ <div class="menu-heading">
+ <span class="menu-heading-title">System Admin</span>
+ <span class="menu-heading-meta">admin@system.test</span>
</div>
- <div class="user-menu-list">
- <a class="user-menu-item" href="#">
+ <div class="menu-list">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span>Account settings</span>
</a>
- <button class="user-menu-item" type="button" data-user-theme>
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -240,9 +151,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -314,7 +225,7 @@
<div class="main">
<main class="content">
<div class="page-header">
- <div class="client-breadcrumb">
+ <div class="breadcrumb">
<span aria-current="page">Settings</span>
</div>
<h1>System settings</h1>
@@ -325,8 +236,8 @@
<h2>System branding</h2>
<p class="note">Shown by default when realm or client branding does not provide a value.</p>
<div class="settings-form">
- <div class="field-grid">
- <div class="form-field">
+ <div class="grid">
+ <div class="field">
<span class="field-label">Logo URL</span>
<input
class="field-control"
@@ -337,7 +248,7 @@
/>
</div>
- <div class="form-field">
+ <div class="field">
<span class="field-label">Primary color</span>
<input class="field-control" value="#2255aa" placeholder="#25a" maxlength="7" spellcheck="false" />
</div>
@@ -352,8 +263,8 @@
<span class="branding-color-preview" style="background: #2255aa"></span>
</div>
- <div class="settings-actions">
- <button class="button" type="submit">Save changes</button>
+ <div class="action-row">
+ <button class="button button-primary" type="submit">Save changes</button>
</div>
</div>
</section>
@@ -378,8 +289,8 @@
<div class="panel">
<h2>System branding</h2>
<div class="settings-form">
- <div class="field-grid">
- <div class="form-field">
+ <div class="grid">
+ <div class="field">
<span class="field-label">Logo URL</span>
<input
class="field-control"
@@ -391,14 +302,14 @@
/>
</div>
- <div class="form-field">
+ <div class="field">
<span class="field-label">Primary color</span>
<input class="field-control" value="#25a" placeholder="#25a" maxlength="7" spellcheck="false" />
</div>
</div>
- <div class="settings-actions">
- <button class="button" type="submit">Save changes</button>
+ <div class="action-row">
+ <button class="button button-primary" type="submit">Save changes</button>
</div>
</div>
</div>
diff --git a/mockup/plain/admin-user-detail.html b/mockup/plain/admin-user-detail.html
@@ -4,8 +4,10 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Admin user detail mockup</title>
- <link rel="stylesheet" href="./global.css" />
- <link rel="stylesheet" href="./select-menu.css" />
+ <link rel="stylesheet" href="../../app/shared/style/global.css" />
+ <link rel="stylesheet" href="../../app/shared/component/select-menu.css" />
+ <link rel="stylesheet" href="../../app/shared/component/user-menu.css" />
+ <link rel="stylesheet" href="./mockups.css" />
</head>
<body>
<header class="topbar">
@@ -19,28 +21,28 @@
<button class="mobile-nav-toggle" type="button" id="mobile-nav-toggle" aria-controls="mobile-navigation" aria-expanded="false" aria-label="Open navigation">
<span class="mobile-nav-toggle-bars" aria-hidden="true"></span>
</button>
- <details class="user-menu">
- <summary aria-label="Account menu">
+ <details class="menu user-menu">
+ <summary class="menu-trigger" aria-label="Account menu">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="10" />
<circle cx="12" cy="10" r="3" />
<path d="M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662" />
</svg>
</summary>
- <div class="user-panel">
- <div class="user-summary">
- <span class="user-name">Acme IT</span>
- <span class="user-meta">it@acme.test</span>
+ <div class="menu-panel">
+ <div class="menu-heading">
+ <span class="menu-heading-title">Acme IT</span>
+ <span class="menu-heading-meta">it@acme.test</span>
</div>
- <div class="user-menu-list">
- <a class="user-menu-item" href="#">
+ <div class="menu-list">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span>Account settings</span>
</a>
- <button class="user-menu-item" type="button" data-user-theme>
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -53,9 +55,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -125,19 +127,19 @@
</nav>
<div class="mobile-nav-divider" aria-hidden="true"></div>
<section class="mobile-nav-account" aria-label="Account">
- <div class="user-summary">
- <span class="user-name">Acme IT</span>
- <span class="user-meta">it@acme.test</span>
+ <div class="menu-heading">
+ <span class="menu-heading-title">Acme IT</span>
+ <span class="menu-heading-meta">it@acme.test</span>
</div>
- <div class="user-menu-list">
- <a class="user-menu-item" href="#">
+ <div class="menu-list">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span>Account settings</span>
</a>
- <button class="user-menu-item" type="button" data-user-theme>
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -150,9 +152,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -225,7 +227,7 @@
<main class="content">
<div class="page-header page-header-row">
<div>
- <div class="client-breadcrumb">
+ <div class="breadcrumb">
<a href="./admin-users.html">Users</a>
<span aria-hidden="true">/</span>
<span>Alice</span>
@@ -233,8 +235,8 @@
<h1>Alice</h1>
<p>alice@acme.test</p>
</div>
- <div class="realm-select">
- <span id="user-realm-label">Realm</span>
+ <div class="field">
+ <span class="field-label" id="user-realm-label">Realm</span>
<div class="select" data-select data-value="acme">
<button
class="select-trigger"
@@ -273,7 +275,7 @@
</div>
</div>
- <div class="client-stack">
+ <div class="stack">
<section class="panel">
<h2>Account</h2>
<dl class="details">
@@ -313,12 +315,12 @@
</section>
<section class="panel">
- <div class="panel-header">
+ <div class="section-header">
<div>
<h2>Realm access</h2>
<p class="note">Manage membership and roles in Acme.</p>
</div>
- <button class="button-danger" type="button" data-dialog-open="member-suspend-dialog">
+ <button class="button button-danger" type="button" data-dialog-open="member-suspend-dialog">
Suspend member
</button>
</div>
@@ -333,126 +335,120 @@
</div>
</dl>
<fieldset class="role-field">
- <legend>Realm roles</legend>
+ <legend class="field-label">Realm roles</legend>
<div class="checkbox-list">
- <label class="checkbox-row">
+ <label class="checkbox">
<input type="checkbox" checked />
<span>Realm administrator</span>
</label>
</div>
</fieldset>
- <div class="modal-actions">
- <button class="button" type="button" data-dialog-open="role-save-dialog">
+ <div class="action-row">
+ <button class="button button-primary" type="button" data-dialog-open="role-save-dialog">
Save roles
</button>
</div>
</section>
<section class="panel">
- <div class="panel-header">
+ <div class="section-header">
<h2>Application consents</h2>
</div>
- <div class="data-table-wrap">
- <table class="data-table data-table-static">
- <thead>
- <tr>
- <th class="data-table-primary" scope="col">Application</th>
- <th scope="col">Scopes</th>
- <th scope="col">Granted</th>
- <th scope="col">Status</th>
- <th scope="col">Updated</th>
- <th scope="col">Action</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="data-table-primary">
- <strong>Internal App</strong>
- <span class="data-table-sub">internal-app</span>
- </td>
- <td data-label="Scopes">openid, profile, email</td>
- <td data-label="Granted">
- User consent
- <span class="data-table-sub">remembered</span>
- </td>
- <td data-label="Status">Active</td>
- <td data-label="Updated">2026-10-24 16:02</td>
- <td data-label="Action">
- <button class="button-secondary" type="button" data-dialog-open="consent-revoke-dialog">Revoke</button>
- </td>
- </tr>
- <tr>
- <td class="data-table-primary">
- <strong>Secure Service</strong>
- <span class="data-table-sub">secure-app</span>
- </td>
- <td data-label="Scopes">None</td>
- <td data-label="Granted">
- User consent
- <span class="data-table-sub">remembered</span>
- </td>
- <td data-label="Status">
- Revoked
- <span class="data-table-status">Revoked</span>
- </td>
- <td data-label="Updated">2026-10-25 09:18</td>
- <td data-label="Action">None</td>
- </tr>
- </tbody>
- </table>
- </div>
+ <table class="table">
+ <thead>
+ <tr>
+ <th scope="col">Application</th>
+ <th scope="col">Scopes</th>
+ <th scope="col">Granted</th>
+ <th scope="col">Status</th>
+ <th scope="col">Updated</th>
+ <th scope="col">Action</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <span class="table-title">Internal App</span>
+ <span class="table-sub">internal-app</span>
+ </td>
+ <td data-label="Scopes">openid, profile, email</td>
+ <td data-label="Granted">
+ User consent
+ <span class="table-sub">remembered</span>
+ </td>
+ <td data-label="Status">Active</td>
+ <td data-label="Updated">2026-10-24 16:02</td>
+ <td data-label="Action">
+ <button class="button-inline" type="button" data-dialog-open="consent-revoke-dialog">Revoke</button>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <span class="table-title">Secure Service</span>
+ <span class="table-sub">secure-app</span>
+ </td>
+ <td data-label="Scopes">None</td>
+ <td data-label="Granted">
+ User consent
+ <span class="table-sub">remembered</span>
+ </td>
+ <td data-label="Status">
+ Revoked
+ <span class="status-muted">Revoked</span>
+ </td>
+ <td data-label="Updated">2026-10-25 09:18</td>
+ <td data-label="Action">None</td>
+ </tr>
+ </tbody>
+ </table>
</section>
<section class="panel">
- <div class="panel-header">
+ <div class="section-header">
<div>
<h2>Application bans</h2>
<p class="note">Bans persist independently of consent.</p>
</div>
- <button class="button-danger" type="button" data-dialog-open="user-ban-dialog">Ban from app</button>
- </div>
- <div class="data-table-wrap">
- <table class="data-table data-table-static">
- <thead>
- <tr>
- <th class="data-table-primary" scope="col">Application</th>
- <th scope="col">Banned by</th>
- <th scope="col">Created</th>
- <th scope="col">Action</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="data-table-primary">
- <strong>All apps</strong>
- </td>
- <td data-label="Banned by">acme-it</td>
- <td data-label="Created">2026-10-25 09:18</td>
- <td data-label="Action">
- <button class="button-secondary" type="button" data-dialog-open="all-apps-unban-dialog">Unban</button>
- </td>
- </tr>
- <tr>
- <td class="data-table-primary">
- <strong>Internal App</strong>
- <span class="data-table-sub">internal-app</span>
- </td>
- <td data-label="Banned by">acme-it</td>
- <td data-label="Created">2026-10-25 09:20</td>
- <td data-label="Action">
- <button class="button-secondary" type="button" data-dialog-open="app-unban-dialog">Unban</button>
- </td>
- </tr>
- </tbody>
- </table>
+ <button class="button button-danger" type="button" data-dialog-open="user-ban-dialog">Ban from app</button>
</div>
+ <table class="table">
+ <thead>
+ <tr>
+ <th scope="col">Application</th>
+ <th scope="col">Banned by</th>
+ <th scope="col">Created</th>
+ <th scope="col">Action</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><span class="table-title">All apps</span></td>
+ <td data-label="Banned by">acme-it</td>
+ <td data-label="Created">2026-10-25 09:18</td>
+ <td data-label="Action">
+ <button class="button-inline" type="button" data-dialog-open="all-apps-unban-dialog">Unban</button>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <span class="table-title">Internal App</span>
+ <span class="table-sub">internal-app</span>
+ </td>
+ <td data-label="Banned by">acme-it</td>
+ <td data-label="Created">2026-10-25 09:20</td>
+ <td data-label="Action">
+ <button class="button-inline" type="button" data-dialog-open="app-unban-dialog">Unban</button>
+ </td>
+ </tr>
+ </tbody>
+ </table>
</section>
</div>
</main>
</div>
</div>
- <div id="user-ban-dialog" class="modal-overlay" hidden>
+ <div id="user-ban-dialog" class="overlay" hidden>
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="user-ban-title">
<div class="modal-header">
<h2 id="user-ban-title">Ban from app</h2>
@@ -464,7 +460,7 @@
</button>
</div>
<div class="modal-body">
- <div class="form-field">
+ <div class="field">
<span class="field-label" id="ban-application-label">Application</span>
<div class="select" data-select data-value="*">
<button
@@ -523,14 +519,14 @@
after later sign-in attempts.
</p>
<div class="modal-actions">
- <button class="button-secondary" type="button" data-dialog-close>Cancel</button>
- <button class="button-danger" type="button" data-dialog-close>Ban user</button>
+ <button class="button button-secondary" type="button" data-dialog-close>Cancel</button>
+ <button class="button button-danger" type="button" data-dialog-close>Ban user</button>
</div>
</div>
</div>
</div>
- <div id="consent-revoke-dialog" class="modal-overlay" hidden>
+ <div id="consent-revoke-dialog" class="overlay" hidden>
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="consent-revoke-title">
<div class="modal-header">
<h2 id="consent-revoke-title">Revoke consent</h2>
@@ -544,14 +540,14 @@
<div class="modal-body">
<p class="modal-note">Revoke Internal App for Alice? The app must request access again.</p>
<div class="modal-actions">
- <button class="button-secondary" type="button" data-dialog-close>Cancel</button>
- <button class="button" type="button" data-dialog-close>Revoke consent</button>
+ <button class="button button-secondary" type="button" data-dialog-close>Cancel</button>
+ <button class="button button-primary" type="button" data-dialog-close>Revoke consent</button>
</div>
</div>
</div>
</div>
- <div id="app-unban-dialog" class="modal-overlay" hidden>
+ <div id="app-unban-dialog" class="overlay" hidden>
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="app-unban-title">
<div class="modal-header">
<h2 id="app-unban-title">Remove app ban</h2>
@@ -565,14 +561,14 @@
<div class="modal-body">
<p class="modal-note">Remove the Internal App ban for Alice? Revoked consents are not restored automatically.</p>
<div class="modal-actions">
- <button class="button-secondary" type="button" data-dialog-close>Cancel</button>
- <button class="button-danger" type="button" data-dialog-close>Remove ban</button>
+ <button class="button button-secondary" type="button" data-dialog-close>Cancel</button>
+ <button class="button button-danger" type="button" data-dialog-close>Remove ban</button>
</div>
</div>
</div>
</div>
- <div id="all-apps-unban-dialog" class="modal-overlay" hidden>
+ <div id="all-apps-unban-dialog" class="overlay" hidden>
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="all-apps-unban-title">
<div class="modal-header">
<h2 id="all-apps-unban-title">Remove app ban</h2>
@@ -586,14 +582,14 @@
<div class="modal-body">
<p class="modal-note">Remove the All apps ban for Alice? Exact app bans remain in force.</p>
<div class="modal-actions">
- <button class="button-secondary" type="button" data-dialog-close>Cancel</button>
- <button class="button-danger" type="button" data-dialog-close>Remove ban</button>
+ <button class="button button-secondary" type="button" data-dialog-close>Cancel</button>
+ <button class="button button-danger" type="button" data-dialog-close>Remove ban</button>
</div>
</div>
</div>
</div>
- <div id="member-suspend-dialog" class="modal-overlay" hidden>
+ <div id="member-suspend-dialog" class="overlay" hidden>
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="member-suspend-title">
<div class="modal-header">
<h2 id="member-suspend-title">Suspend membership</h2>
@@ -610,14 +606,14 @@
Reactivating the membership does not restore those authorizations.
</p>
<div class="modal-actions">
- <button class="button-secondary" type="button" data-dialog-close>Cancel</button>
- <button class="button-danger" type="button" data-dialog-close>Suspend member</button>
+ <button class="button button-secondary" type="button" data-dialog-close>Cancel</button>
+ <button class="button button-danger" type="button" data-dialog-close>Suspend member</button>
</div>
</div>
</div>
</div>
- <div id="role-save-dialog" class="modal-overlay" hidden>
+ <div id="role-save-dialog" class="overlay" hidden>
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="role-save-title">
<div class="modal-header">
<h2 id="role-save-title">Update realm roles</h2>
@@ -634,8 +630,8 @@
from the realm database on each request.
</p>
<div class="modal-actions">
- <button class="button-secondary" type="button" data-dialog-close>Cancel</button>
- <button class="button" type="button" data-dialog-close>Save roles</button>
+ <button class="button button-secondary" type="button" data-dialog-close>Cancel</button>
+ <button class="button button-primary" type="button" data-dialog-close>Save roles</button>
</div>
</div>
</div>
@@ -689,7 +685,7 @@
});
function visibleDialogs() {
- return [...document.querySelectorAll('.modal-overlay:not([hidden])')];
+ return [...document.querySelectorAll('.overlay:not([hidden])')];
}
document.querySelectorAll('[data-dialog-open]').forEach((button) => {
@@ -703,11 +699,11 @@
document.querySelectorAll('[data-dialog-close]').forEach((button) => {
button.addEventListener('click', () => {
- button.closest('.modal-overlay').hidden = true;
+ button.closest('.overlay').hidden = true;
});
});
- document.querySelectorAll('.modal-overlay').forEach((overlay) => {
+ document.querySelectorAll('.overlay').forEach((overlay) => {
overlay.addEventListener('mousedown', (event) => {
if (event.target === overlay) overlay.hidden = true;
});
diff --git a/mockup/plain/admin-user-global-detail.html b/mockup/plain/admin-user-global-detail.html
@@ -4,7 +4,9 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Admin global user detail mockup</title>
- <link rel="stylesheet" href="./global.css" />
+ <link rel="stylesheet" href="../../app/shared/style/global.css" />
+ <link rel="stylesheet" href="../../app/shared/component/user-menu.css" />
+ <link rel="stylesheet" href="./mockups.css" />
</head>
<body>
<header class="topbar">
@@ -18,28 +20,28 @@
<button class="mobile-nav-toggle" type="button" id="mobile-nav-toggle" aria-controls="mobile-navigation" aria-expanded="false" aria-label="Open navigation">
<span class="mobile-nav-toggle-bars" aria-hidden="true"></span>
</button>
- <details class="user-menu">
- <summary aria-label="Account menu">
+ <details class="menu user-menu">
+ <summary class="menu-trigger" aria-label="Account menu">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="10" />
<circle cx="12" cy="10" r="3" />
<path d="M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662" />
</svg>
</summary>
- <div class="user-panel">
- <div class="user-summary">
- <span class="user-name">System Admin</span>
- <span class="user-meta">admin@system.test</span>
+ <div class="menu-panel">
+ <div class="menu-heading">
+ <span class="menu-heading-title">System Admin</span>
+ <span class="menu-heading-meta">admin@system.test</span>
</div>
- <div class="user-menu-list">
- <a class="user-menu-item" href="#">
+ <div class="menu-list">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span>Account settings</span>
</a>
- <button class="user-menu-item" type="button" data-user-theme>
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -52,9 +54,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -124,19 +126,19 @@
</nav>
<div class="mobile-nav-divider" aria-hidden="true"></div>
<section class="mobile-nav-account" aria-label="Account">
- <div class="user-summary">
- <span class="user-name">System Admin</span>
- <span class="user-meta">admin@system.test</span>
+ <div class="menu-heading">
+ <span class="menu-heading-title">System Admin</span>
+ <span class="menu-heading-meta">admin@system.test</span>
</div>
- <div class="user-menu-list">
- <a class="user-menu-item" href="#">
+ <div class="menu-list">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span>Account settings</span>
</a>
- <button class="user-menu-item" type="button" data-user-theme>
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -149,9 +151,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -224,7 +226,7 @@
<main class="content">
<div class="page-header page-header-row">
<div>
- <div class="client-breadcrumb">
+ <div class="breadcrumb">
<a href="./admin-users.html">Users</a>
<span aria-hidden="true">/</span>
<span>Alice</span>
@@ -232,12 +234,12 @@
<h1>Alice</h1>
<p>alice@acme.test</p>
</div>
- <a class="button-secondary" href="./admin-users.html">All realms</a>
+ <a class="button button-secondary" href="./admin-users.html">All realms</a>
</div>
- <div class="client-stack">
+ <div class="stack">
<section class="panel">
- <div class="panel-header">
+ <div class="section-header">
<h2>Account</h2>
</div>
<dl class="details">
@@ -277,51 +279,49 @@
</section>
<section class="panel">
- <div class="panel-header">
+ <div class="section-header">
<div>
<h2>Realm memberships</h2>
<p class="note">App access is managed in the realm where the user is a member.</p>
</div>
</div>
- <div class="data-table-wrap">
- <table class="data-table data-table-static">
- <thead>
- <tr>
- <th class="data-table-primary" scope="col">Realm</th>
- <th scope="col">Relationship</th>
- <th scope="col">Membership</th>
- <th scope="col">Roles</th>
- <th scope="col">Action</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="data-table-primary">
- <strong>Acme</strong>
- <span class="data-table-sub">acme</span>
- </td>
- <td data-label="Relationship">Home</td>
- <td data-label="Membership">active</td>
- <td data-label="Roles">None</td>
- <td data-label="Action">
- <a class="button-secondary" href="./admin-user-detail.html">Manage access</a>
- </td>
- </tr>
- <tr>
- <td class="data-table-primary">
- <strong>Globex</strong>
- <span class="data-table-sub">globex</span>
- </td>
- <td data-label="Relationship">Guest</td>
- <td data-label="Membership">active</td>
- <td data-label="Roles">None</td>
- <td data-label="Action">
- <a class="button-secondary" href="./admin-user-detail.html">Manage access</a>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
+ <table class="table">
+ <thead>
+ <tr>
+ <th scope="col">Realm</th>
+ <th scope="col">Relationship</th>
+ <th scope="col">Membership</th>
+ <th scope="col">Roles</th>
+ <th scope="col">Action</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <span class="table-title">Acme</span>
+ <span class="table-sub">acme</span>
+ </td>
+ <td data-label="Relationship">Home</td>
+ <td data-label="Membership">active</td>
+ <td data-label="Roles">None</td>
+ <td data-label="Action">
+ <a class="button-inline" href="./admin-user-detail.html">Manage access</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <span class="table-title">Globex</span>
+ <span class="table-sub">globex</span>
+ </td>
+ <td data-label="Relationship">Guest</td>
+ <td data-label="Membership">active</td>
+ <td data-label="Roles">None</td>
+ <td data-label="Action">
+ <a class="button-inline" href="./admin-user-detail.html">Manage access</a>
+ </td>
+ </tr>
+ </tbody>
+ </table>
</section>
</div>
</main>
diff --git a/mockup/plain/admin-users.html b/mockup/plain/admin-users.html
@@ -4,8 +4,10 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Admin users mockup</title>
- <link rel="stylesheet" href="./global.css" />
- <link rel="stylesheet" href="./select-menu.css" />
+ <link rel="stylesheet" href="../../app/shared/style/global.css" />
+ <link rel="stylesheet" href="../../app/shared/component/select-menu.css" />
+ <link rel="stylesheet" href="../../app/shared/component/user-menu.css" />
+ <link rel="stylesheet" href="./mockups.css" />
</head>
<body>
<header class="topbar">
@@ -19,28 +21,28 @@
<button class="mobile-nav-toggle" type="button" id="mobile-nav-toggle" aria-controls="mobile-navigation" aria-expanded="false" aria-label="Open navigation">
<span class="mobile-nav-toggle-bars" aria-hidden="true"></span>
</button>
- <details class="user-menu">
- <summary aria-label="Account menu">
+ <details class="menu user-menu">
+ <summary class="menu-trigger" aria-label="Account menu">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="10" />
<circle cx="12" cy="10" r="3" />
<path d="M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662" />
</svg>
</summary>
- <div class="user-panel">
- <div class="user-summary">
- <span class="user-name">System Admin</span>
- <span class="user-meta">admin@system.test</span>
+ <div class="menu-panel">
+ <div class="menu-heading">
+ <span class="menu-heading-title">System Admin</span>
+ <span class="menu-heading-meta">admin@system.test</span>
</div>
- <div class="user-menu-list">
- <a class="user-menu-item" href="#">
+ <div class="menu-list">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span>Account settings</span>
</a>
- <button class="user-menu-item" type="button" data-user-theme>
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -53,9 +55,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -125,19 +127,19 @@
</nav>
<div class="mobile-nav-divider" aria-hidden="true"></div>
<section class="mobile-nav-account" aria-label="Account">
- <div class="user-summary">
- <span class="user-name">System Admin</span>
- <span class="user-meta">admin@system.test</span>
+ <div class="menu-heading">
+ <span class="menu-heading-title">System Admin</span>
+ <span class="menu-heading-meta">admin@system.test</span>
</div>
- <div class="user-menu-list">
- <a class="user-menu-item" href="#">
+ <div class="menu-list">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" />
<circle cx="12" cy="12" r="3" />
</svg>
<span>Account settings</span>
</a>
- <button class="user-menu-item" type="button" data-user-theme>
+ <button class="menu-item" type="button" data-user-theme>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="4" />
<path d="M12 2v2" />
@@ -150,9 +152,9 @@
<path d="m19.07 4.93-1.41 1.41" />
</svg>
<span>Theme</span>
- <span class="user-menu-value" data-user-theme-value>Auto</span>
+ <span class="menu-value" data-user-theme-value>Auto</span>
</button>
- <a class="user-menu-item" href="#">
+ <a class="menu-item" href="#">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<path d="m16 17 5-5-5-5" />
@@ -225,14 +227,14 @@
<main class="content">
<div class="page-header page-header-row">
<div>
- <div class="client-breadcrumb">
+ <div class="breadcrumb">
<span aria-current="page">Users</span>
</div>
<h1>Users</h1>
<p>Home and guest members in this realm.</p>
</div>
- <div class="realm-select">
- <span id="users-realm-label">Realm</span>
+ <div class="field">
+ <span class="field-label" id="users-realm-label">Realm</span>
<div class="select" data-select data-value="acme">
<button
class="select-trigger"
@@ -279,113 +281,109 @@
</div>
</div>
- <section class="table-panel" aria-labelledby="user-table-title">
+ <section class="card" aria-labelledby="user-table-title">
<h2 id="user-table-title" class="sr-only">Realm users</h2>
- <div class="table-toolbar">
- <div class="table-search">
+ <div class="toolbar toolbar-panel">
+ <div class="toolbar-search">
<input id="user-search" type="search" aria-label="Search users" placeholder="Search users" />
</div>
- <div class="table-actions">
- <button class="button" type="button" data-dialog-open="user-add-dialog">Add user</button>
+ <div class="toolbar-actions">
+ <button class="button button-primary" type="button" data-dialog-open="user-add-dialog">Add user</button>
</div>
</div>
- <div class="data-table-wrap">
- <table class="data-table">
- <thead>
- <tr>
- <th class="table-icon-column" scope="col"><span class="sr-only">User</span></th>
- <th class="data-table-primary" scope="col">User</th>
- <th scope="col">Membership</th>
- <th scope="col">Roles</th>
- <th scope="col">Status</th>
- </tr>
- </thead>
- <tbody id="user-rows">
- <tr data-row-href="./admin-user-detail.html" data-search="alice alice alice@acme.test home realm user active">
- <td class="table-icon-column">
- <span class="table-icon" aria-hidden="true">
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
- <path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" />
- <circle cx="12" cy="7" r="4" />
- </svg>
- </span>
- </td>
- <td class="data-table-primary">
- <a href="./admin-user-detail.html">Alice</a>
- <span class="data-table-sub">alice@acme.test</span>
- <span class="data-table-sub">alice</span>
- </td>
- <td data-label="Membership">Home</td>
- <td data-label="Roles">None</td>
- <td data-label="Status">Active</td>
- </tr>
- <tr data-row-href="./admin-user-detail.html" data-search="acme it acme-it it@acme.test home realm-admin active">
- <td class="table-icon-column">
- <span class="table-icon" aria-hidden="true">
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
- <path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" />
- <circle cx="12" cy="7" r="4" />
- </svg>
- </span>
- </td>
- <td class="data-table-primary">
- <a href="./admin-user-detail.html">Acme IT</a>
- <span class="data-table-sub">it@acme.test</span>
- <span class="data-table-sub">acme-it</span>
- </td>
- <td data-label="Membership">Home</td>
- <td data-label="Roles"><span class="data-table-status">Realm admin</span></td>
- <td data-label="Status">Active</td>
- </tr>
- <tr data-row-href="./admin-user-detail.html" data-search="guest user guest guest@personal.test guest active">
- <td class="table-icon-column">
- <span class="table-icon" aria-hidden="true">
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
- <path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" />
- <circle cx="12" cy="7" r="4" />
- </svg>
- </span>
- </td>
- <td class="data-table-primary">
- <a href="./admin-user-detail.html">Guest User</a>
- <span class="data-table-sub">guest@personal.test</span>
- <span class="data-table-sub">guest</span>
- </td>
- <td data-label="Membership">Guest</td>
- <td data-label="Roles">None</td>
- <td data-label="Status">Active</td>
- </tr>
- <tr data-row-href="./admin-user-detail.html" data-search="carol carol carol@example.test guest realm user active">
- <td class="table-icon-column">
- <span class="table-icon" aria-hidden="true">
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
- <path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" />
- <circle cx="12" cy="7" r="4" />
- </svg>
- </span>
- </td>
- <td class="data-table-primary">
- <a href="./admin-user-detail.html">Carol</a>
- <span class="data-table-sub">carol@example.test</span>
- <span class="data-table-sub">carol</span>
- </td>
- <td data-label="Membership">Guest</td>
- <td data-label="Roles">None</td>
- <td data-label="Status">Active</td>
- </tr>
- </tbody>
- </table>
- <div id="user-search-empty" class="empty" hidden>
- <p>No users match this search.</p>
- </div>
- </div>
+ <table class="table table-linkable">
+ <thead>
+ <tr>
+ <th scope="col"><span class="sr-only">User</span></th>
+ <th scope="col">User</th>
+ <th scope="col">Membership</th>
+ <th scope="col">Roles</th>
+ <th scope="col">Status</th>
+ </tr>
+ </thead>
+ <tbody id="user-rows">
+ <tr data-row-href="./admin-user-detail.html" data-search="alice alice alice@acme.test home realm user active">
+ <td>
+ <span class="table-icon" aria-hidden="true">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
+ <path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" />
+ <circle cx="12" cy="7" r="4" />
+ </svg>
+ </span>
+ </td>
+ <td>
+ <span class="table-title"><a class="link" href="./admin-user-detail.html">Alice</a></span>
+ <span class="table-sub">alice@acme.test</span>
+ <span class="table-sub">alice</span>
+ </td>
+ <td data-label="Membership">Home</td>
+ <td data-label="Roles">None</td>
+ <td data-label="Status">Active</td>
+ </tr>
+ <tr data-row-href="./admin-user-detail.html" data-search="acme it acme-it it@acme.test home realm-admin active">
+ <td>
+ <span class="table-icon" aria-hidden="true">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
+ <path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" />
+ <circle cx="12" cy="7" r="4" />
+ </svg>
+ </span>
+ </td>
+ <td>
+ <span class="table-title"><a class="link" href="./admin-user-detail.html">Acme IT</a></span>
+ <span class="table-sub">it@acme.test</span>
+ <span class="table-sub">acme-it</span>
+ </td>
+ <td data-label="Membership">Home</td>
+ <td data-label="Roles"><span class="status-muted">Realm admin</span></td>
+ <td data-label="Status">Active</td>
+ </tr>
+ <tr data-row-href="./admin-user-detail.html" data-search="guest user guest guest@personal.test guest active">
+ <td>
+ <span class="table-icon" aria-hidden="true">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
+ <path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" />
+ <circle cx="12" cy="7" r="4" />
+ </svg>
+ </span>
+ </td>
+ <td>
+ <span class="table-title"><a class="link" href="./admin-user-detail.html">Guest User</a></span>
+ <span class="table-sub">guest@personal.test</span>
+ <span class="table-sub">guest</span>
+ </td>
+ <td data-label="Membership">Guest</td>
+ <td data-label="Roles">None</td>
+ <td data-label="Status">Active</td>
+ </tr>
+ <tr data-row-href="./admin-user-detail.html" data-search="carol carol carol@example.test guest realm user active">
+ <td>
+ <span class="table-icon" aria-hidden="true">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
+ <path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" />
+ <circle cx="12" cy="7" r="4" />
+ </svg>
+ </span>
+ </td>
+ <td>
+ <span class="table-title"><a class="link" href="./admin-user-detail.html">Carol</a></span>
+ <span class="table-sub">carol@example.test</span>
+ <span class="table-sub">carol</span>
+ </td>
+ <td data-label="Membership">Guest</td>
+ <td data-label="Roles">None</td>
+ <td data-label="Status">Active</td>
+ </tr>
+ </tbody>
+ </table>
+ <p id="user-search-empty" class="empty" hidden>No users match this search.</p>
</section>
</main>
</div>
</div>
- <div id="user-add-dialog" class="modal-overlay" hidden>
+ <div id="user-add-dialog" class="overlay" hidden>
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="user-add-title">
<div class="modal-header">
<h2 id="user-add-title">Add user</h2>
@@ -397,22 +395,22 @@
</button>
</div>
<div class="modal-body">
- <label class="form-field">
+ <label class="field">
<span class="field-label">Email or username</span>
<input class="field-control" value="carol@example.test" />
</label>
<div class="notice" role="status">
- <strong>Carol</strong>
- <span class="data-table-sub">carol@example.test</span>
- <span class="data-table-sub">No membership in Acme</span>
+ <span class="table-title">Carol</span>
+ <span class="table-sub">carol@example.test</span>
+ <span class="table-sub">No membership in Acme</span>
</div>
<p class="modal-note">
Exact email or username required. Adding Carol creates a guest membership without
roles.
</p>
<div class="modal-actions">
- <button class="button-secondary" type="button" data-dialog-close>Cancel</button>
- <button class="button" type="button" data-dialog-close>Add user</button>
+ <button class="button button-secondary" type="button" data-dialog-close>Cancel</button>
+ <button class="button button-primary" type="button" data-dialog-close>Add user</button>
</div>
</div>
</div>
diff --git a/mockup/plain/consent.html b/mockup/plain/consent.html
@@ -4,242 +4,61 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Consent mockup</title>
- <link rel="stylesheet" href="./global.css" />
- <style>
- .consent-page {
- display: grid;
- place-items: center;
- min-height: 100vh;
- min-height: 100svh;
- padding: env(safe-area-inset-top) env(safe-area-inset-right)
- calc(1rem + env(safe-area-inset-bottom)) env(safe-area-inset-left);
- background-color: var(--surface);
- }
-
- .consent-card {
- width: min(calc(100% - 2rem), 28rem);
- padding: 2rem;
- background: var(--surface);
- }
-
- .consent-card h1 {
- margin: 0 0 0.5rem;
- font-size: 1.5rem;
- font-weight: 400;
- line-height: 1.3;
- }
-
- .consent-note {
- margin: 0;
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.6;
- }
-
- .consent-account {
- display: flex;
- align-items: center;
- gap: 0.75rem;
- margin-top: 1.5rem;
- padding: 0.75rem;
- background: var(--row);
- }
-
- .consent-account svg {
- flex: none;
- width: 1.5rem;
- height: 1.5rem;
- }
-
- .consent-account-body {
- display: grid;
- gap: 0.125rem;
- min-width: 0;
- }
-
- .consent-account-name {
- font-size: 0.875rem;
- font-weight: 500;
- line-height: 1.4;
- }
-
- .consent-account-meta {
- overflow-wrap: anywhere;
- color: var(--muted);
- font-size: 0.75rem;
- line-height: 1.4;
- }
-
- .consent-account-link {
- flex: none;
- margin-left: auto;
- padding: 0;
- border: 0;
- background: none;
- color: var(--accent-text);
- font: inherit;
- font-size: 0.8125rem;
- cursor: pointer;
- }
-
- .consent-account-link:hover {
- color: var(--accent-text-hover);
- }
-
- .consent-account-link:active {
- color: var(--accent-text-active);
- }
-
- .consent-section-title {
- margin: 1.5rem 0 0;
- font-size: 0.875rem;
- font-weight: 500;
- line-height: 1.5;
- }
-
- .consent-scopes {
- display: grid;
- gap: 0.5rem;
- margin: 0.75rem 0 0;
- padding: 0;
- list-style: none;
- }
-
- .consent-scope {
- display: flex;
- align-items: flex-start;
- gap: 0.5rem;
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.5;
- }
-
- .consent-scope svg {
- flex: none;
- width: 1rem;
- height: 1rem;
- margin-top: 0.125rem;
- }
-
- .consent-footer {
- margin: 1.5rem 0 0;
- color: var(--muted);
- font-size: 0.8125rem;
- line-height: 1.6;
- }
-
- .consent-actions {
- display: grid;
- gap: 1rem;
- margin-top: 1.5rem;
- }
-
- .consent-actions > .button,
- .consent-actions > .link-button {
- justify-content: center;
- min-height: 2.75rem;
- text-align: center;
- }
-
- .link-button {
- display: inline-flex;
- align-items: center;
- padding: 0.75rem 1rem;
- border: 0;
- background: none;
- color: var(--accent-text);
- font: inherit;
- font-size: 1rem;
- cursor: pointer;
- touch-action: manipulation;
- }
-
- .link-button:hover {
- color: var(--accent-text-hover);
- }
-
- .link-button:active {
- color: var(--accent-text-active);
- }
-
- @media (min-width: 35em) {
- .consent-page {
- background-image: var(--hex);
- background-position: center;
- background-repeat: no-repeat;
- background-size: cover;
- }
-
- .consent-card {
- box-shadow: var(--shadow);
- }
-
- .consent-actions {
- display: flex;
- flex-wrap: nowrap;
- justify-content: flex-end;
- align-items: center;
- gap: 1.5rem;
- }
-
- .consent-actions > .button,
- .consent-actions > .link-button {
- width: auto;
- }
- }
-
- </style>
+ <link rel="stylesheet" href="../../app/shared/style/global.css" />
+ <link rel="stylesheet" href="./mockups.css" />
</head>
<body>
- <main class="consent-page">
- <section class="consent-card" aria-labelledby="consent-title">
- <h1 id="consent-title">Authorize Acme Portal</h1>
- <p class="consent-note">
- Acme Portal is requesting access to your Acme account.
- </p>
-
- <div class="consent-account">
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
- <circle cx="12" cy="12" r="10" />
- <circle cx="12" cy="10" r="3" />
- <path d="M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662" />
- </svg>
- <span class="consent-account-body">
- <span class="consent-account-name">Demo User</span>
- <span class="consent-account-meta">demo@example.com</span>
- </span>
- <button class="consent-account-link" type="button">Not you?</button>
- </div>
-
- <p class="consent-section-title">This will allow Acme Portal to:</p>
- <ul class="consent-scopes">
- <li class="consent-scope">
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
- <path d="m5 12 5 5L20 7" />
- </svg>
- <span>Sign you in with your Acme account.</span>
- </li>
- <li class="consent-scope">
+ <main class="status-page">
+ <section class="status-panel" aria-labelledby="consent-title">
+ <div class="stack">
+ <h1 id="consent-title">Authorize Acme Portal</h1>
+ <p class="note">
+ Acme Portal is requesting access to your Acme account.
+ </p>
+
+ <div class="mockup-account-strip u-cluster">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
- <path d="m5 12 5 5L20 7" />
+ <circle cx="12" cy="12" r="10" />
+ <circle cx="12" cy="10" r="3" />
+ <path d="M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662" />
</svg>
- <span>See your name and username.</span>
- </li>
- <li class="consent-scope">
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
- <path d="m5 12 5 5L20 7" />
- </svg>
- <span>See your email address.</span>
- </li>
- </ul>
-
- <p class="consent-footer">
- You can revoke access at any time from your account settings.
- </p>
-
- <div class="consent-actions">
- <button class="link-button" type="button">Deny</button>
- <button class="button" type="button">Allow access</button>
+ <span class="stack mockup-row-body">
+ <span class="mockup-row-title">Demo User</span>
+ <span class="mockup-row-meta">demo@example.com</span>
+ </span>
+ <button class="link" type="button">Not you?</button>
+ </div>
+
+ <h3>This will allow Acme Portal to:</h3>
+ <ul class="mockup-scope-list stack">
+ <li class="mockup-scope u-cluster">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
+ <path d="m5 12 5 5L20 7" />
+ </svg>
+ <span>Sign you in with your Acme account.</span>
+ </li>
+ <li class="mockup-scope u-cluster">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
+ <path d="m5 12 5 5L20 7" />
+ </svg>
+ <span>See your name and username.</span>
+ </li>
+ <li class="mockup-scope u-cluster">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
+ <path d="m5 12 5 5L20 7" />
+ </svg>
+ <span>See your email address.</span>
+ </li>
+ </ul>
+
+ <p class="note">
+ You can revoke access at any time from your account settings.
+ </p>
+
+ <div class="mockup-actions">
+ <button class="link" type="button">Deny</button>
+ <button class="button button-primary" type="button">Allow access</button>
+ </div>
</div>
</section>
</main>
diff --git a/mockup/plain/dropdown-menu.html b/mockup/plain/dropdown-menu.html
@@ -4,54 +4,9 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Custom dropdown mockup</title>
- <link rel="stylesheet" href="./global.css" />
- <link rel="stylesheet" href="./select-menu.css" />
- <style>
- .dropdown-stack {
- display: grid;
- gap: 1rem;
- }
-
- .dropdown-grid {
- display: grid;
- grid-template-columns: minmax(0, 1fr);
- gap: 1rem;
- margin-top: 1rem;
- }
-
- .dropdown-actions {
- display: flex;
- flex-wrap: wrap;
- gap: 0.5rem;
- margin-top: 1rem;
- }
-
- .dropdown-note {
- margin: 0;
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.5;
- }
-
- .modal-body {
- display: grid;
- gap: 1rem;
- }
-
- .modal-body p {
- margin: 0;
- }
-
- .modal-spacer {
- min-height: 8rem;
- }
-
- @media (min-width: 40em) {
- .dropdown-grid {
- grid-template-columns: repeat(2, minmax(0, 1fr));
- }
- }
- </style>
+ <link rel="stylesheet" href="../../app/shared/style/global.css" />
+ <link rel="stylesheet" href="../../app/shared/component/select-menu.css" />
+ <link rel="stylesheet" href="./mockups.css" />
</head>
<body>
<main class="content">
@@ -60,12 +15,12 @@
<p>House-styled replacement for native realm and form selects.</p>
</div>
- <div class="dropdown-stack">
+ <div class="stack">
<section class="panel">
<h2>Realm selector</h2>
- <div class="dropdown-grid">
- <div class="realm-select">
- <span id="realm-short-label">Realm</span>
+ <div class="grid">
+ <div class="field">
+ <span class="field-label" id="realm-short-label">Realm</span>
<div class="select" data-select data-value="acme">
<button
class="select-trigger"
@@ -103,7 +58,7 @@
</div>
</div>
- <div class="form-field">
+ <div class="field">
<span class="field-label" id="long-select-label">Application</span>
<div class="select" data-select data-value="internal-app">
<button
@@ -242,8 +197,8 @@
<section class="panel">
<h2>Disabled state</h2>
- <div class="dropdown-grid">
- <div class="form-field">
+ <div class="grid">
+ <div class="field">
<span class="field-label" id="disabled-select-label">Client</span>
<div class="select" data-select data-value="locked">
<button
@@ -274,20 +229,20 @@
</div>
</div>
</div>
- <p class="dropdown-note">Disabled controls remain visible but cannot open a popup.</p>
+ <p class="note">Disabled controls remain visible but cannot open a popup.</p>
</div>
</section>
<section class="panel">
<h2>Modal placement</h2>
- <div class="dropdown-actions">
- <button class="button" type="button" data-dialog-open="dropdown-modal">Open client dialog</button>
+ <div class="action-row">
+ <button class="button button-primary" type="button" data-dialog-open="dropdown-modal">Open client dialog</button>
</div>
</section>
</div>
</main>
- <div id="dropdown-modal" class="modal-overlay" hidden>
+ <div id="dropdown-modal" class="overlay" hidden>
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="dropdown-modal-title">
<div class="modal-header">
<h2 id="dropdown-modal-title">Register a client</h2>
@@ -299,12 +254,12 @@
</button>
</div>
<div class="modal-body">
- <label class="form-field">
+ <label class="field">
<span class="field-label">Client ID</span>
<input class="field-control" type="text" value="example-app" />
</label>
<div class="modal-spacer" aria-hidden="true"></div>
- <div class="form-field">
+ <div class="field">
<span class="field-label" id="modal-select-label">Access mode</span>
<div class="select" data-select data-value="members">
<button
@@ -350,10 +305,10 @@
</div>
</div>
</div>
- <p>Escaping an open dropdown closes the dropdown before it closes the dialog.</p>
+ <p class="note">Escaping an open dropdown closes the dropdown before it closes the dialog.</p>
<div class="modal-actions">
- <button class="button-secondary" type="button" data-dialog-close>Cancel</button>
- <button class="button" type="button" data-dialog-close>Create client</button>
+ <button class="button button-secondary" type="button" data-dialog-close>Cancel</button>
+ <button class="button button-primary" type="button" data-dialog-close>Create client</button>
</div>
</div>
</div>
@@ -389,7 +344,7 @@
});
function visibleDialogs() {
- return Array.from(document.querySelectorAll('.modal-overlay:not([hidden])'));
+ return Array.from(document.querySelectorAll('.overlay:not([hidden])'));
}
document.querySelectorAll('[data-dialog-open]').forEach((button) => {
@@ -403,13 +358,13 @@
document.querySelectorAll('[data-dialog-close]').forEach((button) => {
button.addEventListener('click', () => {
- const dialog = button.closest('.modal-overlay');
+ const dialog = button.closest('.overlay');
if (dialog) dialog.hidden = true;
});
});
document.addEventListener('click', (event) => {
- if (event.target.classList.contains('modal-overlay')) event.target.hidden = true;
+ if (event.target.classList.contains('overlay')) event.target.hidden = true;
});
window.addEventListener('keydown', (event) => {
diff --git a/mockup/plain/error-pages.html b/mockup/plain/error-pages.html
@@ -4,159 +4,8 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Error pages mockup</title>
- <link rel="stylesheet" href="./global.css" />
- <style>
- .status-page {
- display: grid;
- place-items: center;
- min-height: 100vh;
- min-height: 100svh;
- padding: env(safe-area-inset-top) env(safe-area-inset-right)
- calc(1rem + env(safe-area-inset-bottom)) env(safe-area-inset-left);
- background-color: var(--surface);
- }
-
- .status-panel,
- .login-card {
- width: min(calc(100% - 2rem), 28rem);
- padding: 2rem;
- background: var(--surface);
- }
-
- .status-panel {
- position: relative;
- }
-
- .login-card {
- width: min(calc(100% - 2rem), 24rem);
- }
-
- .status-panel h1,
- .login-card h1 {
- margin: 0 0 1rem;
- font-size: 1.5rem;
- font-weight: 400;
- line-height: 1.3;
- }
-
- .status-panel h1 {
- padding-right: 3rem;
- }
-
- .status-icon {
- position: absolute;
- top: 2rem;
- right: 2rem;
- width: 2rem;
- height: 2rem;
- color: currentColor;
- }
-
- .spinner {
- position: absolute;
- top: 2rem;
- right: 2rem;
- width: 2rem;
- height: 2rem;
- border: 0.1875rem solid var(--skeleton);
- border-top-color: var(--text);
- border-radius: 50%;
- animation: spin 1s linear infinite;
- }
-
- @keyframes spin {
- to {
- transform: rotate(360deg);
- }
- }
-
- .status-note,
- .login-note {
- margin: 0;
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.6;
- }
-
- .status-error {
- margin: 0;
- color: var(--danger);
- font-size: 0.875rem;
- line-height: 1.6;
- }
-
- .login-note {
- margin-bottom: 0.5rem;
- }
-
- .status-actions {
- display: grid;
- gap: 1rem;
- margin-top: 1.5rem;
- }
-
- .status-actions > .button,
- .status-actions > .button-secondary,
- .status-actions > .button-danger {
- justify-content: center;
- min-height: 2.75rem;
- text-align: center;
- }
-
- .field {
- display: grid;
- gap: 0.125rem;
- padding: 0.75rem 0;
- border-bottom: 1pt solid var(--field-line);
- }
-
- .field-label {
- color: var(--muted);
- font-size: 0.75rem;
- line-height: 1.4;
- }
-
- .field-value {
- font-size: 1rem;
- line-height: 1.5;
- }
-
- @media (min-width: 35em) {
- .status-page {
- background-color: var(--page);
- background-image: var(--hex);
- background-position: center;
- background-repeat: no-repeat;
- background-size: cover;
- }
-
- .status-panel,
- .login-card {
- box-shadow: var(--shadow);
- }
-
- .status-actions {
- display: flex;
- justify-content: flex-end;
- align-items: center;
- gap: 1rem;
- }
-
- .status-actions > .button,
- .status-actions > .button-secondary,
- .status-actions > .button-danger {
- flex: 0 auto;
- width: auto;
- }
- }
-
- @media (prefers-reduced-motion: reduce) {
- .spinner {
- animation: none;
- }
- }
-
- </style>
+ <link rel="stylesheet" href="../../app/shared/style/global.css" />
+ <link rel="stylesheet" href="./mockups.css" />
</head>
<body>
<div class="mockup-controls" aria-label="Mockup state">
@@ -175,34 +24,36 @@
<section class="status-page" data-view="login-error">
<div class="status-panel">
- <svg class="status-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
+ <svg class="status-icon" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="10" />
<path d="M12 8v4" />
<path d="M12 16h.01" />
</svg>
<h1>Sign-in unavailable</h1>
- <p class="status-error" role="alert">The sign-in service could not be reached. Try again in a moment.</p>
+ <p class="alert" role="alert">The sign-in service could not be reached. Try again in a moment.</p>
<div class="status-actions">
- <a class="button" href="#">Try again</a>
+ <a class="button button-primary" href="#">Try again</a>
</div>
</div>
</section>
<section class="status-page" data-view="login-inline" hidden>
- <div class="login-card">
- <h1>Sign in</h1>
- <p class="login-note">Continue to Acme.</p>
- <div class="field">
- <span class="field-label">Username</span>
- <span class="field-value">demo</span>
- </div>
- <div class="field">
- <span class="field-label">Password</span>
- <span class="field-value">••••••••</span>
- </div>
- <p class="status-error" role="alert">The username or password is incorrect.</p>
- <div class="status-actions">
- <button class="button" type="button">Sign in</button>
+ <div class="status-panel">
+ <div class="stack">
+ <h1>Sign in</h1>
+ <p class="note">Continue to Acme.</p>
+ <div class="field">
+ <span class="field-label">Username</span>
+ <span class="field-control">demo</span>
+ </div>
+ <div class="field">
+ <span class="field-label">Password</span>
+ <span class="field-control">••••••••</span>
+ </div>
+ <p class="alert" role="alert">The username or password is incorrect.</p>
+ <div class="status-actions">
+ <button class="button button-primary" type="button">Sign in</button>
+ </div>
</div>
</div>
</section>
@@ -211,21 +62,21 @@
<div class="status-panel">
<div class="spinner" aria-hidden="true"></div>
<h1>Completing sign-in</h1>
- <p class="status-note">Establishing the account session.</p>
+ <p class="note">Establishing the account session.</p>
</div>
</section>
<section class="status-page" data-view="account-error" hidden>
<div class="status-panel">
- <svg class="status-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
+ <svg class="status-icon" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="10" />
<path d="M12 8v4" />
<path d="M12 16h.01" />
</svg>
<h1>Sign-in failed</h1>
- <p class="status-error" role="alert">The sign-in request is no longer valid.</p>
+ <p class="alert" role="alert">The sign-in request is no longer valid.</p>
<div class="status-actions">
- <a class="button" href="#">Return to account</a>
+ <a class="button button-primary" href="#">Return to account</a>
</div>
</div>
</section>
@@ -234,21 +85,21 @@
<div class="status-panel">
<div class="spinner" aria-hidden="true"></div>
<h1>Completing sign-in</h1>
- <p class="status-note">Establishing the administrative session.</p>
+ <p class="note">Establishing the administrative session.</p>
</div>
</section>
<section class="status-page" data-view="admin-error" hidden>
<div class="status-panel">
- <svg class="status-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
+ <svg class="status-icon" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="10" />
<path d="M12 8v4" />
<path d="M12 16h.01" />
</svg>
<h1>Sign-in failed</h1>
- <p class="status-error" role="alert">The sign-in request is no longer valid.</p>
+ <p class="alert" role="alert">The sign-in request is no longer valid.</p>
<div class="status-actions">
- <a class="button" href="#">Return to administration</a>
+ <a class="button button-primary" href="#">Return to administration</a>
</div>
</div>
</section>
diff --git a/mockup/plain/global.css b/mockup/plain/global.css
@@ -1,1469 +0,0 @@
-:root {
- font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
- --canvas: #f3f3f3;
- --page: #fff;
- --surface: #fff;
- --sidebar: #000;
- --sidebar-active: #333;
- --topbar: #000;
- --text: #1b1b1b;
- --muted: #656a70;
- --accent: #25a;
- --accent-hover: color-mix(in oklch, var(--accent), white 16%);
- --accent-active: color-mix(in oklch, var(--accent), black 18%);
- --accent-text: var(--accent);
- --accent-text-hover: var(--accent-hover);
- --accent-text-active: var(--accent-active);
- --on-accent: #fff;
- --menu-hover: #8884;
- --row: #00000008;
- --row-hover: #0000000d;
- --skeleton: #00000012;
- --danger: #c9190b;
- --danger-text: #c9190b;
- --warn: #a15c00;
- --warn-bg: #a15c001a;
- --field-line: rgba(0, 0, 0, 0.42);
- --shadow: 0 0.125em 0.25em #0008;
- --hex: url('./hex-grid-light.svg');
- --topbar-height: 3.5rem;
-}
-
-*,
-*::before,
-*::after {
- box-sizing: border-box;
-}
-
-html {
- -webkit-text-size-adjust: 100%;
- text-size-adjust: 100%;
-}
-
-html,
-body {
- margin: 0;
- padding: 0;
-}
-
-body {
- background: var(--canvas);
- color: var(--text);
- -webkit-font-smoothing: antialiased;
-}
-
-[hidden] {
- display: none !important;
-}
-
-html.mobile-nav-open body {
- overflow: hidden;
-}
-
-.topbar .user-menu {
- display: none;
-}
-
-.topbar {
- position: sticky;
- top: 0;
- z-index: 40;
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 1rem;
- min-height: var(--topbar-height);
- padding: env(safe-area-inset-top) max(1.5rem, env(safe-area-inset-right)) 0
- max(1.5rem, env(safe-area-inset-left));
- background: var(--topbar);
- color: rgba(255, 255, 255, 0.76);
- font-size: 0.875rem;
-}
-
-.brand {
- display: flex;
- align-items: center;
- gap: 0.75rem;
- color: #fff;
- text-decoration: none;
-}
-
-.brand-icon {
- flex: none;
- width: 1.125rem;
- height: 1.125rem;
-}
-
-.brand-name {
- font-size: 1.125rem;
- font-weight: 500;
- line-height: 1.3;
-}
-
-.topbar-actions {
- display: flex;
- align-items: center;
- gap: 0.75rem;
-}
-
-.app {
- display: grid;
- grid-template-columns: minmax(0, 1fr);
- grid-template-rows: minmax(0, 1fr);
- min-height: calc(100vh - var(--topbar-height));
- min-height: calc(100svh - var(--topbar-height));
-}
-
-.sidebar {
- min-width: 0;
- display: none;
- flex-direction: column;
- background: var(--sidebar);
- color: #fff;
-}
-
-.nav {
- min-width: 0;
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- overflow-x: auto;
- padding: 0.75rem 0;
- scrollbar-width: none;
-}
-
-.nav::-webkit-scrollbar {
- display: none;
-}
-
-.nav-label {
- display: none;
- margin: 0;
- padding: 0.5rem 1.5rem;
- color: rgba(255, 255, 255, 0.46);
- font-size: 0.6875rem;
- font-weight: 600;
- letter-spacing: 0.08em;
- text-transform: uppercase;
-}
-
-.nav-item {
- min-width: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- gap: 0.75rem;
- flex: 1 1 0;
- padding: 0.6875rem 0.5rem;
- color: rgba(255, 255, 255, 0.82);
- font-size: 0.875rem;
- line-height: 1.4;
- text-align: center;
- text-decoration: none;
- cursor: pointer;
- touch-action: manipulation;
- user-select: none;
- -webkit-tap-highlight-color: transparent;
-}
-
-.nav-item span {
- position: absolute;
- width: 1pt;
- height: 1pt;
- padding: 0;
- margin: -1pt;
- overflow: hidden;
- clip-path: inset(50%);
- white-space: nowrap;
- border: 0;
-}
-
-.nav-item svg {
- flex: none;
- width: 1.125rem;
- height: 1.125rem;
-}
-
-.nav-item:hover,
-.nav-item:active {
- background: var(--menu-hover);
- color: #fff;
-}
-
-.nav-item.is-active {
- background: var(--sidebar-active);
- box-shadow: inset 0 0.25rem 0 var(--accent);
- color: #fff;
-}
-
-.mobile-nav-toggle {
- position: relative;
- display: grid;
- place-items: center;
- width: 2.5rem;
- height: 2.5rem;
- padding: 0;
- border: 0;
- background: transparent;
- color: rgba(255, 255, 255, 0.86);
- cursor: pointer;
- touch-action: manipulation;
- user-select: none;
- -webkit-tap-highlight-color: transparent;
-}
-
-.mobile-nav-toggle:hover,
-.mobile-nav-toggle.is-open {
- color: #fff;
-}
-
-.mobile-nav-toggle-bars,
-.mobile-nav-toggle-bars::before,
-.mobile-nav-toggle-bars::after {
- position: absolute;
- width: 1.25rem;
- height: 1pt;
- background: currentColor;
- transition: transform 0.3s ease;
-}
-
-.mobile-nav-toggle-bars::before,
-.mobile-nav-toggle-bars::after {
- content: '';
- left: 0;
-}
-
-.mobile-nav-toggle-bars::before {
- top: -0.5rem;
-}
-
-.mobile-nav-toggle-bars::after {
- top: 0.5rem;
-}
-
-.mobile-nav-toggle.is-open .mobile-nav-toggle-bars {
- background: transparent;
-}
-
-.mobile-nav-toggle.is-open .mobile-nav-toggle-bars::before {
- transform: translateY(0.5rem) rotate(45deg);
-}
-
-.mobile-nav-toggle.is-open .mobile-nav-toggle-bars::after {
- transform: translateY(-0.5rem) rotate(-45deg);
-}
-
-.mobile-nav {
- position: fixed;
- top: calc(var(--topbar-height) + env(safe-area-inset-top));
- right: max(0rem, env(safe-area-inset-right));
- bottom: 0;
- left: max(0rem, env(safe-area-inset-left));
- z-index: 30;
- overflow-y: auto;
- overscroll-behavior: contain;
- background: var(--sidebar);
- color: #fff;
- visibility: hidden;
- opacity: 0;
- transform: translateX(100%);
- pointer-events: none;
- transition:
- transform 0.3s ease,
- opacity 0.2s ease,
- visibility 0.3s;
-}
-
-html.mobile-nav-open .mobile-nav {
- visibility: visible;
- opacity: 1;
- transform: none;
- pointer-events: auto;
-}
-
-.mobile-nav .nav {
- min-width: 0;
- min-height: 0;
- flex-direction: column;
- flex-wrap: nowrap;
- overflow: visible;
- padding: 1rem max(1.5rem, env(safe-area-inset-right))
- calc(1rem + env(safe-area-inset-bottom))
- max(1.5rem, env(safe-area-inset-left));
- gap: 0.25rem;
-}
-
-.mobile-nav .nav-label {
- display: block;
- padding: 0.5rem 0;
-}
-
-.mobile-nav .nav-item {
- width: 100%;
- flex: none;
- justify-content: flex-start;
- padding-inline: 1rem;
- text-align: left;
- opacity: 0;
- transform: translateX(2rem);
- transition:
- opacity 0.2s ease 0.2s,
- transform 0.3s ease 0.2s;
-}
-
-html.mobile-nav-open .mobile-nav .nav-item {
- opacity: 1;
- transform: none;
-}
-
-.mobile-nav .nav-item span {
- position: static;
- width: auto;
- height: auto;
- margin: 0;
- overflow: visible;
- clip-path: none;
- display: inline;
- white-space: normal;
-}
-
-.mobile-nav-divider {
- height: 1pt;
- margin: 1rem 1.5rem;
- background: rgba(255, 255, 255, 0.18);
-}
-
-.mobile-nav-account {
- margin: 0 1.5rem calc(1rem + env(safe-area-inset-bottom));
-}
-
-.mobile-nav-account .user-summary {
- padding-inline: 0;
-}
-
-.mobile-nav-account .user-menu-list {
- padding: 0;
-}
-
-.main {
- display: flex;
- flex-direction: column;
- min-width: 0;
-}
-
-.content {
- width: 100%;
- max-width: 72rem;
- margin: 0 auto;
- padding: 1.75rem clamp(1rem, 4vw, 2rem) calc(3rem + env(safe-area-inset-bottom));
-}
-
-.page-header {
- margin-bottom: 1.5rem;
-}
-
-.page-header h1 {
- margin: 0;
- font-size: 1.5rem;
- font-weight: 400;
- line-height: 1.3;
-}
-
-.page-header p {
- margin: 0.25rem 0 0;
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.5;
-}
-
-.page-header-row {
- display: grid;
- gap: 1rem;
- margin-bottom: 1.5rem;
-}
-
-.page-header-row h1 {
- margin: 0;
- font-size: 1.5rem;
- font-weight: 400;
- line-height: 1.3;
-}
-
-.page-header-row p {
- margin: 0.25rem 0 0;
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.5;
-}
-
-.grid {
- display: grid;
- grid-template-columns: minmax(0, 1fr);
- gap: 1rem;
-}
-
-.panel {
- min-width: 0;
- max-width: 100%;
- padding: 1.5rem;
- background: var(--surface);
- box-shadow: var(--shadow);
-}
-
-.panel-wide {
- grid-column: 1 / -1;
- margin-top: 1rem;
-}
-
-.panel h2 {
- margin: 0 0 1.25rem;
- font-size: 1.0625rem;
- font-weight: 500;
- line-height: 1.4;
-}
-
-.details {
- display: grid;
- gap: 0.875rem;
- margin: 0;
-}
-
-.details > div {
- display: grid;
- grid-template-columns: minmax(0, 1fr);
- gap: 1rem;
-}
-
-.details dt {
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.5;
-}
-
-.details dd {
- margin: 0;
- overflow-wrap: anywhere;
- font-size: 0.875rem;
- line-height: 1.5;
-}
-
-.note {
- margin: 0;
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.6;
-}
-
-.panel-header {
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- gap: 1rem;
- margin-bottom: 1rem;
-}
-
-.panel-header h2 {
- margin: 0;
-}
-
-.panel-header .note {
- margin-top: 0.25rem;
-}
-
-.button {
- display: inline-block;
- padding: 0.625rem 1.25rem;
- border: 0;
- border-radius: 0;
- background: var(--accent);
- color: var(--on-accent);
- font: inherit;
- font-size: 0.8125rem;
- font-weight: 500;
- letter-spacing: 0.05em;
- line-height: 1.4;
- text-decoration: none;
- text-transform: uppercase;
- cursor: pointer;
-}
-
-.button:hover {
- background: var(--accent-hover);
-}
-
-.button:active {
- background: var(--accent-active);
-}
-
-.user-menu {
- position: relative;
-}
-
-.user-menu summary {
- display: grid;
- place-items: center;
- width: 2.25rem;
- height: 2.25rem;
- color: rgba(255, 255, 255, 0.86);
- list-style: none;
- cursor: pointer;
- user-select: none;
-}
-
-.user-menu summary::-webkit-details-marker {
- display: none;
-}
-
-.user-menu summary::marker {
- content: '';
-}
-
-.user-menu summary:hover,
-.user-menu[open] summary {
- color: #fff;
-}
-
-.user-menu svg {
- width: 1.5rem;
- height: 1.5rem;
-}
-
-.user-panel {
- position: absolute;
- top: 2.75rem;
- right: 0;
- z-index: 10;
- width: min(15rem, calc(100vw - 2rem));
- max-width: calc(100vw - 2rem);
- background: var(--sidebar);
- color: #fff;
- box-shadow: var(--shadow);
-}
-
-.user-summary {
- display: grid;
- gap: 0.125rem;
- padding: 0.875rem 1rem;
-}
-
-.user-name {
- font-size: 0.875rem;
- font-weight: 500;
- line-height: 1.4;
-}
-
-.user-meta {
- color: rgba(255, 255, 255, 0.56);
- font-size: 0.75rem;
- line-height: 1.4;
-}
-
-.user-menu-list {
- display: flex;
- flex-direction: column;
- padding: 0.5rem 0;
-}
-
-.user-menu-item {
- display: flex;
- align-items: center;
- gap: 0.75rem;
- width: 100%;
- padding: 0.625rem 1rem;
- border: 0;
- background: transparent;
- color: rgba(255, 255, 255, 0.82);
- font: inherit;
- font-size: 0.875rem;
- line-height: 1.4;
- text-align: left;
- text-decoration: none;
- cursor: pointer;
- user-select: none;
-}
-
-.user-menu-value {
- margin-left: auto;
- color: rgba(255, 255, 255, 0.56);
- font-size: 0.75rem;
-}
-
-.user-menu-item svg {
- flex: none;
- width: 1.125rem;
- height: 1.125rem;
-}
-
-.user-menu-item:hover {
- background: var(--menu-hover);
- color: #fff;
-}
-
-.mockup-controls {
- position: fixed;
- right: max(1rem, env(safe-area-inset-right));
- bottom: max(1rem, env(safe-area-inset-bottom));
- z-index: 100;
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- gap: 0.25rem;
- max-width: calc(100vw - 2rem);
- padding: 0.375rem;
- background: #000;
- color: #fff;
- box-shadow: var(--shadow);
- font-size: 0.75rem;
-}
-
-.mockup-label {
- padding: 0 0.5rem;
- color: rgba(255, 255, 255, 0.5);
- font-size: 0.6875rem;
- font-weight: 600;
- letter-spacing: 0.08em;
- text-transform: uppercase;
-}
-
-.mockup-button {
- padding: 0.375rem 0.625rem;
- border: 0;
- background: transparent;
- color: rgba(255, 255, 255, 0.76);
- font: inherit;
- font-size: 0.75rem;
- cursor: pointer;
-}
-
-.mockup-button:hover {
- background: var(--menu-hover);
- color: #fff;
-}
-
-.mockup-button.is-active {
- background: var(--sidebar-active);
- color: #fff;
-}
-
-.mockup-separator {
- width: 0.0625rem;
- height: 1.25rem;
- margin: 0 0.25rem;
- background: rgba(255, 255, 255, 0.18);
-}
-
-.button-secondary {
- display: inline-block;
- padding: 0.625rem 1.25rem;
- border: 1pt solid var(--accent);
- border-radius: 0;
- background: transparent;
- color: var(--accent-text);
- font: inherit;
- font-size: 0.8125rem;
- font-weight: 500;
- letter-spacing: 0.05em;
- line-height: 1.4;
- text-decoration: none;
- text-transform: uppercase;
- cursor: pointer;
-}
-
-.button-secondary:hover {
- background: var(--row-hover);
- color: var(--accent-text-hover);
-}
-
-.button-danger {
- display: inline-block;
- padding: 0.625rem 1.25rem;
- border: 0;
- border-radius: 0;
- background: var(--danger);
- color: #fff;
- font: inherit;
- font-size: 0.8125rem;
- font-weight: 500;
- letter-spacing: 0.05em;
- line-height: 1.4;
- text-decoration: none;
- text-transform: uppercase;
- cursor: pointer;
-}
-
-.realm-select {
- min-width: 0;
- max-width: 100%;
- display: grid;
- gap: 0.25rem;
-}
-
-.realm-select > span {
- color: var(--muted);
- font-size: 0.75rem;
- line-height: 1.15;
-}
-
-.sr-only {
- position: absolute;
- width: 1pt;
- height: 1pt;
- padding: 0;
- margin: -1pt;
- overflow: hidden;
- clip: rect(0, 0, 0, 0);
- white-space: nowrap;
- border: 0;
-}
-
-.table-panel {
- color: var(--text);
-}
-
-.table-toolbar {
- display: flex;
- flex-direction: column;
- gap: 1rem;
- margin-bottom: 1rem;
- padding: 1rem;
- background: var(--surface);
- box-shadow: var(--shadow);
-}
-
-.table-search {
- flex: 1;
- min-width: 0;
-}
-
-.table-search input {
- width: 100%;
- padding: 0.5rem 0;
- border: 0;
- border-bottom: 1pt solid var(--field-line);
- border-radius: 0;
- background: transparent;
- color: inherit;
- font: inherit;
- font-size: 1rem;
- line-height: 1.5;
- outline: none;
-}
-
-.table-search input:focus {
- border-bottom-color: var(--accent);
-}
-
-.table-actions {
- display: flex;
- justify-content: flex-end;
- flex-wrap: wrap;
- gap: 1rem;
-}
-
-.data-table-wrap {
- overflow: visible;
-}
-
-.data-table {
- display: block;
- min-width: 0;
- width: 100%;
- border-collapse: collapse;
- font-size: 0.875rem;
-}
-
-.data-table thead {
- display: none;
-}
-
-.data-table tbody,
-.data-table tbody tr,
-.data-table td {
- display: block;
- width: 100%;
-}
-
-.data-table tbody tr,
-.data-table-static tbody tr {
- min-height: 2.75rem;
- margin-bottom: 1rem;
- padding: 1rem;
- background: var(--surface);
- box-shadow: var(--shadow);
-}
-
-.data-table tbody tr:last-child,
-.data-table-static tbody tr:last-child {
- margin-bottom: 0;
-}
-
-.data-table th,
-.data-table td {
- display: block;
- padding: 0.5rem 0;
- border: 0;
- text-align: left;
- vertical-align: middle;
-}
-
-.data-table th {
- color: var(--muted);
- font-size: 0.75rem;
- font-weight: 500;
- letter-spacing: 0.08em;
- text-transform: uppercase;
-}
-
-.data-table td[data-label]::before {
- content: attr(data-label);
- display: block;
- margin-bottom: 0.25rem;
- color: var(--muted);
- font-size: 0.75rem;
- font-weight: 500;
- letter-spacing: 0.08em;
- text-transform: uppercase;
-}
-
-.data-table td:last-child {
- padding-bottom: 0;
-}
-
-.data-table tbody tr {
- cursor: pointer;
-}
-
-.data-table tbody tr:hover {
- background: var(--row-hover);
-}
-
-.data-table tbody tr:last-child td {
- border-bottom: 0;
-}
-
-.data-table-static tbody tr {
- cursor: default;
-}
-
-.data-table-static tbody tr:hover {
- background: var(--surface);
-}
-
-.data-table .table-icon-column {
- display: none;
-}
-
-.data-table-primary {
- min-width: 0;
- margin-bottom: 0.75rem;
- padding-bottom: 0.75rem;
- border-bottom: 1pt solid var(--row);
-}
-
-.data-table-primary a {
- color: inherit;
- font-weight: 500;
- text-decoration: none;
-}
-
-.data-table-primary a:hover {
- color: var(--accent-text-hover);
-}
-
-.data-table-sub {
- display: block;
- margin-top: 0.125rem;
- color: var(--muted);
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
- font-size: 0.8125rem;
- overflow-wrap: anywhere;
-}
-
-.data-table-status {
- display: block;
- margin-top: 0.125rem;
- color: var(--muted);
- font-size: 0.8125rem;
-}
-
-.table-icon {
- display: grid;
- place-items: center;
- width: 2rem;
- height: 2rem;
- flex: none;
- overflow: hidden;
- background: var(--row);
- color: var(--muted);
-}
-
-.table-icon img {
- width: 100%;
- height: 100%;
- object-fit: contain;
-}
-
-.table-icon svg {
- width: 1.125rem;
- height: 1.125rem;
-}
-
-/* Data tables embedded inside a panel: align to panel content, use row rules */
-.panel .table-toolbar {
- padding: 0;
- margin: 1.25rem 0 1rem;
- background: transparent;
- box-shadow: none;
- border-bottom: 0;
-}
-
-.panel .data-table tbody tr {
- padding: 0;
- background: transparent;
- box-shadow: none;
-}
-
-.panel .data-table th,
-.panel .data-table td {
- padding-right: 0;
- padding-left: 0;
-}
-
-.panel .data-table tbody tr:last-child td {
- border-bottom: 0;
-}
-
-.client-breadcrumb {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- gap: 0.5rem;
- margin-bottom: 1rem;
- color: var(--muted);
- font-size: 0.8125rem;
- line-height: 1.4;
-}
-
-.client-breadcrumb a {
- color: var(--accent-text);
- text-decoration: none;
-}
-
-.client-stack {
- display: grid;
- gap: 1rem;
-}
-
-.client-actions {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- gap: 0.5rem;
- margin-top: 1.25rem;
-}
-
-.danger-zone h2 {
- color: var(--danger-text);
-}
-
-.secret-value {
- display: block;
- margin-top: 1rem;
- padding: 0.75rem;
- background: var(--row);
- color: inherit;
- font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
- font-size: 0.8125rem;
- line-height: 1.5;
- overflow-wrap: anywhere;
- white-space: pre-wrap;
-}
-
-.modal-overlay {
- position: fixed;
- inset: 0;
- z-index: 100;
- display: grid;
- place-items: end center;
- padding: 0;
- background: rgba(0, 0, 0, 0.58);
- touch-action: manipulation;
-}
-
-.modal {
- width: 100%;
- max-height: 100vh;
- max-height: calc(100dvh - env(safe-area-inset-top));
- overflow: auto;
- overscroll-behavior: contain;
- border-top: 0.25rem solid var(--accent);
- background: var(--surface);
- color: var(--text);
- box-shadow: var(--shadow);
-}
-
-.modal-header {
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- gap: 1rem;
- padding: 1rem 1rem 0;
-}
-
-.modal-header h2 {
- margin: 0;
- font-size: 1.25rem;
- font-weight: 400;
- line-height: 1.3;
-}
-
-.modal-close {
- display: grid;
- place-items: center;
- width: 2rem;
- height: 2rem;
- padding: 0;
- border: 0;
- background: transparent;
- color: var(--muted);
- cursor: pointer;
-}
-
-.modal-close:hover {
- color: var(--text);
-}
-
-.modal-close svg {
- width: 1.25rem;
- height: 1.25rem;
-}
-
-.modal-body {
- padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
-}
-
-.modal-note {
- margin: 0;
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.6;
-}
-
-.modal-actions {
- position: sticky;
- bottom: 0;
- display: flex;
- flex-wrap: wrap;
- justify-content: flex-end;
- gap: 0.5rem;
- margin: 1rem -1rem calc(-1rem - env(safe-area-inset-bottom));
- padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
- background: var(--surface);
- border-top: 1pt solid var(--row);
-}
-
-.modal-actions > .button,
-.modal-actions > .button-secondary,
-.modal-actions > .button-danger {
- flex: 1;
- justify-content: center;
- text-align: center;
-}
-
-.form-field {
- display: grid;
- min-width: 0;
- gap: 0.25rem;
- margin-bottom: 1rem;
-}
-
-.field-label {
- color: var(--muted);
- font-size: 0.75rem;
- line-height: 1.4;
-}
-
-.field-control {
- width: 100%;
- min-width: 0;
- max-width: 100%;
- padding: 0.5rem 0.75rem;
- border: 0;
- border-bottom: 1pt solid var(--field-line);
- border-radius: 0;
- background: var(--surface);
- color: inherit;
- font: inherit;
- font-size: 0.875rem;
- line-height: 1.5;
-}
-
-.role-field {
- margin: 0;
- padding: 0;
- border: 0;
-}
-
-.role-field legend {
- margin-bottom: 0.5rem;
- padding: 0;
- color: var(--muted);
- font-size: 0.75rem;
- line-height: 1.4;
-}
-
-.checkbox-list {
- display: grid;
- gap: 0.5rem;
-}
-
-.checkbox-row {
- display: flex;
- align-items: center;
- gap: 0.5rem;
- font-size: 0.875rem;
- line-height: 1.5;
-}
-
-.checkbox-row input {
- width: 1rem;
- height: 1rem;
-}
-
-.alert {
- margin: 0 0 1rem;
- color: var(--danger-text);
- font-size: 0.875rem;
- line-height: 1.5;
-}
-
-.alert p {
- margin: 0 0 0.5rem;
-}
-
-.notice {
- margin: 0 0 1rem;
- padding: 0.75rem 1rem;
- background: var(--row);
- color: var(--text);
- font-size: 0.875rem;
- line-height: 1.5;
-}
-
-.loading {
- color: var(--muted);
- font-size: 0.875rem;
-}
-
-.skeleton {
- height: 0.75rem;
- background: var(--skeleton);
-}
-
-.skeleton + .skeleton {
- margin-top: 0.75rem;
-}
-
-.skeleton-title {
- width: 8rem;
- height: 1rem;
-}
-
-.skeleton-short {
- width: 35%;
-}
-
-a:focus-visible,
-button:focus-visible,
-summary:focus-visible {
- outline: 2pt solid var(--accent);
- outline-offset: 2pt;
-}
-
-@media (pointer: coarse) {
- .button,
- .button-secondary,
- .button-danger,
- .auth-button,
- .auth-link,
- .nav-item,
- .summary-row,
- .surface-row,
- .user-menu-item {
- min-height: 2.75rem;
- touch-action: manipulation;
- }
-
- .mobile-nav-toggle,
- .user-menu summary,
- .modal-close {
- min-width: 2.75rem;
- width: 2.75rem;
- height: 2.75rem;
- touch-action: manipulation;
- }
-
- .table-search input,
- .field-control,
- .field-textarea,
- .checkbox-row,
- .auth-choice {
- min-height: 2.75rem;
- padding-block: 0.5rem;
- touch-action: manipulation;
- }
-
- .user-menu summary:hover,
- .user-menu summary:active,
- .user-menu-item:hover,
- .user-menu-item:active {
- background: var(--menu-hover);
- color: #fff;
- }
-}
-
-@media (min-width: 40em) {
- .page-header-row {
- grid-template-columns: minmax(0, 1fr) auto;
- align-items: end;
- }
-
- .modal-overlay {
- place-items: center;
- padding: 1rem;
- }
-
- .modal {
- width: min(100%, 32rem);
- max-height: calc(100vh - 2rem);
- max-height: calc(100dvh - 2rem);
- border-top: 0;
- }
-
- .modal-header {
- padding: 1.5rem 1.5rem 0;
- }
-
- .modal-body {
- padding: 1.5rem;
- }
-
- .modal-actions {
- position: static;
- flex-wrap: nowrap;
- gap: 1rem;
- margin: 1.5rem 0 0;
- padding: 0;
- background: transparent;
- border-top: 0;
- }
-
- .modal-actions > .button,
- .modal-actions > .button-secondary,
- .modal-actions > .button-danger {
- flex: 0 auto;
- }
-
- .table-panel {
- background: var(--surface);
- box-shadow: var(--shadow);
- }
-
- .table-toolbar {
- flex-direction: row;
- align-items: center;
- margin-bottom: 0;
- padding: 1rem 1.5rem;
- background: transparent;
- box-shadow: none;
- border-bottom: 1pt solid var(--row);
- }
-
- .data-table-wrap {
- overflow-x: auto;
- }
-
- .data-table {
- display: table;
- font-size: 0.875rem;
- }
-
- .data-table thead {
- display: table-header-group;
- }
-
- .data-table tbody {
- display: table-row-group;
- }
-
- .data-table tbody tr,
- .data-table-static tbody tr {
- display: table-row;
- min-height: 0;
- margin-bottom: 0;
- padding: 0;
- background: transparent;
- box-shadow: none;
- }
-
- .data-table tbody tr:hover {
- background: var(--row-hover);
- }
-
- .data-table-static tbody tr:hover {
- background: transparent;
- }
-
- .data-table th,
- .data-table td {
- display: table-cell;
- padding: 0.75rem 1.5rem;
- border-bottom: 1pt solid var(--row);
- }
-
- .data-table td[data-label]::before {
- content: none;
- }
-
- .data-table-primary {
- min-width: 16rem;
- margin-bottom: 0;
- padding-bottom: 0;
- border-bottom: 0;
- }
-
- .data-table .table-icon-column {
- display: table-cell;
- width: 1%;
- }
-
- .details > div {
- grid-template-columns: 8.5rem minmax(0, 1fr);
- }
-}
-
-@media (min-width: 60em) {
- .app {
- grid-template-columns: 15rem minmax(0, 1fr);
- grid-template-rows: minmax(0, 1fr);
- }
-
- .sidebar {
- display: flex;
- min-height: calc(100vh - var(--topbar-height));
- min-height: calc(100svh - var(--topbar-height));
- }
-
- .mobile-nav-toggle,
- .mobile-nav {
- display: none;
- }
-
- .topbar .user-menu {
- display: block;
- }
-
- .nav {
- flex: 1;
- overflow: visible;
- flex-direction: column;
- flex-wrap: nowrap;
- padding: 0.75rem 0;
- gap: 0;
- }
-
- .nav-label {
- display: block;
- padding: 0.5rem 1.5rem;
- }
-
- .nav-item {
- min-width: 0;
- width: 100%;
- flex: none;
- padding-inline: 1.5rem;
- justify-content: flex-start;
- text-align: left;
- opacity: 1;
- transform: none;
- transition: none;
- }
-
- .nav-item span {
- position: static;
- width: auto;
- height: auto;
- margin: 0;
- overflow: visible;
- clip-path: none;
- display: inline;
- white-space: normal;
- }
-
- .grid {
- grid-template-columns: repeat(2, minmax(0, 1fr));
- }
-}
-
-@media (prefers-reduced-motion: reduce) {
- .mobile-nav,
- .mobile-nav .nav-item,
- .mobile-nav-toggle-bars,
- .mobile-nav-toggle-bars::before,
- .mobile-nav-toggle-bars::after {
- transition: none;
- }
-
- .mobile-nav,
- .mobile-nav .nav-item {
- transform: none;
- }
-}
-
-@media (prefers-color-scheme: dark) {
- :root:not([data-theme]) {
- --canvas: #181818;
- --page: #000;
- --surface: #282828;
- --sidebar: #000;
- --sidebar-active: #333;
- --topbar: #000;
- --text: #e7e7e7;
- --muted: #a0a4a8;
- --accent-text: color-mix(in oklch, var(--accent), white 45%);
- --accent-text-hover: color-mix(in oklch, var(--accent), white 58%);
- --accent-text-active: color-mix(in oklch, var(--accent), white 35%);
- --row: #ffffff0d;
- --row-hover: #ffffff14;
- --skeleton: #ffffff14;
- --danger-text: #f28b82;
- --warn: #e0a63d;
- --warn-bg: #e0a63d26;
- --field-line: rgba(255, 255, 255, 0.42);
- --hex: url('./hex-grid-dark.svg');
- color-scheme: dark;
- }
-}
-
-:root[data-theme="dark"] {
- --canvas: #181818;
- --page: #000;
- --surface: #282828;
- --sidebar: #000;
- --sidebar-active: #333;
- --topbar: #000;
- --text: #e7e7e7;
- --muted: #a0a4a8;
- --accent-text: color-mix(in oklch, var(--accent), white 45%);
- --accent-text-hover: color-mix(in oklch, var(--accent), white 58%);
- --accent-text-active: color-mix(in oklch, var(--accent), white 35%);
- --row: #ffffff0d;
- --row-hover: #ffffff14;
- --skeleton: #ffffff14;
- --danger-text: #f28b82;
- --warn: #e0a63d;
- --warn-bg: #e0a63d26;
- --field-line: rgba(255, 255, 255, 0.42);
- --hex: url('./hex-grid-dark.svg');
- color-scheme: dark;
-}
diff --git a/mockup/plain/login.html b/mockup/plain/login.html
@@ -4,374 +4,8 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>Login mockup</title>
- <link rel="stylesheet" href="./global.css" />
- <style>
- .auth-page {
- --auth-surface: #fff;
- display: grid;
- place-items: center;
- min-height: 100vh;
- min-height: 100svh;
- padding: env(safe-area-inset-top) env(safe-area-inset-right)
- calc(1rem + env(safe-area-inset-bottom)) env(safe-area-inset-left);
- background: var(--auth-surface);
- }
-
- .auth-card,
- .auth-status-panel {
- width: min(calc(100% - 2rem), 24rem);
- padding: 2rem;
- border-radius: 0;
- background: var(--auth-surface);
- color: var(--text);
- }
-
- .auth-card-consent,
- .auth-status-panel {
- width: min(calc(100% - 2rem), 28rem);
- }
-
- .auth-card h1,
- .auth-status-panel h1 {
- margin: 0 0 1rem;
- font-size: 1.5rem;
- font-weight: 400;
- line-height: 1.3;
- }
-
- .auth-card-consent h1 {
- margin-bottom: 0.5rem;
- }
-
- .auth-realm {
- margin: 0 0 0.375rem;
- color: var(--muted);
- font-size: 0.75rem;
- font-weight: 600;
- letter-spacing: 0.08em;
- text-transform: uppercase;
- }
-
- .auth-note {
- margin: 0 0 1rem;
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.6;
- }
-
- .auth-card-consent .auth-note {
- margin-bottom: 0;
- }
-
- .auth-field {
- position: relative;
- padding-top: 1rem;
- }
-
- .auth-input {
- width: 100%;
- padding: 0.5rem 0;
- border: 0;
- border-bottom: 1pt solid var(--field-line);
- border-radius: 0;
- background: transparent;
- color: var(--text);
- font: inherit;
- font-size: 1rem;
- line-height: 1.5;
- outline: none;
- }
-
- .auth-input:focus {
- border-bottom-color: var(--accent);
- }
-
- .auth-field label {
- position: absolute;
- top: 1.5em;
- left: 0;
- color: var(--muted);
- font-size: 1rem;
- line-height: 1.5;
- pointer-events: none;
- transform-origin: left top;
- transition: top 0.15s ease, font-size 0.15s ease, color 0.15s ease, opacity 0.15s ease;
- }
-
- .auth-input:focus + label,
- .auth-input:not(:placeholder-shown) + label {
- top: 0;
- color: var(--text);
- font-size: 0.85em;
- font-weight: 500;
- opacity: 0.8;
- }
-
- .auth-identifier {
- margin: 0 0 0.5rem;
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.5;
- }
-
- .auth-choice {
- display: flex;
- align-items: center;
- gap: 0.5rem;
- min-height: 2.75rem;
- margin-top: 1rem;
- font-size: 0.875rem;
- line-height: 1.5;
- cursor: pointer;
- touch-action: manipulation;
- }
-
- .auth-choice input {
- width: 1rem;
- height: 1rem;
- accent-color: var(--accent);
- }
-
- .auth-accounts {
- display: grid;
- gap: 0.5rem;
- margin-top: 1rem;
- }
-
- .auth-account {
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- justify-content: center;
- gap: 0.125rem;
- width: 100%;
- min-height: 2.75rem;
- padding: 0.75rem 0;
- border: 0;
- border-bottom: 1pt solid var(--field-line);
- border-radius: 0;
- background: none;
- color: inherit;
- font: inherit;
- text-align: left;
- cursor: pointer;
- }
-
- .auth-account:hover,
- .auth-account:focus-visible {
- border-bottom-color: var(--accent);
- }
-
- .auth-account-name {
- font-size: 1rem;
- line-height: 1.5;
- }
-
- .auth-account-username {
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.5;
- }
-
- .auth-error {
- margin: 1rem 0 0;
- color: var(--danger);
- font-size: 0.875rem;
- line-height: 1.6;
- }
-
- .auth-actions {
- display: grid;
- gap: 1rem;
- margin-top: 1.5rem;
- }
-
- .auth-actions > .button,
- .auth-actions > .auth-link {
- justify-content: center;
- min-height: 2.75rem;
- text-align: center;
- }
-
- .auth-back {
- margin-right: auto;
- }
-
- .auth-link {
- display: inline-flex;
- align-items: center;
- padding: 0.75rem 1rem;
- border: 0;
- background: none;
- color: var(--accent-text);
- font: inherit;
- font-size: 1rem;
- cursor: pointer;
- touch-action: manipulation;
- }
-
- .auth-link:hover {
- color: var(--accent-text-hover);
- }
-
- .auth-link:active {
- color: var(--accent-text-active);
- }
-
- .button:disabled {
- opacity: 0.5;
- cursor: default;
- }
-
- .auth-spinner {
- width: 2rem;
- height: 2rem;
- margin-bottom: 1rem;
- border: 0.1875rem solid var(--skeleton);
- border-top-color: var(--text);
- border-radius: 50%;
- animation: auth-spin 1s linear infinite;
- }
-
- @keyframes auth-spin {
- to {
- transform: rotate(360deg);
- }
- }
-
- .auth-status-icon {
- width: 2rem;
- height: 2rem;
- margin-bottom: 1rem;
- }
-
- .auth-consent-account {
- display: flex;
- align-items: center;
- gap: 0.75rem;
- margin-top: 1.5rem;
- padding: 0.75rem;
- background: var(--row);
- }
-
- .auth-consent-account svg {
- flex: none;
- width: 1.5rem;
- height: 1.5rem;
- }
-
- .auth-consent-account-body {
- display: grid;
- gap: 0.125rem;
- min-width: 0;
- }
-
- .auth-consent-account-name {
- font-size: 0.875rem;
- font-weight: 500;
- line-height: 1.4;
- }
-
- .auth-consent-account-meta {
- overflow-wrap: anywhere;
- color: var(--muted);
- font-size: 0.75rem;
- line-height: 1.4;
- }
-
- .auth-consent-account .auth-link {
- flex: none;
- margin-left: auto;
- font-size: 0.8125rem;
- }
-
- .auth-consent-title {
- margin: 1.5rem 0 0;
- font-size: 0.875rem;
- font-weight: 500;
- line-height: 1.5;
- }
-
- .auth-consent-scopes {
- display: grid;
- gap: 0.5rem;
- margin: 0.75rem 0 0;
- padding: 0;
- list-style: none;
- }
-
- .auth-consent-scope {
- display: flex;
- align-items: flex-start;
- gap: 0.5rem;
- color: var(--muted);
- font-size: 0.875rem;
- line-height: 1.5;
- }
-
- .auth-consent-scope svg {
- flex: none;
- width: 1rem;
- height: 1rem;
- margin-top: 0.125rem;
- }
-
- .auth-consent-footer {
- margin: 1.5rem 0 0;
- color: var(--muted);
- font-size: 0.8125rem;
- line-height: 1.6;
- }
-
- .mockup-controls {
- max-height: calc(100vh - 2rem);
- overflow-y: auto;
- }
-
- @media (min-width: 35em) {
- .auth-page {
- background-color: var(--auth-surface);
- background-image: var(--hex);
- background-position: center;
- background-repeat: no-repeat;
- background-size: cover;
- }
-
- .auth-card,
- .auth-status-panel {
- box-shadow: var(--shadow);
- }
-
- .auth-actions {
- display: flex;
- justify-content: flex-end;
- align-items: center;
- gap: 1.5rem;
- }
-
- .auth-actions > .button,
- .auth-actions > .auth-link {
- width: auto;
- min-height: 2.75rem;
- }
- }
-
- @media (prefers-reduced-motion: reduce) {
- .auth-spinner {
- animation: none;
- }
- }
-
- @media (prefers-color-scheme: dark) {
- :root:not([data-theme]) .auth-page {
- --auth-surface: #222;
- }
- }
-
- :root[data-theme="dark"] .auth-page {
- --auth-surface: #222;
- }
- </style>
+ <link rel="stylesheet" href="../../app/shared/style/global.css" />
+ <link rel="stylesheet" href="./mockups.css" />
</head>
<body>
<div class="mockup-controls" aria-label="Mockup state">
@@ -393,238 +27,248 @@
</div>
<main>
- <section class="auth-page" data-view="accounts" hidden>
- <div class="auth-card">
- <p class="auth-realm">Acme account</p>
+ <section class="status-page" data-view="accounts" hidden>
+ <div class="status-panel">
+ <p class="field-label mockup-eyebrow">Acme account</p>
<h1>Sign in</h1>
- <p class="auth-note">Choose an account to continue.</p>
- <div class="auth-accounts">
- <button class="auth-account" type="button">
- <span class="auth-account-name">Alice</span>
- <span class="auth-account-username">alice@acme.test</span>
- </button>
- <button class="auth-account" type="button">
- <span class="auth-account-name">IT Admin</span>
- <span class="auth-account-username">it@acme.test</span>
- </button>
- </div>
- <div class="auth-actions">
- <button class="auth-link" type="button">Different account</button>
+ <div class="stack">
+ <p class="note">Choose an account to continue.</p>
+ <div class="stack mockup-choices">
+ <button class="mockup-choice" type="button">
+ <span class="mockup-choice-name">Alice</span>
+ <span class="mockup-choice-meta">alice@acme.test</span>
+ </button>
+ <button class="mockup-choice" type="button">
+ <span class="mockup-choice-name">IT Admin</span>
+ <span class="mockup-choice-meta">it@acme.test</span>
+ </button>
+ </div>
+ <div class="mockup-actions">
+ <button class="link" type="button">Different account</button>
+ </div>
</div>
</div>
</section>
- <section class="auth-page" data-view="identifier">
- <div class="auth-card">
- <p class="auth-realm">Acme account</p>
+ <section class="status-page" data-view="identifier">
+ <div class="status-panel">
+ <p class="field-label mockup-eyebrow">Acme account</p>
<h1>Sign in</h1>
- <p class="auth-note">Continue to Acme Portal.</p>
- <form>
- <div class="auth-field">
- <input
- class="auth-input"
- id="identifier"
- type="text"
- value="alice@acme.test"
- placeholder=" "
- autocomplete="username"
- />
- <label for="identifier">Email or username</label>
- </div>
- <div class="auth-actions">
- <button class="auth-link auth-back" type="button">Back to accounts</button>
- <button class="button" type="submit">Next</button>
- </div>
- </form>
+ <div class="stack">
+ <p class="note">Continue to Acme Portal.</p>
+ <form class="stack">
+ <div class="field">
+ <label class="field-label" for="identifier">Email or username</label>
+ <input
+ class="field-control"
+ id="identifier"
+ type="text"
+ value="alice@acme.test"
+ autocomplete="username"
+ />
+ </div>
+ <div class="mockup-actions">
+ <button class="link mockup-back" type="button">Back to accounts</button>
+ <button class="button button-primary" type="submit">Next</button>
+ </div>
+ </form>
+ </div>
</div>
</section>
- <section class="auth-page" data-view="password" hidden>
- <div class="auth-card">
- <p class="auth-realm">Acme account</p>
+ <section class="status-page" data-view="password" hidden>
+ <div class="status-panel">
+ <p class="field-label mockup-eyebrow">Acme account</p>
<h1>Sign in</h1>
- <p class="auth-identifier">alice@acme.test</p>
- <form>
- <div class="auth-field">
- <input
- class="auth-input"
- id="password"
- type="password"
- value="demo-password"
- placeholder=" "
- autocomplete="current-password"
- />
- <label for="password">Password</label>
- </div>
- <label class="auth-choice">
- <input type="checkbox" checked />
- <span>Keep me signed in</span>
- </label>
- <div class="auth-actions">
- <button class="auth-link auth-back" type="button">Back</button>
- <button class="button" type="submit">Sign in</button>
- </div>
- </form>
+ <div class="stack">
+ <p class="note">alice@acme.test</p>
+ <form class="stack">
+ <div class="field">
+ <label class="field-label" for="password">Password</label>
+ <input
+ class="field-control"
+ id="password"
+ type="password"
+ value="demo-password"
+ autocomplete="current-password"
+ />
+ </div>
+ <label class="checkbox">
+ <input type="checkbox" checked />
+ <span>Keep me signed in</span>
+ </label>
+ <div class="mockup-actions">
+ <button class="link mockup-back" type="button">Back</button>
+ <button class="button button-primary" type="submit">Sign in</button>
+ </div>
+ </form>
+ </div>
</div>
</section>
- <section class="auth-page" data-view="password-error" hidden>
- <div class="auth-card">
- <p class="auth-realm">Acme account</p>
+ <section class="status-page" data-view="password-error" hidden>
+ <div class="status-panel">
+ <p class="field-label mockup-eyebrow">Acme account</p>
<h1>Sign in</h1>
- <p class="auth-identifier">alice@acme.test</p>
- <form>
- <div class="auth-field">
- <input
- class="auth-input"
- id="password-error"
- type="password"
- value="demo-password"
- placeholder=" "
- autocomplete="current-password"
- aria-invalid="true"
- aria-describedby="password-error-message"
- />
- <label for="password-error">Password</label>
- </div>
- <label class="auth-choice">
- <input type="checkbox" checked />
- <span>Keep me signed in</span>
- </label>
- <p class="auth-error" id="password-error-message" role="alert">
- The username or password is incorrect.
- </p>
- <div class="auth-actions">
- <button class="auth-link auth-back" type="button">Back</button>
- <button class="button" type="submit">Sign in</button>
- </div>
- </form>
+ <div class="stack">
+ <p class="note">alice@acme.test</p>
+ <form class="stack">
+ <div class="field">
+ <input
+ class="field-control"
+ id="password-error"
+ type="password"
+ value="demo-password"
+ autocomplete="current-password"
+ aria-invalid="true"
+ aria-describedby="password-error-message"
+ />
+ <label class="field-label" for="password-error">Password</label>
+ </div>
+ <label class="checkbox">
+ <input type="checkbox" checked />
+ <span>Keep me signed in</span>
+ </label>
+ <p class="alert" id="password-error-message" role="alert">
+ The username or password is incorrect.
+ </p>
+ <div class="mockup-actions">
+ <button class="link mockup-back" type="button">Back</button>
+ <button class="button button-primary" type="submit">Sign in</button>
+ </div>
+ </form>
+ </div>
</div>
</section>
- <section class="auth-page" data-view="reauth" hidden>
- <div class="auth-card">
- <p class="auth-realm">Acme account</p>
+ <section class="status-page" data-view="reauth" hidden>
+ <div class="status-panel">
+ <p class="field-label mockup-eyebrow">Acme account</p>
<h1>Sign in</h1>
- <p class="auth-note">Confirm your password to continue.</p>
- <p class="auth-identifier">alice@acme.test</p>
- <form>
- <div class="auth-field">
- <input
- class="auth-input"
- id="reauth-password"
- type="password"
- value="demo-password"
- placeholder=" "
- autocomplete="current-password"
- />
- <label for="reauth-password">Password</label>
- </div>
- <label class="auth-choice">
- <input type="checkbox" checked />
- <span>Keep me signed in</span>
- </label>
- <div class="auth-actions">
- <button class="auth-link auth-back" type="button">Back</button>
- <button class="button" type="submit">Sign in</button>
- </div>
- </form>
+ <div class="stack">
+ <p class="note">Confirm your password to continue.</p>
+ <p class="note">alice@acme.test</p>
+ <form class="stack">
+ <div class="field">
+ <input
+ class="field-control"
+ id="reauth-password"
+ type="password"
+ value="demo-password"
+ autocomplete="current-password"
+ />
+ <label class="field-label" for="reauth-password">Password</label>
+ </div>
+ <label class="checkbox">
+ <input type="checkbox" checked />
+ <span>Keep me signed in</span>
+ </label>
+ <div class="mockup-actions">
+ <button class="link mockup-back" type="button">Back</button>
+ <button class="button button-primary" type="submit">Sign in</button>
+ </div>
+ </form>
+ </div>
</div>
</section>
- <section class="auth-page" data-view="oidc" hidden>
- <div class="auth-card">
- <p class="auth-realm">Acme account</p>
+ <section class="status-page" data-view="oidc" hidden>
+ <div class="status-panel">
+ <p class="field-label mockup-eyebrow">Acme account</p>
<h1>Sign in</h1>
- <p class="auth-identifier">alice@acme.test</p>
- <p class="auth-note">This account signs in with Example SSO.</p>
- <div class="auth-actions">
- <button class="auth-link auth-back" type="button">Back</button>
- <button class="button" type="button" disabled>Continue</button>
+ <div class="stack">
+ <p class="note">alice@acme.test</p>
+ <p class="note">This account signs in with Example SSO.</p>
+ <div class="mockup-actions">
+ <button class="link mockup-back" type="button">Back</button>
+ <button class="button button-primary" type="button" disabled>Continue</button>
+ </div>
</div>
</div>
</section>
- <section class="auth-page" data-view="consent" hidden>
- <div class="auth-card auth-card-consent" aria-labelledby="consent-title">
- <h1 id="consent-title">Authorize Acme Portal</h1>
- <p class="auth-note">Acme Portal is requesting access to your Acme account.</p>
-
- <div class="auth-consent-account">
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
- <circle cx="12" cy="12" r="10" />
- <circle cx="12" cy="10" r="3" />
- <path d="M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662" />
- </svg>
- <span class="auth-consent-account-body">
- <span class="auth-consent-account-name">Alice</span>
- <span class="auth-consent-account-meta">alice@acme.test</span>
- </span>
- <button class="auth-link" type="button">Not you?</button>
- </div>
-
- <p class="auth-consent-title">This will allow Acme Portal to:</p>
- <ul class="auth-consent-scopes">
- <li class="auth-consent-scope">
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
- <path d="m5 12 5 5L20 7" />
- </svg>
- <span>Sign you in with your Acme account.</span>
- </li>
- <li class="auth-consent-scope">
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
- <path d="m5 12 5 5L20 7" />
- </svg>
- <span>See your name and username.</span>
- </li>
- <li class="auth-consent-scope">
- <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
- <path d="m5 12 5 5L20 7" />
+ <section class="status-page" data-view="consent" hidden>
+ <div class="status-panel" aria-labelledby="consent-title">
+ <div class="stack">
+ <h1 id="consent-title">Authorize Acme Portal</h1>
+ <p class="note">Acme Portal is requesting access to your Acme account.</p>
+
+ <div class="mockup-account-strip u-cluster">
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
+ <circle cx="12" cy="12" r="10" />
+ <circle cx="12" cy="10" r="3" />
+ <path d="M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662" />
</svg>
- <span>See your email address.</span>
- </li>
- </ul>
+ <span class="stack mockup-row-body">
+ <span class="mockup-row-title">Alice</span>
+ <span class="mockup-row-meta">alice@acme.test</span>
+ </span>
+ <button class="link" type="button">Not you?</button>
+ </div>
- <p class="auth-consent-footer">
- You can revoke access at any time from your account settings.
- </p>
+ <h3>This will allow Acme Portal to:</h3>
+ <ul class="mockup-scope-list stack">
+ <li class="mockup-scope u-cluster">
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
+ <path d="m5 12 5 5L20 7" />
+ </svg>
+ <span>Sign you in with your Acme account.</span>
+ </li>
+ <li class="mockup-scope u-cluster">
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
+ <path d="m5 12 5 5L20 7" />
+ </svg>
+ <span>See your name and username.</span>
+ </li>
+ <li class="mockup-scope u-cluster">
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
+ <path d="m5 12 5 5L20 7" />
+ </svg>
+ <span>See your email address.</span>
+ </li>
+ </ul>
+
+ <p class="note">
+ You can revoke access at any time from your account settings.
+ </p>
- <div class="auth-actions">
- <button class="auth-link" type="button">Deny</button>
- <button class="button" type="button">Allow access</button>
+ <div class="mockup-actions">
+ <button class="link" type="button">Deny</button>
+ <button class="button button-primary" type="button">Allow access</button>
+ </div>
</div>
</div>
</section>
- <section class="auth-page" data-view="done" hidden>
- <div class="auth-card">
- <p class="auth-realm">Acme account</p>
+ <section class="status-page" data-view="done" hidden>
+ <div class="status-panel">
+ <p class="field-label mockup-eyebrow">Acme account</p>
<h1>Signed in</h1>
- <p class="auth-note">Signed in as Alice.</p>
+ <p class="note">Signed in as Alice.</p>
</div>
</section>
- <section class="auth-page" data-view="loading" hidden aria-busy="true">
- <div class="auth-card">
- <div class="auth-spinner" aria-hidden="true"></div>
+ <section class="status-page" data-view="loading" hidden aria-busy="true">
+ <div class="status-panel">
+ <div class="spinner" aria-hidden="true"></div>
<h1>Signing in</h1>
- <p class="auth-note">Loading your sign-in options.</p>
+ <p class="note">Loading your sign-in options.</p>
</div>
</section>
- <section class="auth-page" data-view="unavailable" hidden>
- <div class="auth-status-panel">
- <svg class="auth-status-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
+ <section class="status-page" data-view="unavailable" hidden>
+ <div class="status-panel">
+ <svg class="status-icon" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="10" />
<path d="M12 8v4" />
<path d="M12 16h.01" />
</svg>
<h1>Sign-in unavailable</h1>
- <p class="auth-error" role="alert">
+ <p class="alert" role="alert">
The sign-in service could not be reached. Try again in a moment.
</p>
- <div class="auth-actions">
- <a class="button" href="#">Try again</a>
+ <div class="status-actions">
+ <a class="button button-primary" href="#">Try again</a>
</div>
</div>
</section>
diff --git a/mockup/plain/mockups.css b/mockup/plain/mockups.css
@@ -0,0 +1,471 @@
+@layer mockups {
+ /* demo chrome: the floating theme/state bar every mockup page shares */
+ .mockup-controls {
+ position: fixed;
+ right: max(var(--space-4), env(safe-area-inset-right));
+ bottom: max(var(--space-4), env(safe-area-inset-bottom));
+ z-index: 100;
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ gap: var(--space-1);
+ width: min(calc(100vw - var(--space-8)), fit-content);
+ padding: 0.375rem;
+ background: var(--sidebar);
+ color: var(--on-chrome);
+ box-shadow: var(--shadow);
+ font-size: var(--font-xs);
+ }
+
+ .mockup-label {
+ padding: 0 var(--space-2);
+ color: var(--chrome-label);
+ font-size: 0.6875rem;
+ font-weight: 600;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ }
+
+ .mockup-button {
+ padding: 0.375rem 0.625rem;
+ border: 0;
+ background: transparent;
+ color: var(--chrome-text);
+ font: inherit;
+ font-size: var(--font-xs);
+ cursor: pointer;
+ }
+
+ .mockup-button:hover {
+ background: var(--menu-hover);
+ color: var(--on-chrome);
+ }
+
+ .mockup-button.is-active {
+ background: var(--sidebar-active);
+ color: var(--on-chrome);
+ }
+
+ .mockup-separator {
+ width: 1pt;
+ height: var(--space-5);
+ margin: 0 var(--space-1);
+ background: var(--chrome-divider);
+ }
+
+ /* demo scaffolding: a section showing component states side by side */
+ .state-preview {
+ margin-block-start: var(--space-8);
+ }
+
+ .state-preview > h2 {
+ margin-block-end: var(--space-3);
+ }
+
+ /* demo stats tile row: 4-up via the framework .grid --grid-cols hook */
+ .stats {
+ --grid-cols: 4;
+ }
+
+ .stat-value {
+ display: block;
+ margin-block-start: var(--space-2);
+ font-size: var(--font-2xl);
+ font-weight: 300;
+ line-height: var(--lh-tight);
+ }
+
+ .action-row {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ gap: var(--space-2);
+ margin-block-start: var(--space-4);
+ }
+
+ /* demo tiles and swatches shown in tables and branding previews */
+ .table-icon {
+ display: grid;
+ place-items: center;
+ width: var(--space-8);
+ height: var(--space-8);
+ overflow: hidden;
+ background: var(--line);
+ color: var(--muted);
+ }
+
+ .table-icon img {
+ width: 100%;
+ height: 100%;
+ object-fit: contain;
+ }
+
+ .table-icon svg {
+ width: var(--font-xl);
+ height: var(--font-xl);
+ }
+
+ .branding-preview {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ gap: var(--space-3);
+ margin-block-start: var(--space-4);
+ }
+
+ .branding-logo-preview,
+ .branding-color-preview {
+ width: var(--space-8);
+ height: var(--space-8);
+ overflow: hidden;
+ background: var(--line);
+ }
+
+ .branding-logo-preview {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ color: var(--muted);
+ }
+
+ .branding-logo-preview svg {
+ width: var(--space-5);
+ height: var(--space-5);
+ }
+
+ .branding-logo-preview img {
+ width: 100%;
+ height: 100%;
+ object-fit: contain;
+ }
+
+ .branding-color-preview {
+ border-radius: var(--radius-sm);
+ background: var(--accent);
+ }
+
+ .branding-logo-preview.is-empty,
+ .branding-color-preview.is-empty {
+ border-bottom: 1pt solid var(--field-line);
+ }
+
+ .branding-color-preview.is-empty {
+ background: var(--line);
+ }
+
+ .branding-logo-preview .is-broken {
+ visibility: hidden;
+ }
+
+ /* small meta line under two-line table titles; inline children so the
+ cell keeps to platform layout */
+ .realm-meta {
+ display: block;
+ color: var(--muted);
+ font-size: var(--font-sm);
+ line-height: var(--lh-snug);
+ }
+
+ .realm-meta > * + * {
+ margin-inline-start: var(--space-3);
+ }
+
+ .realm-meta a {
+ color: inherit;
+ text-decoration: none;
+ }
+
+ .realm-meta a:hover {
+ color: var(--accent-text);
+ text-decoration: underline;
+ }
+
+ /* count inside a realm access link button */
+ .realm-access-count {
+ margin-inline-start: var(--space-2);
+ opacity: 0.7;
+ }
+
+ /* copy button on the read-only verification record fields */
+ .verify-record-copy {
+ justify-self: end;
+ }
+
+ .danger-zone h2 {
+ color: var(--danger-text);
+ }
+
+ /* settings forms: one column of fields that own their spacing */
+ .settings-form {
+ display: grid;
+ gap: var(--space-4);
+ margin-block-start: var(--space-4);
+ min-width: 0;
+ }
+
+ .settings-form > * {
+ margin-block-start: 0;
+ margin-block-end: 0;
+ }
+
+ /* role checklist inside a fieldset */
+ .role-field {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ }
+
+ .role-field legend {
+ margin-block-end: var(--space-2);
+ padding: 0;
+ }
+
+ /* auth mockups: eyebrow line above the panel title */
+ .mockup-eyebrow {
+ margin: 0 0 var(--space-1);
+ font-weight: 600;
+ letter-spacing: .08em;
+ text-transform: uppercase;
+ }
+
+ /* auth mockups: account chooser list */
+ .mockup-choices {
+ --stack-gap: var(--space-2);
+ }
+
+ .mockup-choice {
+ display: flex;
+ flex-direction: column;
+ align-items: flex-start;
+ justify-content: center;
+ gap: .125rem;
+ width: 100%;
+ min-height: var(--control-h);
+ padding: var(--space-3) 0;
+ border: 0;
+ border-bottom: 1pt solid var(--field-line);
+ background: none;
+ color: inherit;
+ font: inherit;
+ text-align: left;
+ cursor: pointer;
+ }
+
+ .mockup-choice:hover,
+ .mockup-choice:focus-visible {
+ border-bottom-color: var(--accent);
+ }
+
+ .mockup-choice-name {
+ font-size: var(--font-md);
+ line-height: var(--lh-base);
+ }
+
+ .mockup-choice-meta {
+ color: var(--muted);
+ font-size: var(--font-base);
+ line-height: var(--lh-base);
+ }
+
+ /* auth mockups: form actions, stacked by default, right-aligned row once wide */
+ .mockup-actions {
+ display: grid;
+ gap: var(--space-4);
+ }
+
+ .mockup-back {
+ margin-inline-end: auto;
+ }
+
+ @media (min-width: 35em) {
+ .mockup-actions {
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ gap: var(--space-6);
+ }
+ }
+
+ /* auth mockups: account strip and scope list on the consent panel */
+ .mockup-account-strip {
+ --cluster-gap: var(--space-3);
+ min-width: 0;
+ padding: var(--space-3);
+ background: var(--line-strong);
+ }
+
+ .mockup-account-strip svg {
+ flex: none;
+ width: 1.5rem;
+ height: 1.5rem;
+ }
+
+ .mockup-account-strip > :last-child {
+ flex: none;
+ margin-inline-start: auto;
+ }
+
+ .mockup-row-body {
+ --stack-gap: var(--space-1);
+ }
+
+ .mockup-row-title {
+ font-size: var(--font-base);
+ font-weight: 500;
+ line-height: var(--lh-snug);
+ }
+
+ .mockup-row-meta {
+ overflow-wrap: anywhere;
+ color: var(--muted);
+ font-size: var(--font-xs);
+ line-height: var(--lh-snug);
+ }
+
+ .mockup-scope-list {
+ --stack-gap: var(--space-2);
+ margin: 0;
+ padding: 0;
+ list-style: none;
+ }
+
+ .mockup-scope {
+ --cluster-gap: var(--space-2);
+ align-items: flex-start;
+ color: var(--muted);
+ font-size: var(--font-base);
+ line-height: var(--lh-base);
+ }
+
+ .mockup-scope svg {
+ flex: none;
+ width: 1rem;
+ height: 1rem;
+ margin-block-start: .125rem;
+ }
+
+ /* account mockup: capped reading column for stacked pages */
+ .reading-column {
+ width: 100%;
+ max-width: 56rem;
+ margin-inline: auto;
+ }
+
+ /* account mockup: manage rows (framework .card supplies the surface) */
+ .summary-row {
+ display: grid;
+ grid-template-columns: var(--space-6) minmax(0, 1fr);
+ align-items: center;
+ gap: var(--space-4);
+ color: inherit;
+ text-decoration: none;
+ cursor: pointer;
+ user-select: none;
+ }
+
+ .summary-row:hover,
+ .summary-row:active {
+ background: var(--line-strong);
+ }
+
+ .summary-row svg {
+ width: var(--space-5);
+ height: var(--space-5);
+ }
+
+ .summary-body {
+ display: grid;
+ gap: var(--space-1);
+ min-width: 0;
+ }
+
+ .summary-title {
+ font-size: var(--font-md);
+ font-weight: 500;
+ line-height: var(--lh-snug);
+ }
+
+ .summary-meta {
+ color: var(--muted);
+ font-size: var(--font-sm);
+ line-height: var(--lh-snug);
+ }
+
+ .summary-arrow {
+ display: none;
+ color: var(--muted);
+ font-size: var(--font-xl);
+ line-height: 1;
+ }
+
+ /* account mockup: panel heading with leading icon */
+ .panel-heading {
+ display: flex;
+ align-items: center;
+ gap: var(--space-3);
+ margin-block-end: var(--space-4);
+ }
+
+ .panel-heading svg {
+ flex: none;
+ width: var(--space-5);
+ height: var(--space-5);
+ }
+
+ .panel-heading h2 {
+ margin: 0;
+ }
+
+ /* account mockup: device surface rows inside panels */
+ .surface-row {
+ display: grid;
+ grid-template-columns: var(--space-6) minmax(0, 1fr);
+ align-items: center;
+ gap: var(--space-4);
+ padding: var(--space-4) var(--space-3);
+ background: var(--line);
+ }
+
+ .surface-row svg {
+ width: var(--space-5);
+ height: var(--space-5);
+ }
+
+ .surface-title {
+ display: block;
+ font-size: var(--font-md);
+ font-weight: 500;
+ line-height: var(--lh-snug);
+ }
+
+ .surface-meta {
+ display: block;
+ color: var(--muted);
+ font-size: var(--font-sm);
+ line-height: var(--lh-snug);
+ }
+
+ .surface-state {
+ grid-column: 2;
+ }
+
+ @media (min-width: 40em) {
+ .summary-row,
+ .surface-row {
+ grid-template-columns: var(--space-6) minmax(0, 1fr) auto;
+ }
+
+ .summary-arrow {
+ display: inline;
+ }
+
+ .surface-state {
+ grid-column: 3;
+ }
+ }
+
+ /* dropdown mockup: filler that makes the dialog scroll in the demo */
+ .modal-spacer {
+ min-height: 8rem;
+ }
+}
diff --git a/mockup/plain/select-menu.css b/mockup/plain/select-menu.css
@@ -1,150 +0,0 @@
-.select {
- min-width: 0;
- max-width: 100%;
- display: block;
-}
-
-.select-trigger {
- width: 100%;
- min-width: 0;
- max-width: 100%;
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 0.75rem;
- padding: 0.5rem 0.75rem;
- border: 0;
- border-bottom: 1pt solid var(--field-line);
- border-radius: 0;
- background: var(--surface);
- color: inherit;
- font: inherit;
- font-size: 0.875rem;
- line-height: 1.5;
- text-align: left;
- cursor: pointer;
-}
-
-.select-trigger:focus,
-.select-trigger:focus-visible,
-.select-trigger[aria-expanded="true"],
-.select-trigger[aria-expanded="true"]:focus-visible {
- outline: 0;
- border-bottom-color: var(--accent);
-}
-
-.select-trigger:disabled {
- color: var(--muted);
- cursor: default;
- opacity: 1;
-}
-
-.select-trigger svg {
- flex: none;
- width: 1.125rem;
- height: 1.125rem;
-}
-
-.select-value {
- min-width: 0;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-
-.select-list {
- position: fixed;
- top: 0;
- left: 0;
- z-index: 120;
- width: 10rem;
- max-width: calc(100vw - 1rem);
- max-height: min(18rem, 45vh);
- padding: 0.25rem 0;
- overflow-y: auto;
- overscroll-behavior: contain;
- background: var(--surface);
- box-shadow: var(--shadow);
- color: var(--text);
-}
-
-.select-list.is-measuring {
- visibility: hidden;
- top: 0;
- right: auto;
- bottom: auto;
- left: 0;
- width: auto;
- max-height: none;
-}
-
-.select-option {
- width: 100%;
- min-height: 2.25rem;
- display: flex;
- align-items: center;
- gap: 0;
- padding: 0.5rem 0.75rem;
- color: inherit;
- font-size: 0.875rem;
- line-height: 1.5;
- cursor: pointer;
-}
-
-.select-option-mark {
- width: 1.25rem;
- height: 1.25rem;
- flex: none;
- display: flex;
- align-items: center;
- justify-content: center;
- order: 2;
-}
-
-.select-option svg {
- width: 1.125rem;
- height: 1.125rem;
-}
-
-.select-option:not(.is-selected) .select-option-mark svg {
- visibility: hidden;
-}
-
-.select-option-label {
- min-width: 0;
- flex: 1;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-
-.select-option:hover {
- background: var(--row-hover);
-}
-
-.select-option.is-active {
- background: var(--row-hover);
-}
-
-.select-option.is-selected {
- color: var(--accent-text);
-}
-
-@media (pointer: coarse) {
- .select-trigger,
- .select-option {
- min-height: 2.75rem;
- padding-block: 0.5rem;
- touch-action: manipulation;
- }
-
- .select-trigger {
- font-size: 1rem;
- }
-}
-
-@media (min-width: 40em) {
- .realm-select .select {
- width: auto;
- }
-}
diff --git a/mockup/plain/shell.js b/mockup/plain/shell.js
@@ -30,7 +30,7 @@
return;
}
- if (!target.closest('.user-menu-item, button, a')) setOpen(false);
+ if (!target.closest('.menu-item, button, a')) setOpen(false);
});
document.addEventListener('keydown', (event) => {
diff --git a/tools/css-check/align.mjs b/tools/css-check/align.mjs
@@ -0,0 +1,435 @@
+#!/usr/bin/env node
+// Table alignment gate: zero-size inline-block baseline probes, zero spread.
+//
+// node tools/css-check/align.mjs
+// node tools/css-check/align.mjs --fixture tools/css-check/fixtures/negative-misaligned.html
+// node tools/css-check/align.mjs --url http://127.0.0.1:8080/index.html
+//
+// Options: --url, --fixture <file> (repeatable), --widths 1440,390,
+// --themes auto,light,dark, --chrome <binary>
+
+import { spawn } from 'node:child_process';
+import fs from 'node:fs';
+import os from 'node:os';
+import path from 'node:path';
+import process from 'node:process';
+
+const FIXTURE_DIR = path.join(import.meta.dirname, 'fixtures');
+
+function flagValue(name, dflt) {
+ const i = process.argv.indexOf(name);
+ return i >= 0 && process.argv[i + 1] ? process.argv[i + 1] : dflt;
+}
+
+function flagAll(name) {
+ const out = [];
+ for (let i = 0; i < process.argv.length; i += 1) {
+ if (process.argv[i] === name && process.argv[i + 1]) out.push(process.argv[i + 1]);
+ }
+ return out;
+}
+
+const CHROME = flagValue(
+ '--chrome',
+ process.env.CHROME_PATH || '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
+);
+const WIDTHS = flagValue('--widths', '1440,390').split(',').map(Number);
+const THEMES = flagValue('--themes', 'auto,light,dark').split(',');
+
+function targetList() {
+ const url = flagValue('--url', null);
+ if (url) return [{ label: url, url, negative: false }];
+ const fixtures = flagAll('--fixture');
+ if (fixtures.length) {
+ return fixtures.map((f) => {
+ const full = path.resolve(f);
+ return {
+ label: path.basename(full),
+ url: new URL(`file://${full}`).href,
+ negative: path.basename(full).startsWith('negative-'),
+ };
+ });
+ }
+ return fs
+ .readdirSync(FIXTURE_DIR)
+ .filter((f) => f.endsWith('.html'))
+ .sort()
+ .map((f) => ({
+ label: f,
+ url: new URL(`file://${path.join(FIXTURE_DIR, f)}`).href,
+ negative: f.startsWith('negative-'),
+ }));
+}
+
+const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
+
+async function waitForPort(userDir, timeoutMs = 25000) {
+ const file = path.join(userDir, 'DevToolsActivePort');
+ const deadline = Date.now() + timeoutMs;
+ while (Date.now() < deadline) {
+ if (fs.existsSync(file)) {
+ const text = fs.readFileSync(file, 'utf8').trim();
+ if (text) return text.split('\n')[0].trim();
+ }
+ await sleep(100);
+ }
+ throw new Error('chrome did not write DevToolsActivePort');
+}
+
+function connectCdp(wsUrl) {
+ const ws = new WebSocket(wsUrl);
+ const pending = new Map();
+ const eventWaiters = [];
+ let nextId = 1;
+
+ ws.addEventListener('message', (event) => {
+ const msg = JSON.parse(event.data);
+ if (msg.id && pending.has(msg.id)) {
+ const { resolve, reject } = pending.get(msg.id);
+ pending.delete(msg.id);
+ if (msg.error) reject(new Error(`${msg.error.message} (${msg.method})`));
+ else resolve(msg.result);
+ } else if (msg.method) {
+ for (let i = eventWaiters.length - 1; i >= 0; i -= 1) {
+ const w = eventWaiters[i];
+ if (w.method === msg.method) {
+ eventWaiters.splice(i, 1);
+ w.resolve(msg);
+ }
+ }
+ }
+ });
+
+ return new Promise((resolveInit, rejectInit) => {
+ ws.addEventListener('error', () => rejectInit(new Error(`cdp websocket failed: ${wsUrl}`)));
+ ws.addEventListener('open', () => {
+ resolveInit({
+ send(method, params = {}) {
+ const id = nextId;
+ nextId += 1;
+ ws.send(JSON.stringify({ id, method, params }));
+ return new Promise((resolve, reject) => pending.set(id, { resolve, reject }));
+ },
+ waitEvent(method, timeoutMs = 20000) {
+ return new Promise((resolve, reject) => {
+ const timer = setTimeout(() => reject(new Error(`timeout waiting for ${method}`)), timeoutMs);
+ eventWaiters.push({
+ method,
+ resolve: (msg) => {
+ clearTimeout(timer);
+ resolve(msg);
+ },
+ });
+ });
+ },
+ close() {
+ ws.close();
+ },
+ });
+ });
+ });
+}
+
+function measurementExpression(theme) {
+ return `
+(function () {
+ if (${JSON.stringify(theme)} === 'auto') {
+ document.documentElement.removeAttribute('data-theme');
+ } else {
+ document.documentElement.setAttribute('data-theme', ${JSON.stringify(theme)});
+ }
+ var Q = 64; // browser layout precision: multiples of 1/64 of a CSS pixel
+ function q(v) { return Math.round(v * Q); }
+
+ var out = {
+ tables: 0, rows: 0, multiCells: 0, allTallRows: 0, mode: 'none',
+ maxSpreadGrid: 0, captions: 0, fail: []
+ };
+
+ function hasBlockChild(cell) {
+ var kids = cell.children;
+ for (var i = 0; i < kids.length; i += 1) {
+ var d = window.getComputedStyle(kids[i]).display;
+ if (d !== 'inline' && d !== 'inline-block' && d !== 'none') return true;
+ }
+ return false;
+ }
+
+ function lineBands(cell) {
+ var range = document.createRange();
+ range.selectNodeContents(cell);
+ var rects = range.getClientRects();
+ var sorted = [];
+ for (var i = 0; i < rects.length; i += 1) {
+ if (rects[i].height > 0) sorted.push(rects[i]);
+ }
+ sorted.sort(function (a, b) { return a.top - b.top; });
+ var bands = 0;
+ var bottom = -Infinity;
+ for (var j = 0; j < sorted.length; j += 1) {
+ if (sorted[j].top > bottom) { bands += 1; bottom = sorted[j].bottom; }
+ else if (sorted[j].bottom > bottom) bottom = sorted[j].bottom;
+ }
+ return bands;
+ }
+
+ function probeBaseline(cell, where) {
+ var probe = document.createElement('span');
+ probe.style.cssText = 'display:inline-block;width:0;height:0;';
+ cell.appendChild(probe);
+ var rect = probe.getBoundingClientRect();
+ cell.removeChild(probe);
+ if (rect.width !== 0 || rect.height !== 0 || !isFinite(rect.bottom)) {
+ out.fail.push(where + ': probe is not a zero-size inline-block');
+ return null;
+ }
+ return rect.bottom;
+ }
+
+ var tables = document.querySelectorAll('table.table');
+ out.tables = tables.length;
+ if (!tables.length) {
+ out.fail.push('no table.table found on the page');
+ return JSON.stringify(out);
+ }
+ var tableMode = window.matchMedia('(min-width: 40em)').matches;
+ out.mode = tableMode ? 'table' : 'card';
+
+ for (var t = 0; t < tables.length; t += 1) {
+ var table = tables[t];
+ var at = 'table ' + (t + 1);
+ var rows = table.querySelectorAll('tbody tr');
+ if (!rows.length) {
+ out.fail.push(at + ': no tbody rows (degenerate table)');
+ continue;
+ }
+
+ if (tableMode) {
+ var thead = table.querySelector('thead');
+ if (!thead || window.getComputedStyle(thead).display === 'none') {
+ out.fail.push(at + ': thead is not rendered in table mode');
+ }
+ for (var r = 0; r < rows.length; r += 1) {
+ var cells = rows[r].querySelectorAll('td');
+ var baselines = [];
+ var filledCells = 0;
+ var tallCells = 0;
+ var where = at + ' row ' + (r + 1);
+ for (var c = 0; c < cells.length; c += 1) {
+ var cell = cells[c];
+ var cs = window.getComputedStyle(cell);
+ if (cs.display === 'none') continue;
+ if (cs.display !== 'table-cell') {
+ out.fail.push(where + ' cell ' + (c + 1) + ': display is "' + cs.display + '", expected table-cell');
+ }
+ var caption = window.getComputedStyle(cell, '::before').content;
+ if (cell.hasAttribute('data-label') && caption && caption !== 'none' && caption !== 'normal') {
+ out.fail.push(where + ' cell ' + (c + 1) + ': data-label caption still renders in table mode');
+ }
+ if (cell.textContent.trim() === '' && !cell.children.length) continue;
+ filledCells += 1;
+ if (hasBlockChild(cell) || lineBands(cell) > 1) {
+ out.multiCells += 1;
+ tallCells += 1;
+ continue;
+ }
+ var base = probeBaseline(cell, where + ' cell ' + (c + 1));
+ if (base !== null) baselines.push(base);
+ }
+ out.rows += 1;
+ // A row needs two single-line cells to disagree. With fewer than two
+ // non-empty cells, or no measurable content at all, it is degenerate.
+ if (filledCells < 2 || baselines.length + tallCells === 0) {
+ out.fail.push(where + ': degenerate row (' + filledCells + ' non-empty cell(s), ' + (baselines.length + tallCells) + ' measured)');
+ continue;
+ }
+ // A well-formed all-tall row centers by the UA default and has no
+ // pair of single-line cells to compare; it is exempt, not vacuous.
+ if (baselines.length < 2) {
+ out.allTallRows += 1;
+ continue;
+ }
+ var lo = Math.min.apply(null, baselines);
+ var hi = Math.max.apply(null, baselines);
+ var glo = q(lo);
+ var ghi = q(hi);
+ if (ghi - glo !== 0) {
+ out.fail.push(where + ': baseline spread = ' + (ghi - glo) + '/64 across ' + baselines.length + ' single-line cells');
+ }
+ if (ghi - glo > out.maxSpreadGrid) {
+ out.maxSpreadGrid = ghi - glo;
+ }
+ }
+ } else {
+ var thead2 = table.querySelector('thead');
+ if (thead2 && window.getComputedStyle(thead2).display !== 'none') {
+ out.fail.push(at + ': thead is visible in card mode');
+ }
+ for (var r2 = 0; r2 < rows.length; r2 += 1) {
+ var cells2 = rows[r2].querySelectorAll('td');
+ if (!cells2.length) {
+ out.fail.push(at + ' row ' + (r2 + 1) + ': no cells to stack');
+ continue;
+ }
+ out.rows += 1;
+ var trDisplay = window.getComputedStyle(rows[r2]).display;
+ if (trDisplay !== 'block') {
+ out.fail.push(at + ' row ' + (r2 + 1) + ': tr display is "' + trDisplay + '", expected block');
+ }
+ var widths = [];
+ var lastTop = -Infinity;
+ for (var c2 = 0; c2 < cells2.length; c2 += 1) {
+ var cell2 = cells2[c2];
+ var cs2 = window.getComputedStyle(cell2);
+ if (cs2.display !== 'block') {
+ out.fail.push(at + ' row ' + (r2 + 1) + ' cell ' + (c2 + 1) + ': display is "' + cs2.display + '", expected block');
+ }
+ var rect2 = cell2.getBoundingClientRect();
+ widths.push(q(rect2.width));
+ if (rect2.top < lastTop) {
+ out.fail.push(at + ' row ' + (r2 + 1) + ' cell ' + (c2 + 1) + ': not stacked below its sibling');
+ }
+ lastTop = rect2.top;
+ var label = cell2.getAttribute('data-label');
+ if (label !== null) {
+ var before = window.getComputedStyle(cell2, '::before');
+ if (before.display === 'none' || before.content !== JSON.stringify(label)) {
+ out.fail.push(at + ' row ' + (r2 + 1) + ' cell ' + (c2 + 1) + ': data-label caption "' + label + '" does not render (content ' + before.content + ')');
+ } else {
+ out.captions += 1;
+ }
+ }
+ }
+ for (var k = 1; k < widths.length; k += 1) {
+ if (widths[k] !== widths[0]) {
+ out.fail.push(at + ' row ' + (r2 + 1) + ': cells are not one full-width column');
+ break;
+ }
+ }
+ }
+ }
+ }
+ return JSON.stringify(out);
+})()
+`;
+}
+
+async function main() {
+ if (!fs.existsSync(CHROME)) {
+ console.error(`align: chrome binary not found: ${CHROME}`);
+ process.exit(1);
+ }
+ const targets = targetList();
+ const userDir = fs.mkdtempSync(path.join(os.tmpdir(), 'css-check-chrome-'));
+ const chrome = spawn(
+ CHROME,
+ [
+ '--headless=new',
+ '--disable-gpu',
+ '--hide-scrollbars',
+ '--no-first-run',
+ '--no-default-browser-check',
+ '--remote-debugging-port=0',
+ `--user-data-dir=${userDir}`,
+ 'about:blank',
+ ],
+ { stdio: 'ignore' },
+ );
+
+ let exitCode = 1;
+ try {
+ const port = await waitForPort(userDir);
+ const cdpTargets = await (await fetch(`http://127.0.0.1:${port}/json/list`)).json();
+ const page = cdpTargets.find((x) => x.type === 'page');
+ if (!page) throw new Error('no page target');
+ const cdp = await connectCdp(page.webSocketDebuggerUrl);
+
+ await cdp.send('Page.enable');
+ await cdp.send('Runtime.enable');
+
+ console.log(`align: probe gate (zero-size inline-block baseline, zero spread) widths=${WIDTHS.join(',')} themes=${THEMES.join(',')}`);
+
+ let failures = 0;
+ for (const target of targets) {
+ for (const width of WIDTHS) {
+ for (const theme of THEMES) {
+ const scheme = theme === 'dark' ? 'dark' : theme === 'light' ? 'light' : 'no-preference';
+ await cdp.send('Emulation.setDeviceMetricsOverride', {
+ width,
+ height: 900,
+ deviceScaleFactor: 1,
+ mobile: width < 500,
+ });
+ await cdp.send('Emulation.setEmulatedMedia', {
+ features: [{ name: 'prefers-color-scheme', value: scheme }],
+ });
+ const loaded = cdp.waitEvent('Page.loadEventFired');
+ await cdp.send('Page.navigate', { url: target.url });
+ await loaded;
+ await sleep(150);
+ const evaluated = await cdp.send('Runtime.evaluate', {
+ expression: measurementExpression(theme),
+ returnByValue: true,
+ });
+ if (evaluated.exceptionDetails) {
+ throw new Error(`page evaluation failed for ${target.label} at ${width}/${theme}`);
+ }
+ const m = JSON.parse(evaluated.result.value);
+ const gateRed = m.fail.length > 0 || m.tables === 0 || m.rows === 0;
+
+ const head = `${target.label} ${String(width).padStart(4)} ${theme.padEnd(4)}`;
+ const stats =
+ m.mode === 'table'
+ ? `mode=table tables=${m.tables} rows=${m.rows} multi-cells=${m.multiCells} all-tall-rows=${m.allTallRows} max-baseline-spread=${m.maxSpreadGrid}/64`
+ : `mode=card tables=${m.tables} rows=${m.rows} captions=${m.captions}`;
+
+ if (target.negative && m.mode === 'table') {
+ if (gateRed) {
+ console.log(` ${head} RED-AS-EXPECTED ${stats}`);
+ for (const f of m.fail.slice(0, 3)) console.log(` gate caught: ${f}`);
+ } else {
+ failures += 1;
+ console.log(` ${head} FAIL ${stats}`);
+ console.log(' negative-control PASSED: the baseline gate is not measuring probes');
+ }
+ } else if (gateRed) {
+ failures += 1;
+ console.log(` ${head} FAIL ${stats}`);
+ for (const f of m.fail.slice(0, 5)) console.log(` ${f}`);
+ } else {
+ console.log(` ${head} PASS ${stats}`);
+ }
+ }
+ }
+ }
+
+ if (failures) {
+ console.log(`align: FAIL (${failures} failing combination(s))`);
+ exitCode = 1;
+ } else {
+ console.log('align: PASS (all fixtures x widths x themes)');
+ exitCode = 0;
+ }
+ cdp.close();
+ } catch (err) {
+ console.error(`align: ${err && err.message ? err.message : err}`);
+ exitCode = 1;
+ } finally {
+ chrome.kill('SIGKILL');
+ await new Promise((resolve) => {
+ const timer = setTimeout(resolve, 3000);
+ chrome.once('exit', () => {
+ clearTimeout(timer);
+ resolve(null);
+ });
+ });
+ try {
+ fs.rmSync(userDir, { recursive: true, force: true, maxRetries: 10, retryDelay: 200 });
+ } catch {
+ // leftover temp profile is disposable
+ }
+ }
+ process.exit(exitCode);
+}
+
+main();
diff --git a/tools/css-check/check.mjs b/tools/css-check/check.mjs
@@ -0,0 +1,591 @@
+#!/usr/bin/env node
+// Static CSS verification for the shared framework and its consumers.
+// Dependency-free plain Node. Run from anywhere:
+// node tools/css-check/check.mjs --scope repo
+// node tools/css-check/check.mjs --scope app --app admin
+// Exit code 0 = green (warnings allowed while the transition allow-list is
+// populated), 1 = red.
+
+import fs from 'node:fs';
+import path from 'node:path';
+import process from 'node:process';
+
+const REPO = path.resolve(import.meta.dirname, '..', '..');
+
+// ---------------------------------------------------------------------------
+// transition allow-list: files that are being phased out by the migration.
+// While any of these exist, the no-copy guard runs warn-only, and token
+// violations inside them are warnings. Empty the list to make both hard.
+// ---------------------------------------------------------------------------
+const TRANSITION_ALLOW = [];
+
+const FRAMEWORK_CSS = 'app/shared/style/global.css';
+const COMPONENT_CSS_DIR = 'app/shared/component';
+const MOCKUP_DIR = 'mockup/plain';
+
+// source trees the framework governs: shared framework, consumers, mockups,
+// and this harness
+const MIGRATION_PREFIXES = ['app/', `${MOCKUP_DIR}/`, 'tools/'];
+// every source tree checked for plain-ASCII and code-comment hygiene
+const SCAN_ROOTS = ['app', 'mockup', 'tools'];
+const CSS_EXT = ['.css'];
+const CODE_EXT = ['.css', '.js', '.cjs', '.mjs', '.ts', '.tsx', '.html'];
+const SKIP_DIRS = new Set(['node_modules', 'dist', '.git']);
+
+// selectors from the old naming that must not gain new homes in mockup page
+// style blocks; the rename targets are defined by the framework instead.
+const OLD_NAME_PATTERNS = [
+ /\.(?:data-table(?:-primary|-sub|-status|-static|-wrap)?|table-panel|table-toolbar|table-search|table-actions|action-button|modal-overlay|form-field|checkbox-row|client-breadcrumb|auth-link|link-button|consent-account-link|realm-select|domain-status(?:-dot)?|provider-status|session-badge|client-badge|host-name|host-added|table-icon(?:-column)?)(?![\w-])/g,
+ /\.[\w-]+-row-action(?![\w-])/g,
+ /\.[\w-]+-stack(?![\w-])/g,
+];
+
+// register of surfaces whose source still carries non-ASCII characters:
+// any byte above 0x7F outside this list fails the build, entries that are
+// already pure ASCII are reported obsolete, and the register must stay empty
+const PREEXISTING_NON_ASCII = [];
+
+// ---------------------------------------------------------------------------
+// helpers
+// ---------------------------------------------------------------------------
+
+function rel(file) {
+ return path.relative(REPO, file).split(path.sep).join('/');
+}
+
+function walk(dir, out) {
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
+ if (SKIP_DIRS.has(entry.name)) continue;
+ const full = path.join(dir, entry.name);
+ if (entry.isDirectory()) walk(full, out);
+ else out.push(full);
+ }
+ return out;
+}
+
+function listFiles(exts) {
+ const out = [];
+ for (const root of SCAN_ROOTS) {
+ const dir = path.join(REPO, root);
+ if (!fs.existsSync(dir)) continue;
+ for (const file of walk(dir, [])) {
+ if (exts.includes(path.extname(file))) out.push(file);
+ }
+ }
+ return out.sort();
+}
+
+function scoped(files) {
+ const base = files.filter((f) => MIGRATION_PREFIXES.some((p) => rel(f).startsWith(p)));
+ if (SCOPE === 'repo') return base;
+ const prefix = `app/${APP_NAME}/`;
+ return base.filter((f) => {
+ const r = rel(f);
+ return r.startsWith(prefix) || r.startsWith('app/shared/');
+ });
+}
+
+function allowed(r) {
+ return TRANSITION_ALLOW.includes(r);
+}
+
+function stripComments(text) {
+ return text.replace(/\/\*[\s\S]*?\*\//g, ' ').replace(/<!--[\s\S]*?-->/g, ' ');
+}
+
+// blanks comments preserving byte offsets and line numbers
+function blankCommentsKeepLines(text) {
+ return text.replace(/\/\*[\s\S]*?\*\//g, (m) => m.replace(/[^\n]/g, ' '));
+}
+
+function lineAt(text, index) {
+ let line = 1;
+ for (let i = 0; i < index; i += 1) if (text.charCodeAt(i) === 10) line += 1;
+ return line;
+}
+
+// css files policed by the unit guards
+function unitGuardFiles() {
+ const files = new Set();
+ const dirs = new Set([COMPONENT_CSS_DIR]);
+ const appRoot = path.join(REPO, 'app');
+ if (fs.existsSync(appRoot)) {
+ for (const entry of fs.readdirSync(appRoot, { withFileTypes: true })) {
+ if (!entry.isDirectory()) continue;
+ for (const sub of ['src/style', 'src/assets', 'dist']) {
+ dirs.add(`app/${entry.name}/${sub}`);
+ }
+ }
+ }
+ for (const d of dirs) {
+ const full = path.join(REPO, d);
+ if (fs.existsSync(full) && fs.statSync(full).isDirectory()) {
+ for (const f of walk(full, [])) if (f.endsWith('.css')) files.add(f);
+ }
+ }
+ const fw = path.join(REPO, FRAMEWORK_CSS);
+ if (fs.existsSync(fw)) files.add(fw);
+ for (const f of TRANSITION_ALLOW) {
+ const full = path.join(REPO, f);
+ if (fs.existsSync(full)) files.add(full);
+ }
+ return [...files].sort();
+}
+
+// Minimal block parser: yields { selector, body, chain } for every style
+// rule, where chain is the list of enclosing at-rule preludes.
+function parseRules(text) {
+ const clean = stripComments(text);
+ const rules = [];
+ const stack = [];
+ let buf = '';
+ let i = 0;
+ while (i < clean.length) {
+ const ch = clean[i];
+ if (ch === '{') {
+ const prelude = buf.trim();
+ buf = '';
+ i += 1;
+ let depth = 1;
+ const start = i;
+ while (i < clean.length && depth > 0) {
+ if (clean[i] === '{') depth += 1;
+ else if (clean[i] === '}') depth -= 1;
+ i += 1;
+ }
+ const body = clean.slice(start, i - 1);
+ if (prelude.startsWith('@')) {
+ stack.push(prelude);
+ rules.push(...parseRules(body).map((r) => ({ ...r, chain: [...stack, ...r.chain] })));
+ stack.pop();
+ } else {
+ rules.push({ selector: prelude, body, chain: [...stack] });
+ }
+ continue;
+ }
+ if (ch === ';') {
+ // an at-rule statement such as an @layer order declaration
+ buf = '';
+ i += 1;
+ continue;
+ }
+ buf += ch;
+ i += 1;
+ }
+ return rules;
+}
+
+function classTokens(selector) {
+ const names = [];
+ const re = /\.([A-Za-z][A-Za-z0-9_-]*)/g;
+ // ignore attribute-selector contents to avoid false class hits
+ const plain = selector.replace(/\[[^\]]*\]/g, '');
+ let m;
+ while ((m = re.exec(plain))) names.push(m[1]);
+ return names;
+}
+
+function hasTableClass(selector) {
+ return /(^|[^-\w.])\.table(?![\w-])/.test(selector.replace(/\[[^\]]*\]/g, ''));
+}
+
+function hasCellCompound(selector) {
+ // a compound selector mentioning a td/th element, or a table part class
+ return /(^|[\s>+~])t[hd](?![\w-])/.test(selector) || hasTableClass(selector);
+}
+
+function decls(body) {
+ return body
+ .split(';')
+ .map((d) => d.trim())
+ .filter(Boolean)
+ .map((d) => {
+ const idx = d.indexOf(':');
+ return { prop: d.slice(0, idx).trim(), value: d.slice(idx + 1).trim() };
+ });
+}
+
+// comments and string literals only; regex literals are not inspected
+function htmlExtract(text) {
+ const found = [];
+ found.push(...text.match(/<!--[\s\S]*?-->/g) || []);
+ found.push(...text.match(/<script[\s\S]*?<\/script>/gi) || []);
+ return found;
+}
+
+function jsExtract(text) {
+ return text.match(
+ /\/\/[^\n]*|\/\*[\s\S]*?\*\/|"(?:[^"\\\n]|\\.)*"|'(?:[^'\\\n]|\\.)*'|`(?:[^`\\]|\\.)*`/g,
+ ) || [];
+}
+
+function cssExtract(text) {
+ return [...(text.match(/\/\*[\s\S]*?\*\//g) || []), ...(text.match(/"(?:[^"\\\n]|\\.)*"|'(?:[^'\\\n]|\\.)*'/g) || [])];
+}
+
+// ---------------------------------------------------------------------------
+// guards
+// ---------------------------------------------------------------------------
+
+const errors = [];
+const warningGroups = new Map();
+
+function addError(line) {
+ errors.push(line);
+}
+
+function addWarning(key, detail) {
+ if (!warningGroups.has(key)) warningGroups.set(key, { count: 0, examples: [] });
+ const g = warningGroups.get(key);
+ g.count += 1;
+ if (detail && g.examples.length < 3 && !g.examples.includes(detail)) g.examples.push(detail);
+}
+
+function report(file, guard, msg, hard) {
+ const line = `${rel(file)} [${guard}] ${msg}`;
+ if (hard) addError(line);
+ else addWarning(line, '');
+}
+
+const args = process.argv.slice(2);
+function flagValue(name, dflt) {
+ const i = args.indexOf(name);
+ return i >= 0 && args[i + 1] ? args[i + 1] : dflt;
+}
+const SCOPE = flagValue('--scope', 'repo');
+const APP_NAME = flagValue('--app', SCOPE === 'repo' ? null : 'admin');
+
+function main() {
+ const cssFiles = scoped(listFiles(CSS_EXT));
+ const allCode = listFiles(CODE_EXT);
+ const codeFiles =
+ SCOPE === 'repo'
+ ? allCode
+ : allCode.filter((f) => {
+ const r = rel(f);
+ return r.startsWith(`app/${APP_NAME}/`) || r.startsWith('app/shared/');
+ });
+
+ // ---- guard 1: static alignment rules -----------------------------------
+ for (const file of cssFiles) {
+ const r = rel(file);
+ const hard = !allowed(r);
+ for (const rule of parseRules(fs.readFileSync(file, 'utf8'))) {
+ const sel = rule.selector.replace(/\s+/g, ' ');
+ const mentionsTable = hasTableClass(rule.selector);
+ for (const d of decls(rule.body)) {
+ const prop = d.prop.toLowerCase();
+ const value = d.value.toLowerCase();
+ const badDisplay = prop === 'display' && /flex|grid|inline-flex|inline-grid/.test(value);
+ if ((badDisplay || prop === 'min-height') && mentionsTable) {
+ report(file, 'align', `cell rule "${sel}" declares ${d.prop}: ${d.value}`, hard);
+ }
+ if (prop === 'vertical-align') {
+ if (hasCellCompound(rule.selector)) {
+ report(file, 'align', `"${sel}" declares ${d.prop}: ${d.value}`, hard);
+ }
+ }
+ }
+ }
+ }
+
+ // ---- guard 1b: hard px and pt unit guards --------------------------------
+ for (const file of unitGuardFiles()) {
+ const r = rel(file);
+ if (SCOPE !== 'repo') {
+ const prefix = `app/${APP_NAME}/`;
+ if (!r.startsWith(prefix) && !r.startsWith('app/shared/') && !allowed(r)) continue;
+ }
+ const hard = !allowed(r);
+ const text = fs.readFileSync(file, 'utf8');
+ const clean = blankCommentsKeepLines(text);
+ const pxRe = /(?:\d+(?:\.\d+)?|\.\d+)px(?![A-Za-z0-9_-])/g;
+ let pxm;
+ while ((pxm = pxRe.exec(clean))) {
+ report(file, 'unit', `px unit on line ${lineAt(clean, pxm.index)}: "${pxm[0]}"`, hard);
+ }
+ for (const rule of parseRules(text)) {
+ for (const d of decls(rule.body)) {
+ if (!/(?:\d+(?:\.\d+)?|\.\d+)pt/.test(d.value)) continue;
+ const prop = d.prop.toLowerCase();
+ const borderish = /^(?:border|outline)/.test(prop);
+ // 1pt hairline lengths on clip, separator, and shadow properties
+ const ptTokens = d.value.match(/-?(?:\d+(?:\.\d+)?|\.\d+)pt/g) || [];
+ const allHairline = ptTokens.every((t) => t === '1pt' || t === '-1pt');
+ const hairlineGeom = /^(?:width|height|margin|box-shadow)$/.test(prop) && allHairline;
+ if (!borderish && !hairlineGeom) {
+ report(file, 'unit', `pt unit on ${d.prop}: ${d.value} (${rule.selector.replace(/\s+/g, ' ')})`, hard);
+ }
+ }
+ }
+ }
+
+ // ---- framework class inventory (for the no-copy guard) ------------------
+ const frameworkClasses = new Set();
+ const frameworkFiles = [path.join(REPO, FRAMEWORK_CSS), path.join(REPO, COMPONENT_CSS_DIR)];
+ const collectFrom = (file) => {
+ for (const rule of parseRules(fs.readFileSync(file, 'utf8'))) {
+ for (const name of classTokens(rule.selector)) {
+ // CUBE state classes are shared vocabulary, not redefinable blocks
+ if (/^(?:is|has)-/.test(name)) continue;
+ frameworkClasses.add(name);
+ }
+ }
+ };
+ const collectDir = (dir) => {
+ for (const f of walk(dir, [])) if (f.endsWith('.css')) collectFrom(f);
+ };
+ if (fs.existsSync(frameworkFiles[0])) collectFrom(frameworkFiles[0]);
+ if (fs.existsSync(frameworkFiles[1])) collectDir(frameworkFiles[1]);
+
+ // consumers = css files that are not the framework files themselves
+ const frameworkSet = new Set([
+ rel(path.join(REPO, FRAMEWORK_CSS)),
+ ...listIn(path.join(REPO, COMPONENT_CSS_DIR)),
+ ]);
+ function listIn(dir) {
+ if (!fs.existsSync(dir)) return [];
+ return walk(dir, []).filter((f) => f.endsWith('.css')).map(rel);
+ }
+ const consumers = cssFiles.filter((f) => !frameworkSet.has(rel(f)));
+
+ // no-copy guard runs warn-only repo-wide while the allow-list is populated
+ const allowAlive = TRANSITION_ALLOW.some((f) => fs.existsSync(path.join(REPO, f)));
+ const noCopyHard = !allowAlive;
+ for (const f of TRANSITION_ALLOW) {
+ if (fs.existsSync(path.join(REPO, f))) {
+ addWarning(`${f} [no-copy] transition allow-list entry still present`, noCopyHard ? 'must be deleted' : 'warn-only until deleted');
+ }
+ }
+
+ // ---- guard 2: no-copy ----------------------------------------------------
+ for (const file of consumers) {
+ const r = rel(file);
+ const text = fs.readFileSync(file, 'utf8');
+ const selectors = [];
+ for (const block of extractStyleBlocks(text, file)) {
+ selectors.push(...parseRules(block).map((x) => x.selector));
+ }
+ if (r.endsWith('.css')) {
+ for (const rule of parseRules(text)) selectors.push(rule.selector);
+ }
+ const redefined = new Set();
+ for (const selector of selectors) {
+ for (const name of classTokens(selector)) {
+ if (frameworkClasses.has(name)) redefined.add(`.${name}`);
+ }
+ }
+ if (redefined.size) {
+ report(file, 'no-copy', `redefines framework class(es): ${[...redefined].sort().join(', ')}`, noCopyHard);
+ }
+ }
+
+ // mockup page style blocks must not carry old-name selectors
+ if (SCOPE === 'repo') {
+ const htmlFiles = listFiles(['.html']).filter((f) => rel(f).startsWith(`${MOCKUP_DIR}/`));
+ for (const file of htmlFiles) {
+ const text = fs.readFileSync(file, 'utf8');
+ const hits = new Set();
+ for (const block of extractStyleBlocks(text, file)) {
+ for (const re of OLD_NAME_PATTERNS) {
+ re.lastIndex = 0;
+ let m;
+ while ((m = re.exec(block))) hits.add(m[0]);
+ }
+ }
+ if (hits.size) {
+ report(file, 'no-copy', `page style block targets old class(es): ${[...hits].sort().join(', ')}`, noCopyHard);
+ }
+ }
+ }
+
+ // ---- guard 3: tokens -----------------------------------------------------
+ for (const file of cssFiles) {
+ const r = rel(file);
+ const isFramework = r === FRAMEWORK_CSS;
+ const hard = !allowed(r);
+ const text = fs.readFileSync(file, 'utf8');
+ const rules = parseRules(stripComments(text));
+ const hexHits = [];
+ const mixHits = [];
+ const impHits = [];
+ for (const rule of rules) {
+ const layerNames = new Set(
+ rule.chain
+ .filter((c) => /^@layer\s+[A-Za-z]/.test(c) && !c.includes(','))
+ .map((c) => c.replace('@layer', '').replace('{', '').trim()),
+ );
+ const inTokenLayer = isFramework && (layerNames.has('tokens') || layerNames.has('themes'));
+ const isHiddenTail = isFramework && rule.chain.length === 0 && rule.selector.replace(/\s/g, '') === '[hidden]';
+ const oneLine = rule.selector.replace(/\s+/g, ' ');
+ for (const d of decls(rule.body)) {
+ const prop = d.prop;
+ const value = d.value.replace(/\s+/g, ' ');
+ if (prop.startsWith('--')) {
+ // custom property definitions are the token channel: literal colors
+ // are allowed there until the consumer sheets move into the layers
+ } else if (/(^|[\s,;(])#[0-9a-fA-F]{3,8}\b/.test(value)) {
+ if (!inTokenLayer) hexHits.push(`${prop}: ${value} (${oneLine})`);
+ }
+ if (/color-mix\(/i.test(value) && !/color-mix\(\s*in\s+oklch/i.test(value)) {
+ mixHits.push(`${prop}: ${value} (${oneLine})`);
+ }
+ if (/!important/i.test(value) && !isHiddenTail) {
+ impHits.push(`${prop}: ${value} (${oneLine})`);
+ }
+ }
+ }
+ for (const hit of dedupe(hexHits)) report(file, 'token', `hex literal outside the token layers: ${hit}`, hard);
+ for (const hit of dedupe(mixHits)) report(file, 'token', `color-mix must mix in oklch: ${hit}`, hard);
+ for (const hit of dedupe(impHits)) report(file, 'token', `!important outside the unlayered [hidden] tail: ${hit}`, hard);
+ }
+
+ // ---- guard 4: layers -----------------------------------------------------
+ // order-statement uniqueness is checked across every stylesheet in the repo
+ const orderStatements = [];
+ for (const file of listFiles(CSS_EXT)) {
+ const text = stripComments(fs.readFileSync(file, 'utf8'));
+ const re = /@layer\s+[^{;]+;/g;
+ let m;
+ while ((m = re.exec(text))) {
+ const line = text.slice(0, m.index).split('\n').length;
+ orderStatements.push({ file, line, text: m[0] });
+ }
+ }
+ if (SCOPE === 'repo') {
+ if (orderStatements.length !== 1) {
+ errors.push(`layer: expected exactly 1 @layer order statement repo-wide, found ${orderStatements.length}`);
+ }
+ const fw = path.join(REPO, FRAMEWORK_CSS);
+ const fwLine = orderStatements.find((s) => s.file === fw);
+ if (orderStatements.length === 1 && fwLine && fwLine.line !== 1) {
+ errors.push(`layer: the @layer order statement must be the first line of ${FRAMEWORK_CSS}, found on line ${fwLine.line}`);
+ }
+ } else if (orderStatements.some((s) => rel(s.file) !== FRAMEWORK_CSS)) {
+ for (const s of orderStatements) {
+ if (rel(s.file) !== FRAMEWORK_CSS) {
+ errors.push(`${rel(s.file)} [layer] duplicate @layer order statement: ${s.text}`);
+ }
+ }
+ }
+ for (const file of cssFiles) {
+ const r = rel(file);
+ if (allowed(r) || r === FRAMEWORK_CSS) continue;
+ const text = stripComments(fs.readFileSync(file, 'utf8'));
+ const re = /@layer\s+([\w-]+(?:\s*,\s*[\w-]+)*)\s*\{/g;
+ let m;
+ while ((m = re.exec(text))) {
+ const names = m[1].split(',').map((n) => n.trim());
+ const isComponent = r.startsWith(`${COMPONENT_CSS_DIR}/`);
+ const permitted = isComponent ? ['components'] : ['apps', 'mockups'];
+ for (const n of names) {
+ if (!permitted.includes(n)) {
+ errors.push(`${r} [layer] consumer stylesheet uses @layer ${n} (permitted: ${permitted.join('/')})`);
+ }
+ }
+ }
+ }
+ // consumers without a layer wrapper: warn until the app sheets are moved
+ if (allowAlive) {
+ for (const file of consumers) {
+ const r = rel(file);
+ if (allowed(r)) continue;
+ if (!r.startsWith('app/') && !r.startsWith(`${MOCKUP_DIR}/`)) continue;
+ const text = stripComments(fs.readFileSync(file, 'utf8'));
+ if (!/@layer\s+[\w-]+\s*\{/.test(text)) {
+ addWarning(`${r} [layer] consumer stylesheet is unlayered`, 'transition: app sheets move into @layer apps');
+ }
+ }
+ }
+
+ // ---- guard 5: source hygiene --------------------------------------------
+ const nonAscii = (buf) => {
+ const hits = [];
+ for (let i = 0; i < buf.length; i += 1) {
+ if (buf[i] > 0x7f) hits.push({ i, b: buf[i] });
+ }
+ return hits;
+ };
+ for (const file of codeFiles) {
+ const r = rel(file);
+ const buf = fs.readFileSync(file);
+ const hits = nonAscii(buf);
+ if (hits.length) {
+ const detail = `${hits.length} byte(s), first 0x${hits[0].b.toString(16)} at offset ${hits[0].i}`;
+ if (PREEXISTING_NON_ASCII.includes(r)) {
+ addWarning(`${r} [hygiene] preexisting non-ASCII characters in user copy`, `transition: fix when this surface migrates (${detail})`);
+ } else {
+ addError(`${r} [hygiene] non-ASCII: ${detail}`);
+ }
+ } else if (PREEXISTING_NON_ASCII.includes(r)) {
+ addWarning(`${r} [hygiene] register entry obsolete`, 'file is pure ASCII now; remove it from the register');
+ }
+ const text = buf.toString('latin1');
+ const ext = path.extname(file);
+ let snippets = [];
+ if (ext === '.css') snippets = cssExtract(text);
+ else if (ext === '.html') snippets = htmlExtract(text);
+ else snippets = jsExtract(text);
+ for (const s of snippets) {
+ if (/\.(md|rst)\b/i.test(s) || /\bsection\s+\d/i.test(s) || /CSS[-_]FRAMEWORK/i.test(s) ||
+ /\b(?:see|per|according to|follow(?:s|ing)?)\s+the\s+spec(?:ification)?\b/i.test(s)) {
+ errors.push(`${r} [hygiene] document or spec reference inside code: ${s.slice(0, 60)}`);
+ break;
+ }
+ }
+ // class-name tokens
+ const bad = [];
+ if (ext === '.css') {
+ for (const rule of parseRules(text)) {
+ for (const name of classTokens(rule.selector)) {
+ if (name.includes('__') || name.includes('--')) bad.push(`.${name}`);
+ }
+ }
+ } else {
+ const attr = /class(?:Name)?\s*[:=]\s*["']([^"']+)["']/g;
+ let m;
+ while ((m = attr.exec(text))) {
+ for (const tok of m[1].split(/\s+/)) {
+ if (tok.includes('__') || tok.includes('--')) bad.push(tok);
+ }
+ }
+ const cl = /classList\.(?:add|remove|toggle)\(\s*["']([^"']+)["']/g;
+ while ((m = cl.exec(text))) {
+ for (const tok of m[1].split(/\s+/)) {
+ if (tok.includes('__') || tok.includes('--')) bad.push(tok);
+ }
+ }
+ }
+ if (bad.length) {
+ errors.push(`${r} [hygiene] class names with double-underscore or double-hyphen: ${[...new Set(bad)].join(', ')}`);
+ }
+ }
+
+ // ---- summary --------------------------------------------------------------
+ console.log(`css-check: scope=${SCOPE === 'repo' ? 'repo' : `app/${APP_NAME}`} files(css)=${cssFiles.length} files(code)=${codeFiles.length}`);
+ let warnCount = 0;
+ for (const [key, g] of warningGroups) {
+ warnCount += g.count;
+ const extra = g.examples.length ? `: ${g.examples.join('; ')}` : '';
+ console.log(` warn: ${key}${g.count > 1 ? ` (x${g.count})` : ''}${extra}`);
+ }
+ for (const e of errors) console.log(` FAIL: ${e}`);
+ console.log(`css-check: ${errors.length} error(s), ${warnCount} warning(s)`);
+ console.log(`css-check: no-copy guard runs ${noCopyHard ? 'HARD (allow-list empty)' : 'warn-only (transition allow-list active)'}`);
+ process.exit(errors.length ? 1 : 0);
+}
+
+function dedupe(list) {
+ return [...new Set(list)];
+}
+
+function extractStyleBlocks(text, file) {
+ if (!file.endsWith('.html')) return [];
+ const blocks = [];
+ const re = /<style[^>]*>([\s\S]*?)<\/style>/gi;
+ let m;
+ while ((m = re.exec(text))) blocks.push(m[1]);
+ return blocks;
+}
+
+main();
diff --git a/tools/css-check/fixtures/email-domains.html b/tools/css-check/fixtures/email-domains.html
@@ -0,0 +1,83 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width,initial-scale=1">
+ <title>email domains table fixture</title>
+ <link rel="stylesheet" href="../../../app/shared/style/global.css">
+ </head>
+ <body>
+ <main class="content">
+ <section class="card" aria-label="Realm email domains">
+ <div class="toolbar toolbar-panel">
+ <div class="toolbar-search">
+ <input
+ type="search"
+ aria-label="Search email domains"
+ placeholder="Search email domains"
+ >
+ </div>
+ <div class="toolbar-actions">
+ <button class="button button-primary" type="button">Add email domain</button>
+ </div>
+ </div>
+
+ <table class="table table-fixed">
+ <thead>
+ <tr>
+ <th scope="col">Domain</th>
+ <th scope="col">Status</th>
+ <th scope="col">Actions</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td data-label="Domain">
+ <span class="table-mono">acme.test</span>
+ </td>
+ <td data-label="Status">
+ <span class="status status-warn">
+ <span class="status-dot" aria-hidden="true"></span>
+ Pending verification
+ </span>
+ </td>
+ <td data-label="Actions">
+ <button class="button-inline" type="button">Verify</button>
+ <button class="button-inline button-danger" type="button">Remove</button>
+ </td>
+ </tr>
+ <tr>
+ <td data-label="Domain">
+ <span class="table-mono">widgets.example.org</span>
+ </td>
+ <td data-label="Status">
+ <span class="status">
+ <span class="status-dot" aria-hidden="true"></span>
+ Verified
+ </span>
+ </td>
+ <td data-label="Actions">
+ <button class="button-inline button-danger" type="button">Remove</button>
+ </td>
+ </tr>
+ <tr>
+ <td data-label="Domain">
+ <span class="table-mono">a-really-long-domain-name-for-boundary-checking.enterprise.test</span>
+ </td>
+ <td data-label="Status">
+ <span class="status status-warn">
+ <span class="status-dot" aria-hidden="true"></span>
+ Pending verification
+ </span>
+ </td>
+ <td data-label="Actions">
+ <button class="button-inline" type="button">Verify</button>
+ <button class="button-inline button-danger" type="button">Remove</button>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </section>
+ </main>
+ </body>
+</html>
diff --git a/tools/css-check/fixtures/negative-degenerate.html b/tools/css-check/fixtures/negative-degenerate.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width,initial-scale=1">
+ <title>degenerate rows control fixture</title>
+ <link rel="stylesheet" href="../../../app/shared/style/global.css">
+ </head>
+ <body>
+ <!-- negative control: row 1 has a single cell, row 2's cells are two-line; no row has two measurable cells -->
+ <main class="content">
+ <section class="card" aria-label="Degenerate rows">
+ <table class="table">
+ <thead>
+ <tr>
+ <th scope="col">Name</th>
+ <th scope="col">Status</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td data-label="Name">only-one-cell.test</td>
+ </tr>
+ <tr>
+ <td data-label="Name">
+ <span class="table-title">first-stack</span>
+ <span class="table-sub">two lines are not measurable</span>
+ </td>
+ <td data-label="Status">
+ <span class="table-title">second-stack</span>
+ <span class="table-sub">two lines are not measurable</span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </section>
+ </main>
+ </body>
+</html>
diff --git a/tools/css-check/fixtures/negative-misaligned.html b/tools/css-check/fixtures/negative-misaligned.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width,initial-scale=1">
+ <title>misaligned baseline control fixture</title>
+ <link rel="stylesheet" href="../../../app/shared/style/global.css">
+ </head>
+ <body>
+ <!-- negative control: row 2 sets font-size on the td and vertical-align: top beside a two-line cell -->
+ <main class="content">
+ <section class="card" aria-label="Alignment control">
+ <table class="table">
+ <thead>
+ <tr>
+ <th scope="col">Name</th>
+ <th scope="col">Status</th>
+ <th scope="col">Added</th>
+ <th scope="col">Actions</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td data-label="Name"><span class="table-mono">aligned.test</span></td>
+ <td data-label="Status">
+ <span class="status">
+ <span class="status-dot" aria-hidden="true"></span>
+ Verified
+ </span>
+ </td>
+ <td data-label="Added">2026-01-02</td>
+ <td data-label="Actions">
+ <button class="button-inline" type="button">Edit</button>
+ </td>
+ </tr>
+ <tr>
+ <td data-label="Name" style="font-size: .75rem"><span class="table-mono">shrunk-strut.test</span></td>
+ <td data-label="Status">
+ <span class="status">
+ <span class="status-dot" aria-hidden="true"></span>
+ Verified
+ </span>
+ </td>
+ <td data-label="Added" style="vertical-align: top">2026-01-02</td>
+ <td data-label="Actions">
+ <span class="table-title">row-height-driver</span>
+ <span class="table-sub">a second line makes the row taller</span>
+ <button class="button-inline" type="button">Edit</button>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </section>
+ </main>
+ </body>
+</html>
diff --git a/tools/css-check/fixtures/two-line-rows.html b/tools/css-check/fixtures/two-line-rows.html
@@ -0,0 +1,94 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width,initial-scale=1">
+ <title>two-line primary rows fixture</title>
+ <link rel="stylesheet" href="../../../app/shared/style/global.css">
+ </head>
+ <body>
+ <main class="content">
+ <section class="card" aria-label="Clients">
+ <table class="table table-fixed">
+ <thead>
+ <tr>
+ <th scope="col">Client</th>
+ <th scope="col">Realm URL</th>
+ <th scope="col">Status</th>
+ <th scope="col">Actions</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td data-label="Client">
+ <span class="table-title">acme-web</span>
+ <span class="table-sub">urn:ietf:params:oauth:client-Id:acme-web</span>
+ </td>
+ <td data-label="Realm URL">
+ <span class="table-mono">https://acme.test/auth/realms/main</span>
+ </td>
+ <td data-label="Status">
+ <span class="status">
+ <span class="status-dot" aria-hidden="true"></span>
+ Enabled
+ </span>
+ </td>
+ <td data-label="Actions">
+ <button class="button-inline" type="button">Edit</button>
+ <button class="button-inline button-danger" type="button">Delete</button>
+ </td>
+ </tr>
+ <tr>
+ <td data-label="Client">
+ <span class="table-title">widgets-portal</span>
+ <span class="table-sub">urn:ietf:params:oauth:client-Id:widgets-portal</span>
+ </td>
+ <td data-label="Realm URL">
+ <span class="table-mono">https://widgets.example.org/auth/realms/public</span>
+ </td>
+ <td data-label="Status">
+ <span class="status status-warn">
+ <span class="status-dot" aria-hidden="true"></span>
+ Disabled
+ </span>
+ </td>
+ <td data-label="Actions">
+ <button class="button-inline" type="button">Edit</button>
+ </td>
+ </tr>
+ <tr>
+ <td data-label="Client">plain single-line row control</td>
+ <td data-label="Realm URL">
+ <span class="table-mono">https://plain.test/auth</span>
+ </td>
+ <td data-label="Status">
+ <span class="status">Enabled</span>
+ </td>
+ <td data-label="Actions">
+ <button class="button-inline" type="button">Edit</button>
+ </td>
+ </tr>
+ <tr>
+ <td data-label="Client">
+ <span class="table-title">a-client-with-a-very-long-name-that-wraps</span>
+ <span class="table-sub">urn:ietf:params:oauth:client-Id:a-client-with-a-very-long-name-that-wraps</span>
+ </td>
+ <td data-label="Realm URL">
+ <span class="table-mono">https://long.test/auth/realms/deep</span>
+ </td>
+ <td data-label="Status">
+ <span class="status">
+ <span class="status-dot" aria-hidden="true"></span>
+ Enabled
+ </span>
+ </td>
+ <td data-label="Actions">
+ <button class="button-inline" type="button">Edit</button>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </section>
+ </main>
+ </body>
+</html>