sb-floating-panel-vue 3.0.0 → 5.0.0

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/dist/dev.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ /** Warns about a misuse of the components, in development only. */
2
+ export declare function warn(message: string): void;
@@ -0,0 +1,24 @@
1
+ /** Marks the hidden elements placed around a teleported panel to keep the Tab order. */
2
+ export declare const FOCUS_GUARD_ATTRIBUTE = "data-sbf-focus-guard";
3
+ /** Whether pressing `target` moves focus to it (or to a focusable ancestor). */
4
+ export declare function isFocusable(target: EventTarget | null): boolean;
5
+ /** Elements reachable with Tab inside `root`, in document order (focus guards excluded). */
6
+ export declare function getTabbables(root: ParentNode): HTMLElement[];
7
+ /** Panel roles whose keyboard model the components handle, with the selector of their items. */
8
+ export declare const ITEM_SELECTORS: {
9
+ readonly menu: "[role=\"menuitem\"], [role=\"menuitemcheckbox\"], [role=\"menuitemradio\"]";
10
+ readonly listbox: "[role=\"option\"]";
11
+ };
12
+ export type NavigableRole = keyof typeof ITEM_SELECTORS;
13
+ export declare const isNavigableRole: (role: string | null) => role is NavigableRole;
14
+ /** Items of a menu or listbox panel that can take focus, leaving out those of a nested one. */
15
+ export declare function getItems(panel: HTMLElement, role: NavigableRole): HTMLElement[];
16
+ /** Whether keys pressed on `target` edit text, so they are not navigation keys. */
17
+ export declare const isTextField: (target: EventTarget | null) => boolean;
18
+ /** Arrow keys that open and close a submenu, which follow the text direction. */
19
+ export declare const submenuKeys: (el: Element) => {
20
+ open: string;
21
+ close: string;
22
+ };
23
+ /** First element reachable with Tab after `anchor` in document order, skipping the excluded ones. */
24
+ export declare function getNextTabbable(anchor: Element, exclude: (el: HTMLElement) => boolean): HTMLElement | undefined;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { default as SbContainer } from './components/SbContainer.vue';
2
2
  export { default as SbReference } from './components/SbReference.vue';
3
3
  export { default as SbFloating } from './components/SbFloating.vue';
4
- export type { SbContainerProps, SbContainerSlotProps, SbContainerExposed, SbReferenceProps, SbFloatingProps, SbTrigger, SbPlacement, SbSide, SbAlignment, SbStrategy, } from './types';
4
+ export type { SbContainerProps, SbContainerSlotProps, SbContainerExposed, SbReferenceProps, SbFloatingProps, SbTrigger, SbPlacement, SbSide, SbAlignment, SbStrategy, SbFloatingRole, } from './types';