mn-angular-lib 2.0.19 → 2.0.20
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.
package/package.json
CHANGED
|
@@ -3117,6 +3117,12 @@ declare class MnDropdown implements OnInit {
|
|
|
3117
3117
|
/** Capture-phase scroll listener installed while open, closing on any ancestor scroll. */
|
|
3118
3118
|
private scrollCapture;
|
|
3119
3119
|
isOpen: boolean;
|
|
3120
|
+
/**
|
|
3121
|
+
* The command that takes focus once the opened menu has rendered: the first or last one,
|
|
3122
|
+
* or none when a desktop search box takes focus instead. Set by {@link open}, consumed by
|
|
3123
|
+
* the panel and sheet queries the moment the menu appears.
|
|
3124
|
+
*/
|
|
3125
|
+
private pendingFocus;
|
|
3120
3126
|
/** Stable fallback id, used when {@link MnDropdownProps.id} is omitted. Generated once per
|
|
3121
3127
|
* instance so the a11y wiring (menu id, `aria-controls`, the search input) stays valid. */
|
|
3122
3128
|
private readonly autoId;
|
|
@@ -3146,12 +3152,50 @@ declare class MnDropdown implements OnInit {
|
|
|
3146
3152
|
private startWatchingViewport;
|
|
3147
3153
|
private stopWatchingViewport;
|
|
3148
3154
|
toggle(): void;
|
|
3155
|
+
/**
|
|
3156
|
+
* Opens the menu and moves focus into it, as the menu-button pattern expects: a keyboard
|
|
3157
|
+
* user lands on a command (or in the search box) instead of staying on the trigger with
|
|
3158
|
+
* the items out of reach at the end of the page.
|
|
3159
|
+
* @param focus The command to focus once the menu has rendered.
|
|
3160
|
+
*/
|
|
3161
|
+
private open;
|
|
3149
3162
|
/** The single close path, so every open-only listener is torn down with the panel. */
|
|
3150
3163
|
close(): void;
|
|
3151
3164
|
/** Whether the menu should currently render as a bottom sheet. */
|
|
3152
3165
|
get isSheet(): boolean;
|
|
3153
|
-
/**
|
|
3166
|
+
/**
|
|
3167
|
+
* Fires an action and closes. Focus goes back to the trigger first, so a keyboard user is
|
|
3168
|
+
* not left on a removed item and a modal the action opens restores focus there. Ignores
|
|
3169
|
+
* disabled items defensively.
|
|
3170
|
+
*/
|
|
3154
3171
|
select(action: MnDropdownAction): void;
|
|
3172
|
+
/**
|
|
3173
|
+
* Arrow keys on the trigger open the menu on its first (↓) or last (↑) command, or move
|
|
3174
|
+
* there when it is already open. Enter and Space need no handler: they click the button.
|
|
3175
|
+
* @param event The keydown on the trigger.
|
|
3176
|
+
*/
|
|
3177
|
+
onTriggerKeydown(event: KeyboardEvent): void;
|
|
3178
|
+
/**
|
|
3179
|
+
* Keyboard movement inside the open menu: the arrows step through the enabled commands
|
|
3180
|
+
* (wrapping), Home and End jump to the ends, and Tab closes the menu with focus back on the
|
|
3181
|
+
* trigger, so the browser's own Tab then moves on from there as if the menu was never
|
|
3182
|
+
* open. Escape is handled document-wide by {@link onEscape}.
|
|
3183
|
+
* @param event The keydown inside the menu.
|
|
3184
|
+
*/
|
|
3185
|
+
onMenuKeydown(event: KeyboardEvent): void;
|
|
3186
|
+
/** The enabled commands currently rendered in the menu, in order. */
|
|
3187
|
+
private menuItems;
|
|
3188
|
+
/**
|
|
3189
|
+
* Focuses a command relative to the one that has focus now. From outside the list (the
|
|
3190
|
+
* search box) "next" is the first command and "previous" the last.
|
|
3191
|
+
* @param which The first, last, next or previous enabled command.
|
|
3192
|
+
*/
|
|
3193
|
+
private focusItem;
|
|
3194
|
+
/**
|
|
3195
|
+
* Moves focus to the command {@link open} asked for, once. Called from the panel and sheet
|
|
3196
|
+
* queries; deferred a microtask so the item list rendered in the same pass exists.
|
|
3197
|
+
*/
|
|
3198
|
+
private focusPendingItem;
|
|
3155
3199
|
/** Whether the filter input is shown — the explicit `searchable` prop, off by default. */
|
|
3156
3200
|
get isSearchable(): boolean;
|
|
3157
3201
|
/**
|