Add Dock icon pack and polish controls and navigation geometry
This commit is contained in:
1 parent
ef98c2835b
commit
99156ed011
161 files changed
+1438
-54
No files matched your search
@@ -6,6 +6,8 @@
|
||||
|
||||
Навигация Dock: выбранный пункт сохраняет цвет при наведении. Переход по меню сохраняет раскрытую панель и режим открытия (hover или закрепление); Escape, подложка и уход мыши из hover-меню закрывают её.
|
||||
|
||||
Иконки: только icons/icons.js, SVG 24×24 со stroke 1.5 и круглыми окончаниями. В Dock ось значка совпадает с центром подложки и аватара; при раскрытии значок не сдвигается. Клавиатурный фокус внутри панели рисуется с inset 2px. Табличные checkbox центрируются по высоте строки; disabled-кнопки не получают hover-фон.
|
||||
|
||||
Исполняемые образцы: экран Components; таблица и фильтры — Users; вкладки — Settings; вход — Authentication. Основная стилизация в `system.css`.
|
||||
|
||||
| Компонент | Состояния и взаимодействия |
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { concepts, tokensFor, cssVars } from "../concepts/registry.js";
|
||||
import { iconNames } from "../icons/icons.js";
|
||||
function zip(files) {
|
||||
const enc = new TextEncoder();
|
||||
let offset = 0;
|
||||
@@ -12,7 +13,7 @@ function zip(files) {
|
||||
u16(v, n >>> 16);
|
||||
};
|
||||
for (const [name, content] of Object.entries(files)) {
|
||||
const bytes = enc.encode(content),
|
||||
const bytes = content instanceof Uint8Array ? content : enc.encode(content),
|
||||
nb = enc.encode(name);
|
||||
let crc = -1;
|
||||
for (const b of bytes) {
|
||||
@@ -92,6 +93,17 @@ export async function exportSystem(
|
||||
};
|
||||
const files = {};
|
||||
const paths = [
|
||||
"icons/icons.js",
|
||||
"icons/index.html",
|
||||
"icons/catalog.css",
|
||||
"icons/catalog.js",
|
||||
"icons/manifest.json",
|
||||
"icons/README.md",
|
||||
"icons/sprite.svg",
|
||||
"icons/preview-light.svg",
|
||||
"icons/preview-dark.svg",
|
||||
"icons/anidev-dock-icons.zip",
|
||||
...iconNames.map((name) => `icons/svg/${name}.svg`),
|
||||
"components/system.css",
|
||||
"components/export-system.js",
|
||||
"components/account-pages.js",
|
||||
@@ -113,7 +125,12 @@ export async function exportSystem(
|
||||
paths.map(async (p) => {
|
||||
const r = await fetch(new URL(p, new URL("../", import.meta.url)));
|
||||
if (!r.ok) throw Error(p);
|
||||
return [p, await r.text()];
|
||||
return [
|
||||
p,
|
||||
p.endsWith(".zip")
|
||||
? new Uint8Array(await r.arrayBuffer())
|
||||
: await r.text(),
|
||||
];
|
||||
}),
|
||||
);
|
||||
for (const [p, t] of fetched) files[p] = t;
|
||||
|
||||
+64
-19
@@ -47,10 +47,10 @@ button {
|
||||
line-height: 1.3;
|
||||
transition: background var(--motion-duration);
|
||||
}
|
||||
button:hover {
|
||||
button:hover:not(:disabled) {
|
||||
background: color-mix(in srgb, var(--color-accent) 10%, var(--color-surface));
|
||||
}
|
||||
button:active {
|
||||
button:active:not(:disabled) {
|
||||
background: color-mix(in srgb, var(--color-accent) 20%, var(--color-surface));
|
||||
}
|
||||
button:disabled {
|
||||
@@ -62,7 +62,7 @@ button:disabled {
|
||||
color: var(--color-on-accent);
|
||||
border-color: var(--color-accent);
|
||||
}
|
||||
.primary:hover {
|
||||
.primary:hover:not(:disabled) {
|
||||
background: color-mix(in srgb, var(--color-accent) 86%, var(--color-text));
|
||||
}
|
||||
.danger {
|
||||
@@ -497,6 +497,11 @@ td,
|
||||
th {
|
||||
padding: var(--space-cell) 14px;
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
vertical-align: middle;
|
||||
}
|
||||
td input[type="checkbox"],
|
||||
th input[type="checkbox"] {
|
||||
display: block;
|
||||
}
|
||||
tbody tr:last-child td {
|
||||
border-bottom: 0;
|
||||
@@ -734,6 +739,12 @@ input[type="checkbox"].switch:checked {
|
||||
border: 1px dashed var(--color-border);
|
||||
padding: 25px 15px;
|
||||
}
|
||||
.empty-state,
|
||||
.error-state,
|
||||
.context-target,
|
||||
.code-block {
|
||||
border-radius: var(--radius-control);
|
||||
}
|
||||
.empty-state p {
|
||||
font-size: 13px;
|
||||
color: var(--color-muted);
|
||||
@@ -896,8 +907,13 @@ dialog > p {
|
||||
}
|
||||
.close {
|
||||
border: 0;
|
||||
min-height: 30px;
|
||||
padding: 4px 8px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 36px;
|
||||
min-height: 36px;
|
||||
padding: 8px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.drawer {
|
||||
margin: 0 0 0 auto;
|
||||
@@ -1186,7 +1202,7 @@ body[data-concept="dock"] .auth-main {
|
||||
padding: 5px;
|
||||
}
|
||||
.header-actions .command-trigger:after {
|
||||
content: "⌘K";
|
||||
content: attr(data-shortcut);
|
||||
font-size: 12px;
|
||||
}
|
||||
.avatar {
|
||||
@@ -1432,14 +1448,17 @@ body[data-concept="dock"] .main-column {
|
||||
grid-column: 2;
|
||||
}
|
||||
body[data-concept="dock"] .navigation .wordmark {
|
||||
display: grid;
|
||||
grid-template-columns: 50px minmax(0, 1fr);
|
||||
height: 34px;
|
||||
white-space: nowrap;
|
||||
padding: 0 12px;
|
||||
gap: 8px;
|
||||
padding: 0;
|
||||
gap: 12px;
|
||||
font-size: 20px;
|
||||
}
|
||||
body[data-concept="dock"] .navigation .wordmark b {
|
||||
font-size: 23px;
|
||||
justify-self: center;
|
||||
}
|
||||
body[data-concept="dock"] .navigation .wordmark > span {
|
||||
opacity: 0;
|
||||
@@ -1472,10 +1491,10 @@ body[data-concept="dock"] .nav-links {
|
||||
gap: 6px;
|
||||
}
|
||||
body[data-concept="dock"] .nav-links button {
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
padding: 12px 13px;
|
||||
gap: 15px;
|
||||
display: grid;
|
||||
grid-template-columns: 50px minmax(0, 1fr);
|
||||
padding: 11px 0;
|
||||
gap: 12px;
|
||||
font-size: 14px;
|
||||
min-height: 46px;
|
||||
white-space: nowrap;
|
||||
@@ -1485,10 +1504,29 @@ body[data-concept="dock"] .nav-links button > span {
|
||||
opacity: 0;
|
||||
transition: opacity 140ms;
|
||||
}
|
||||
body[data-concept="dock"] .nav-links button > .nav-icon {
|
||||
justify-self: center;
|
||||
}
|
||||
body[data-concept="dock"]
|
||||
.navigation
|
||||
:is(.nav-links button, .dock-brand, .dock-account):focus-visible {
|
||||
outline: 2px solid var(--color-accent);
|
||||
outline-offset: -2px;
|
||||
}
|
||||
body[data-concept="dock"]
|
||||
.navigation
|
||||
:is(.nav-links button, .dock-brand, .dock-account):active {
|
||||
transform: none;
|
||||
}
|
||||
.icon-specimen {
|
||||
gap: 20px;
|
||||
padding-block: 12px;
|
||||
color: var(--color-accent);
|
||||
}
|
||||
body[data-concept="dock"] .nav-icon {
|
||||
width: 21px;
|
||||
height: 21px;
|
||||
display: inline-block;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: block;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
body[data-concept="dock"] .dock-scrim {
|
||||
@@ -1595,7 +1633,7 @@ body[data-concept="dock"] dialog[open] {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 8px;
|
||||
padding: 9px;
|
||||
border: 0;
|
||||
min-height: 48px;
|
||||
white-space: nowrap;
|
||||
@@ -1701,15 +1739,15 @@ body[data-concept="dock"].dock-open .account-more {
|
||||
border-radius: 12px;
|
||||
}
|
||||
body[data-concept="dock"] .navigation .wordmark {
|
||||
display: flex;
|
||||
padding-left: 10px;
|
||||
display: grid;
|
||||
padding-left: 0;
|
||||
}
|
||||
body[data-concept="dock"] .nav-links {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
body[data-concept="dock"] .nav-links button {
|
||||
padding: 12px 14px;
|
||||
padding: 11px 0;
|
||||
}
|
||||
body[data-concept="dock"] .mobile-menu {
|
||||
display: none;
|
||||
@@ -1865,6 +1903,10 @@ body[data-concept="dock"] .header-actions > .avatar {
|
||||
font-size: 14px;
|
||||
background: var(--color-surface);
|
||||
}
|
||||
.file-button:hover {
|
||||
background: var(--color-row-hover);
|
||||
border-color: var(--color-accent);
|
||||
}
|
||||
.file-button:focus-within {
|
||||
outline: 3px solid var(--color-accent);
|
||||
outline-offset: 3px;
|
||||
@@ -1937,6 +1979,9 @@ body[data-concept="dock"] .header-actions > .avatar {
|
||||
color: var(--color-muted);
|
||||
line-height: 1.7;
|
||||
}
|
||||
.identity-explanation {
|
||||
margin: 18px 0 0;
|
||||
}
|
||||
.identity-security .identity-section {
|
||||
padding: 0;
|
||||
margin-bottom: 24px;
|
||||
|
||||
Reference in new issue
Block a user