7e084dd21d259c70e68a3cbec09a39be8cdaeb9d50ca82bc439d70d583ff3a7b6dfeaad1e337c0a8d81048834288504545c85ec89ed210297ffa496b201bdc 921 B

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