constants.d.ts 1005 B

12345678910111213141516171819202122232425262728
  1. import { TabPaneProps } from "./tab-pane.js";
  2. import { TabNavInstance } from "./tab-nav.js";
  3. import { TabsProps } from "./tabs.js";
  4. import { ComputedRef, InjectionKey, Ref, Slots, UnwrapRef, VNode } from "vue";
  5. //#region ../../packages/components/tabs/src/constants.d.ts
  6. type TabPaneName = string | number;
  7. type TabsPaneContext = UnwrapRef<{
  8. uid: number;
  9. getVnode: () => VNode;
  10. slots: Slots;
  11. props: TabPaneProps;
  12. paneName: ComputedRef<TabPaneName | undefined>;
  13. active: ComputedRef<boolean>;
  14. index: Ref<string | undefined>;
  15. isClosable: ComputedRef<boolean>;
  16. isFocusInsidePane: () => boolean | undefined;
  17. }>;
  18. interface TabsRootContext {
  19. props: TabsProps;
  20. currentName: Ref<TabPaneName>;
  21. registerPane: (pane: TabsPaneContext) => void;
  22. unregisterPane: (pane: TabsPaneContext) => void;
  23. nav$: Ref<TabNavInstance | undefined>;
  24. }
  25. declare const tabsRootContextKey: InjectionKey<TabsRootContext>;
  26. //#endregion
  27. export { TabPaneName, TabsPaneContext, TabsRootContext, tabsRootContextKey };