From 67025ee2092568966fb04c228dd06ca875b95aa2 Mon Sep 17 00:00:00 2001 From: Codex Date: Thu, 10 Sep 2026 22:11:39 +0300 Subject: [PATCH] fix(ui): add layer icon and preserve switch contrast --- apps/catalog/src/CatalogApp.tsx | 7 ++++++- docs/COMPONENTS.md | 5 +++++ docs/ICONS.md | 7 ++++++- packages/ui-core/styles.css | 4 +++- packages/ui-react/src/Icon.tsx | 2 ++ registry/components.json | 4 +++- registry/icons.json | 2 +- 7 files changed, 26 insertions(+), 5 deletions(-) diff --git a/apps/catalog/src/CatalogApp.tsx b/apps/catalog/src/CatalogApp.tsx index 1638529..891cf56 100644 --- a/apps/catalog/src/CatalogApp.tsx +++ b/apps/catalog/src/CatalogApp.tsx @@ -201,7 +201,7 @@ const iconGroups: Array<{ title: string; note: string; icons: IconName[] }> = [ { title: "Окно и слой", note: "Launcher / Hub", - icons: ["close", "plus", "expand", "minimize", "refresh", "panel", "apps"], + icons: ["close", "plus", "expand", "minimize", "refresh", "panel", "apps", "layers"], }, { title: "Навигация", @@ -258,6 +258,7 @@ const iconLabels: Record = { image: "Изображение", inbox: "Уведомления", key: "Ключ", + layers: "Слои", list: "Список задач", lock: "Закрыто", mail: "Приглашение", @@ -1539,6 +1540,10 @@ export function CatalogApp() { description="MP4 или URL становятся частью единого server-side layout вместе с темой, материалом и Toolbar." actions={} > +
+ + {}} /> +
span { + background: rgb(var(--nodedc-on-accent-rgb)); transform: translateX(0.88rem); } diff --git a/packages/ui-react/src/Icon.tsx b/packages/ui-react/src/Icon.tsx index e361dff..5284df1 100644 --- a/packages/ui-react/src/Icon.tsx +++ b/packages/ui-react/src/Icon.tsx @@ -22,6 +22,7 @@ import { Image, Inbox, KeyRound, + Layers, LayoutDashboard, ListChecks, LocateFixed, @@ -80,6 +81,7 @@ const icons = { image: Image, inbox: Inbox, key: KeyRound, + layers: Layers, list: ListChecks, target: LocateFixed, lock: LockKeyhole, diff --git a/registry/components.json b/registry/components.json index fbeabce..35d6cd7 100644 --- a/registry/components.json +++ b/registry/components.json @@ -423,6 +423,7 @@ "variants": ["14 px", "16 px", "18 px"], "rules": [ "Use semantic names from registry/icons.json.", + "Use layers for visibility controls of map or visual source layers; settings remains general configuration.", "The containing component owns surface, hit target and state; the icon owns only the glyph and uses the canonical 16 px default without an extra CSS scale.", "Do not copy complete Lucide or Font Awesome catalogs into an application." ] @@ -501,7 +502,8 @@ "The card owns grouping geometry but not product form schemas.", "Use align=center for compact result or empty messages: center the content on both axes and omit an empty body. The default start layout remains unchanged.", "Section and empty-state titles use the compact md token; descriptions use sm. Page/window title sizes and browser heading defaults are forbidden inside cards.", - "Use Switch for compact visibility/enable states; use Checker for the Engine inspector treatment." + "Use Switch for compact visibility/enable states; use Checker for the Engine inspector treatment.", + "Switch keeps its track width beside wrapped labels. The checked thumb uses on-accent contrast; the unchecked track follows theme text instead of a fixed white tint." ] }, { diff --git a/registry/icons.json b/registry/icons.json index dd47e31..369c31b 100644 --- a/registry/icons.json +++ b/registry/icons.json @@ -12,7 +12,7 @@ "id": "window-layer", "label": "Окно и слой", "referenceSources": ["launcher", "engine"], - "names": ["close", "plus", "expand", "minimize", "refresh", "panel", "apps"] + "names": ["close", "plus", "expand", "minimize", "refresh", "panel", "apps", "layers"] }, { "id": "navigation",