Refine Dock with overlay rail, account menu, motion and teal themes

This commit is contained in:
SantaSpeen committed 2026-11-27 19:41:45 +03:00
1 parent ae037908ab
commit 53199205e3
38 files changed
+740 -61

No files matched your search

+28 -14
View File
@@ -64,13 +64,17 @@ export const concepts = [
name: "Dock",
tag: "Персональный инструмент",
en: "Personal instrument",
desc: "Узкая панель · мягкая геометрия · рабочие модули",
descEn: "Narrow rail · soft geometry · working modules",
accent: "#765027",
bg: "#f3f0eb",
ink: "#543f25",
line: "#d5cbbb",
radius: "12px",
desc: "Компактная панель · раскрытие поверх контента · петроль и бирюза",
descEn: "Compact rail · overlay navigation · petrol and teal",
accent: "#12616a",
darkAccent: "#77cbbb",
surface: "#fbfdfd",
text: "#173239",
muted: "#4c666d",
bg: "#edf3f3",
ink: "#173f49",
line: "#c6d7da",
radius: "10px",
font: '"Trebuchet MS", Arial, sans-serif',
layout: "rail",
},
@@ -98,11 +102,11 @@ export function tokensFor(id, theme = "light", accent, density = "normal") {
ledger: ["#211e1a", "#2b2721", "#efe5d6", "#c1b6a6", "#584e41"],
signal: ["#101a13", "#16231a", "#d4e8d9", "#a4bfa9", "#36533e"],
axis: ["#141c28", "#1b2738", "#e6edf8", "#a6bad6", "#3b4f6c"],
dock: ["#211e1a", "#2d2821", "#f1e7d9", "#c7b6a0", "#5a4d3c"],
dock: ["#111f26", "#192c34", "#e3f2f3", "#a5bec5", "#3b535c"],
grid: ["#191a18", "#252622", "#f1f1e7", "#b8bcaf", "#53574a"],
};
const p = palettes[c.id];
let selected = accent || c.accent;
let selected = accent || (dark ? c.darkAccent || c.accent : c.accent);
const luminance = (hex) =>
hex
.match(/\w\w/g)
@@ -114,7 +118,7 @@ export function tokensFor(id, theme = "light", accent, density = "normal") {
y = luminance(b);
return (Math.max(x, y) + 0.05) / (Math.min(x, y) + 0.05);
};
const backgrounds = dark ? [p[0], p[1]] : [c.bg, "#ffffff"];
const backgrounds = dark ? [p[0], p[1]] : [c.bg, c.surface || "#ffffff"];
for (
let i = 0;
i < 100 && backgrounds.some((bg) => contrast(selected, bg) < 4.5);
@@ -141,9 +145,9 @@ export function tokensFor(id, theme = "light", accent, density = "normal") {
const on = lum > 0.179 ? "#101810" : "#ffffff";
return {
"color.bg": dark ? p[0] : c.bg,
"color.surface": dark ? p[1] : "#ffffff",
"color.text": dark ? p[2] : "#202622",
"color.muted": dark ? p[3] : "#59635e",
"color.surface": dark ? p[1] : c.surface || "#ffffff",
"color.text": dark ? p[2] : c.text || "#202622",
"color.muted": dark ? p[3] : c.muted || "#59635e",
"color.border": dark ? p[4] : c.line,
"color.accent": selected,
"color.on-accent": on,
@@ -154,7 +158,17 @@ export function tokensFor(id, theme = "light", accent, density = "normal") {
"font.heading": c.font,
"space.unit": "4px",
"space.section":
density === "compact" ? "18px" : density === "relaxed" ? "36px" : "26px",
c.id === "dock"
? density === "compact"
? "14px"
: density === "relaxed"
? "28px"
: "20px"
: density === "compact"
? "18px"
: density === "relaxed"
? "36px"
: "26px",
"size.control":
density === "compact" ? "34px" : density === "relaxed" ? "46px" : "40px",
"space.cell":