auth

Main authentication module for my projects
git clone git://git.finwo.net/app/auth
Log | Files | Refs

commit 5772374a4b7b8e74cc19aaf3123b47945ed56fdc
parent 67c94bc186b746e682d805b66187dabcd44a5916
Author: finwo <finwo@pm.me>
Date:   Wed, 18 Nov 2026 23:26:24 +0100

css: land T7 framework barrier (menu consumption, status scaffold, grid, strict guards)

Diffstat:
Mapp/account/src/style/account.css | 10----------
Mapp/admin/src/style/admin.css | 20--------------------
Mapp/shared/component/status-page.tsx | 4++--
Mapp/shared/style/global.css | 62++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mmockup/plain/account.html | 35++++++++++++++++++-----------------
Mmockup/plain/admin-client-detail.html | 39++++++++++++++++++++-------------------
Mmockup/plain/admin-clients.html | 39++++++++++++++++++++-------------------
Mmockup/plain/admin-dashboard.html | 39++++++++++++++++++++-------------------
Mmockup/plain/admin-realm-email-domains.html | 43++++++++++++++++++++++---------------------
Mmockup/plain/admin-realm-hosts.html | 43++++++++++++++++++++++---------------------
Mmockup/plain/admin-realms.html | 43++++++++++++++++++++++---------------------
Mmockup/plain/admin-settings.html | 43++++++++++++++++++++++---------------------
Mmockup/plain/admin-system-settings.html | 39++++++++++++++++++++-------------------
Mmockup/plain/admin-user-detail.html | 39++++++++++++++++++++-------------------
Mmockup/plain/admin-user-global-detail.html | 39++++++++++++++++++++-------------------
Mmockup/plain/admin-users.html | 39++++++++++++++++++++-------------------
Dmockup/plain/global.css | 1469-------------------------------------------------------------------------------
Mmockup/plain/mockups.css | 156+------------------------------------------------------------------------------
Dmockup/plain/select-menu.css | 150-------------------------------------------------------------------------------
Mmockup/plain/shell.js | 2+-
Mtools/css-check/align.mjs | 19++++++++++++++++---
Mtools/css-check/check.mjs | 5+----
Mtools/css-check/fixtures/email-domains.html | 10+++++-----
Mtools/css-check/fixtures/two-line-rows.html | 8++++----
24 files changed, 338 insertions(+), 2057 deletions(-)

diff --git a/app/account/src/style/account.css b/app/account/src/style/account.css @@ -1,11 +1,5 @@ @layer apps { /* overview panel pair: one column, two-up at desktop */ - .grid { - display: grid; - grid-template-columns: minmax(0, 1fr); - gap: var(--space-4); - } - /* stacked pages: capped reading column, full width on small screens */ .reading-column { width: 100%; @@ -111,10 +105,6 @@ } @media (min-width: 40em) { - .grid { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } - .summary-row, .surface-row { grid-template-columns: var(--space-6) minmax(0, 1fr) auto; diff --git a/app/admin/src/style/admin.css b/app/admin/src/style/admin.css @@ -1,16 +1,4 @@ @layer apps { - .grid { - display: grid; - grid-template-columns: minmax(0, 1fr); - gap: var(--space-4); - } - - .field-grid { - display: grid; - grid-template-columns: minmax(0, 1fr); - gap: var(--space-4); - } - /* block stack where the grid gap owns all rhythm: form columns, panel interiors, and runs of members that carry their own margins */ .stack-tight { @@ -19,19 +7,11 @@ min-width: 0; } - .field-grid > *, .stack-tight > * { margin-block-start: 0; margin-block-end: 0; } - @media (min-width: 40em) { - .grid, - .field-grid { - grid-template-columns: repeat(2, minmax(0, 1fr)); - } - } - /* borderless grouping fieldset: the legend is a .field-label */ .fieldset { min-inline-size: 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/style/global.css b/app/shared/style/global.css @@ -944,6 +944,68 @@ font-weight: 500; line-height: var(--lh-snug); } .card { padding: var(--space-6); background: var(--surface); box-shadow: var(--shadow); } + /* 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); + } + + .status-panel { + width: min(calc(100% - var(--space-8)), 28rem); + padding: var(--space-8); + background: var(--surface); + box-shadow: var(--shadow); + } + + .status-icon { + width: var(--space-8); + height: var(--space-8); + margin-block-end: var(--space-4); + } + + .status-actions { + display: grid; + gap: var(--space-4); + margin-block-start: var(--space-6); + } + + @media (min-width: 35em) { + .status-actions { + display: flex; + align-items: center; + justify-content: flex-end; + } + } + + .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); + } + + .grid > *, + .field-grid > * { + margin-block-start: 0; + margin-block-end: 0; + } + + @media (min-width: 40em) { + .grid, + .field-grid { + grid-template-columns: repeat(var(--grid-cols, 2), minmax(0, 1fr)); + } + } + /* modal: bottom sheet by default, centered dialog at 40em+ */ .overlay { position: fixed; diff --git a/mockup/plain/account.html b/mockup/plain/account.html @@ -5,6 +5,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" /> <title>Account mockup</title> <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> @@ -32,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" /> @@ -59,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" /> @@ -106,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" /> @@ -124,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" /> diff --git a/mockup/plain/admin-client-detail.html b/mockup/plain/admin-client-detail.html @@ -5,6 +5,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" /> <title>Admin client detail mockup</title> <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> @@ -19,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" /> @@ -53,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" /> @@ -125,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" /> @@ -150,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" /> diff --git a/mockup/plain/admin-clients.html b/mockup/plain/admin-clients.html @@ -6,6 +6,7 @@ <title>Admin clients mockup</title> <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> @@ -20,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" /> @@ -54,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" /> @@ -126,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" /> @@ -151,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" /> diff --git a/mockup/plain/admin-dashboard.html b/mockup/plain/admin-dashboard.html @@ -5,6 +5,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" /> <title>Admin dashboard mockup</title> <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> @@ -19,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" /> @@ -53,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" /> @@ -125,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" /> @@ -150,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" /> diff --git a/mockup/plain/admin-realm-email-domains.html b/mockup/plain/admin-realm-email-domains.html @@ -6,6 +6,7 @@ <title>Admin realm email domains mockup</title> <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> @@ -20,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" /> @@ -54,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" /> @@ -126,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" /> @@ -151,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" /> @@ -681,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 @@ -6,6 +6,7 @@ <title>Admin realm hosts mockup</title> <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> @@ -20,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" /> @@ -54,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" /> @@ -126,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" /> @@ -151,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" /> @@ -630,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 @@ -5,6 +5,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" /> <title>Admin realms mockup</title> <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> @@ -19,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" /> @@ -53,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" /> @@ -125,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" /> @@ -150,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" /> @@ -676,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; }); diff --git a/mockup/plain/admin-settings.html b/mockup/plain/admin-settings.html @@ -6,6 +6,7 @@ <title>Admin realm settings mockup</title> <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> @@ -20,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" /> @@ -54,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" /> @@ -126,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" /> @@ -151,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" /> @@ -575,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 @@ -5,6 +5,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" /> <title>Admin system settings mockup</title> <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> @@ -19,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" /> @@ -53,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" /> @@ -125,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" /> @@ -150,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" /> diff --git a/mockup/plain/admin-user-detail.html b/mockup/plain/admin-user-detail.html @@ -6,6 +6,7 @@ <title>Admin user detail mockup</title> <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> @@ -20,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" /> @@ -54,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" /> @@ -126,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" /> @@ -151,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" /> diff --git a/mockup/plain/admin-user-global-detail.html b/mockup/plain/admin-user-global-detail.html @@ -5,6 +5,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" /> <title>Admin global user detail mockup</title> <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> @@ -19,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" /> @@ -53,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" /> @@ -125,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" /> @@ -150,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" /> diff --git a/mockup/plain/admin-users.html b/mockup/plain/admin-users.html @@ -6,6 +6,7 @@ <title>Admin users mockup</title> <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> @@ -20,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" /> @@ -54,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" /> @@ -126,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" /> @@ -151,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" /> 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/mockups.css b/mockup/plain/mockups.css @@ -62,147 +62,7 @@ margin-block-end: var(--space-3); } - /* demo chrome: the topbar account menu */ - .user-menu { - position: relative; - display: none; - } - - @media (min-width: 60em) { - .user-menu { - display: block; - } - } - - .user-menu summary { - display: grid; - place-items: center; - width: 2.25rem; - height: 2.25rem; - color: var(--chrome-toggle); - 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: var(--on-chrome); - } - - .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)); - background: var(--sidebar); - color: var(--on-chrome); - box-shadow: var(--shadow); - } - - .user-summary { - display: grid; - gap: 0.125rem; - padding: 0.875rem 1rem; - } - - .user-name { - font-size: var(--font-base); - font-weight: 500; - line-height: var(--lh-snug); - } - - .user-meta { - color: var(--chrome-label); - font-size: var(--font-xs); - line-height: var(--lh-snug); - } - - .user-menu-list { - display: flex; - flex-direction: column; - padding: 0.5rem 0; - } - - .user-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; - } - - .user-menu-value { - margin-inline-start: auto; - color: var(--chrome-label); - font-size: var(--font-xs); - } - - .user-menu-item svg { - flex: none; - width: var(--font-xl); - height: var(--font-xl); - } - - .user-menu-item:hover { - background: var(--menu-hover); - color: var(--on-chrome); - } - - .mobile-nav-account { - margin: 0 var(--space-6) calc(var(--space-4) + env(safe-area-inset-bottom)); - } - - .mobile-nav-account .user-summary { - padding-inline: 0; - } - - .mobile-nav-account .user-menu-list { - padding: 0; - } - - /* demo layout: multi-column panels, fields, and tiles */ - .grid { - display: grid; - grid-template-columns: minmax(0, 1fr); - gap: var(--space-4); - margin-block-start: var(--space-4); - } - - @media (min-width: 40em) { - .grid { - grid-template-columns: repeat(var(--grid-cols, 2), minmax(0, 1fr)); - } - } - - .grid > * { - margin-block-end: 0; - } - + /* demo stats tile row: 4-up via the framework .grid --grid-cols hook */ .stats { --grid-cols: 4; } @@ -608,18 +468,4 @@ .modal-spacer { min-height: 8rem; } - - @media (pointer: coarse) { - .user-menu summary { - min-width: var(--control-h); - width: var(--control-h); - height: var(--control-h); - touch-action: manipulation; - } - - .user-menu-item { - min-height: var(--control-h); - touch-action: manipulation; - } - } } 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 @@ -142,7 +142,7 @@ function measurementExpression(theme) { function q(v) { return Math.round(v * Q); } var out = { - tables: 0, rows: 0, multiCells: 0, mode: 'none', + tables: 0, rows: 0, multiCells: 0, allTallRows: 0, mode: 'none', maxSpreadGrid: 0, captions: 0, fail: [] }; @@ -212,6 +212,8 @@ function measurementExpression(theme) { 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]; @@ -224,16 +226,27 @@ function measurementExpression(theme) { 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.fail.push(where + ': fewer than 2 measurable single-line cells (degenerate row)'); + out.allTallRows += 1; continue; } var lo = Math.min.apply(null, baselines); @@ -367,7 +380,7 @@ async function main() { 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} max-baseline-spread=${m.maxSpreadGrid}/64` + ? `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') { diff --git a/tools/css-check/check.mjs b/tools/css-check/check.mjs @@ -17,10 +17,7 @@ const REPO = path.resolve(import.meta.dirname, '..', '..'); // 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 = [ - 'mockup/plain/global.css', - 'mockup/plain/select-menu.css', -]; +const TRANSITION_ALLOW = []; const FRAMEWORK_CSS = 'app/shared/style/global.css'; const COMPONENT_CSS_DIR = 'app/shared/component'; diff --git a/tools/css-check/fixtures/email-domains.html b/tools/css-check/fixtures/email-domains.html @@ -26,8 +26,8 @@ <thead> <tr> <th scope="col">Domain</th> - <th scope="col" style="--col-w: 14rem">Status</th> - <th scope="col" style="--col-w: 14rem">Actions</th> + <th scope="col">Status</th> + <th scope="col">Actions</th> </tr> </thead> <tbody> @@ -43,7 +43,7 @@ </td> <td data-label="Actions"> <button class="button-inline" type="button">Verify</button> - <button class="button-inline button-inline-danger" type="button">Remove</button> + <button class="button-inline button-danger" type="button">Remove</button> </td> </tr> <tr> @@ -57,7 +57,7 @@ </span> </td> <td data-label="Actions"> - <button class="button-inline button-inline-danger" type="button">Remove</button> + <button class="button-inline button-danger" type="button">Remove</button> </td> </tr> <tr> @@ -72,7 +72,7 @@ </td> <td data-label="Actions"> <button class="button-inline" type="button">Verify</button> - <button class="button-inline button-inline-danger" type="button">Remove</button> + <button class="button-inline button-danger" type="button">Remove</button> </td> </tr> </tbody> diff --git a/tools/css-check/fixtures/two-line-rows.html b/tools/css-check/fixtures/two-line-rows.html @@ -13,9 +13,9 @@ <thead> <tr> <th scope="col">Client</th> - <th scope="col" style="--col-w: 16rem">Realm URL</th> - <th scope="col" style="--col-w: 14rem">Status</th> - <th scope="col" style="--col-w: 10rem">Actions</th> + <th scope="col">Realm URL</th> + <th scope="col">Status</th> + <th scope="col">Actions</th> </tr> </thead> <tbody> @@ -35,7 +35,7 @@ </td> <td data-label="Actions"> <button class="button-inline" type="button">Edit</button> - <button class="button-inline button-inline-danger" type="button">Delete</button> + <button class="button-inline button-danger" type="button">Delete</button> </td> </tr> <tr>