@visma-swno/vsn-navigation 1.1.0-beta.22 → 1.1.0-beta.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -144,6 +144,10 @@ export declare class VSNNavigation extends LitElement {
|
|
|
144
144
|
private _resolvedModules;
|
|
145
145
|
private _modulesLoading;
|
|
146
146
|
private _modulesLoadToken;
|
|
147
|
+
/** Set at close time: whether focus was inside the side-bar. Gates the focus
|
|
148
|
+
restore so we don't steal focus when the user closed the side-bar by
|
|
149
|
+
clicking a focusable element outside (e.g. a top-bar button). */
|
|
150
|
+
private _restoreFocusToToggle;
|
|
147
151
|
private _resolveModules;
|
|
148
152
|
static styles: CSSResult[];
|
|
149
153
|
willUpdate(changed: Map<string, unknown>): void;
|
|
@@ -152,7 +156,23 @@ export declare class VSNNavigation extends LitElement {
|
|
|
152
156
|
/** Project tree into the shape the side-bar expects: top-level items lifted from the active module. */
|
|
153
157
|
private get _sideBarMenu();
|
|
154
158
|
private _onToggleSideBar;
|
|
159
|
+
/** Open the side-bar and, once rendered, focus the search field (if enabled).
|
|
160
|
+
Shared by the hamburger toggle and the CTRL/Cmd+K shortcut. */
|
|
161
|
+
private _openAndFocusSearch;
|
|
155
162
|
private _onSideBarClose;
|
|
163
|
+
/** Close the side-bar. Captures `:focus-within` BEFORE flipping the state, since
|
|
164
|
+
the side-bar becomes display:none and the check would then always be false. */
|
|
165
|
+
private _closeSideBar;
|
|
166
|
+
updated(changed: Map<string, unknown>): void;
|
|
167
|
+
connectedCallback(): void;
|
|
168
|
+
disconnectedCallback(): void;
|
|
169
|
+
/** CTRL+K (Cmd+K on Mac) opens the side-bar and focuses the search field (if enabled). */
|
|
170
|
+
private _onShortcut;
|
|
171
|
+
/** Escape closes the side-bar when nothing is focused. Skips when focus is on
|
|
172
|
+
any element — including inside the side-bar's shadow (activeElement is then
|
|
173
|
+
the host `<vsn-side-bar>`, not body), so existing in-component Escape
|
|
174
|
+
handlers (search input clear-then-close) keep their priority. */
|
|
175
|
+
private _onDocEscape;
|
|
156
176
|
private _onTopBarClick;
|
|
157
177
|
render(): TemplateResult<1>;
|
|
158
178
|
}
|