feat(ui): add docking, viewport controls and composed settings
Add shared dock layouts, navigation cube, range bands, progress actions and comparison surfaces. Extend toolbar menus and loading composition, and align tokens, registry entries, documentation and the living catalog.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { ReactNode } from "react";
|
||||
import { useLayoutEffect, useRef, type ReactNode } from "react";
|
||||
import { HeaderAvatar } from "./AppHeader.js";
|
||||
import { Icon, type IconName } from "./Icon.js";
|
||||
import { Window } from "./Window.js";
|
||||
@@ -43,6 +43,8 @@ export function FeatureSettingsWindow<T extends string>({
|
||||
footer,
|
||||
headerActions,
|
||||
}: FeatureSettingsWindowProps<T>) {
|
||||
const contentRef = useRef<HTMLElement>(null);
|
||||
useLayoutEffect(() => { if (contentRef.current) contentRef.current.scrollTop = 0; }, [activeSection]);
|
||||
return (
|
||||
<Window
|
||||
open={open}
|
||||
@@ -56,7 +58,7 @@ export function FeatureSettingsWindow<T extends string>({
|
||||
onClose={onClose}
|
||||
>
|
||||
<div className="nodedc-feature-settings">
|
||||
<aside className="nodedc-feature-settings__navigation" aria-label="Разделы настроек">
|
||||
<aside className="nodedc-feature-settings__navigation" aria-label="Разделы настроек" tabIndex={0}>
|
||||
<div className="nodedc-feature-settings__identity">
|
||||
<HeaderAvatar label={identity.avatarLabel} imageUrl={identity.avatarUrl} />
|
||||
<span><strong>{identity.title}</strong>{identity.subtitle ? <small>{identity.subtitle}</small> : null}</span>
|
||||
@@ -82,7 +84,7 @@ export function FeatureSettingsWindow<T extends string>({
|
||||
})}
|
||||
</nav>
|
||||
</aside>
|
||||
<section className="nodedc-feature-settings__content">{children}</section>
|
||||
<section ref={contentRef} className="nodedc-feature-settings__content" aria-label="Содержимое настроек" tabIndex={0}>{children}</section>
|
||||
</div>
|
||||
</Window>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user