@wisemen/vue-core-design-system 1.13.0 → 1.14.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.
@@ -0,0 +1,14 @@
1
+ import { Ref } from 'vue';
2
+ export interface UseAdaptiveContentWidthReturn {
3
+ contentRef: Ref<HTMLElement | null>;
4
+ style: Ref<{
5
+ minWidth: string;
6
+ } | null>;
7
+ }
8
+ /**
9
+ * Lets a popover/menu content element grow wider than its default min-width
10
+ * to fit its content. While open, it remembers the widest size it has
11
+ * rendered at so it never shrinks back down again, preventing layout shifts
12
+ * when content changes. This is reset each time it is reopened.
13
+ */
14
+ export declare function useAdaptiveContentWidth(isEnabled: () => boolean, isOpen: () => boolean): UseAdaptiveContentWidthReturn;
@@ -0,0 +1,14 @@
1
+ export interface UseMenuAutoHighlightReturn {
2
+ onOpenAutoFocus: (event: Event) => void;
3
+ }
4
+ /**
5
+ * Reka UI only highlights the first menu item on open when the menu was
6
+ * triggered via keyboard, and even then only if the item already exists in
7
+ * the DOM at that exact moment. This makes sure a menu always ends up with
8
+ * an item highlighted whenever the user is driving it via keyboard - whether
9
+ * that's right on open, once items that were still loading become
10
+ * available, or because the user started typing a search query into a menu
11
+ * that was originally opened by pointer. A menu that's opened and never
12
+ * interacted with via keyboard is left untouched.
13
+ */
14
+ export declare function useMenuAutoHighlight(): UseMenuAutoHighlightReturn;