import { VueNode } from "../_util/type.js"; import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.js"; import "../_util/hooks/index.js"; import { SizeType } from "../config-provider/SizeContext.js"; import TabPane, { TabPaneProps } from "./TabPane.js"; import { ComponentBaseProps } from "../config-provider/context.js"; import { App, CSSProperties, PublicProps } from "vue"; import { GetIndicatorSize, MoreProps, Tab as Tab$1, TabsProps as TabsProps$1 } from "@v-c/tabs"; //#region src/tabs/index.d.ts type TabsType = 'line' | 'card' | 'editable-card'; type TabPosition = 'top' | 'right' | 'bottom' | 'left'; type TabPlacement = 'top' | 'end' | 'bottom' | 'start'; type TabsSemanticName = keyof TabsSemanticClassNames & keyof TabsSemanticStyles; interface TabsSemanticClassNames { root?: string; item?: string; indicator?: string; body?: string; content?: string; header?: string; remove?: string; } interface TabsSemanticStyles { root?: CSSProperties; item?: CSSProperties; indicator?: CSSProperties; body?: CSSProperties; content?: CSSProperties; header?: CSSProperties; remove?: CSSProperties; } type TabsClassNamesType = SemanticClassNamesType; type TabsStylesType = SemanticStylesType; interface CompatibilityProps { /** @deprecated Please use `destroyOnHidden` instead */ destroyInactiveTabPane?: boolean; } interface Tab extends Omit { content?: VueNode; class?: string; } type TabItem = Tab & Record; interface TabsRef { nativeElement: any; } interface BaseTabsProps extends ComponentBaseProps { type?: TabsType; size?: SizeType; hideAdd?: boolean; centered?: boolean; classes?: TabsClassNamesType; styles?: TabsStylesType; /** @deprecated please use `tabPlacement` instead */ tabPosition?: TabPosition; tabPlacement?: TabPlacement; /** @deprecated Please use `indicator={{ size: ... }}` instead */ indicatorSize?: GetIndicatorSize; items?: Item[]; } interface TabsEmits { 'edit': (e: MouseEvent | KeyboardEvent | string, action: 'add' | 'remove') => void; 'change': NonNullable; 'tabClick': NonNullable; 'tabScroll': NonNullable; 'update:activeKey': (activeKey: string) => void; } interface TabsEmitsProps { onEdit?: TabsEmits['edit']; onChange?: TabsEmits['change']; onTabClick?: TabsEmits['tabClick']; onTabScroll?: TabsEmits['tabScroll']; 'onUpdate:activeKey'?: TabsEmits['update:activeKey']; } interface TabsProps extends BaseTabsProps, CompatibilityProps, Omit, TabsEmitsProps { addIcon?: VueNode; moreIcon?: VueNode; more?: MoreProps; removeIcon?: VueNode; styles?: TabsStylesType; classes?: TabsClassNamesType; /** @deprecated Please use `classes.popup` instead */ popupClassName?: string; renderTabBar?: (args: { props: any; TabNavListComponent: any; }) => any; } interface TabsSlots { default: () => any; addIcon: () => any; moreIcon: () => any; removeIcon: () => any; labelRender: (args: { item: Item; index: number; }) => any; contentRender: (args: { item: Item; index: number; }) => any; renderTabBar?: (args: { props: any; TabNavListComponent: any; }) => any; rightExtra?: () => any; leftExtra?: () => any; } type TabsInstance = { $props: TabsProps & PublicProps; $emit: { (event: 'edit', e: MouseEvent | KeyboardEvent | string, action: 'add' | 'remove'): void; (event: 'change', ...args: Parameters): void; (event: 'tabClick', ...args: Parameters): void; (event: 'tabScroll', ...args: Parameters): void; (event: 'update:activeKey', activeKey: string): void; }; $slots: TabsSlots; } & TabsRef; interface TabsConstructor { new (props: TabsProps): TabsInstance; /** * Non-generic fallback signature. TypeScript infers from the last overload, * so this keeps render-function usage like `h(Tabs, props)` resolvable * against Vue's `Constructor

` overload of `h` (see #634), while the * generic signature above still drives template/Volar inference. */ new (props: TabsProps): TabsInstance; install: (app: App) => void; TabPane: typeof TabPane; } declare const Tabs: TabsConstructor; //#endregion export { BaseTabsProps, CompatibilityProps, Tab, TabItem, TabPane, type TabPaneProps, TabPlacement, TabPosition, TabsClassNamesType, TabsConstructor, TabsEmits, TabsEmitsProps, TabsProps, TabsRef, TabsSemanticClassNames, TabsSemanticName, TabsSemanticStyles, TabsSlots, TabsStylesType, TabsType, Tabs as default };