import { MouseEvent, ReactNode, PropsWithChildren } from 'react'; import { MenuPopperProps } from '@befe/brick-comp-menu'; import { TabPaneProps } from './tab-pane'; import { TabPaneId } from './tabs-context'; interface TabItem extends TabPaneProps { /** * tab 页内容 */ content?: ReactNode; } export interface TabsProps { /** * 自定义 class */ className?: string; /** * 尺寸 * use config context `baseSize` as default */ size?: 'sm' | 'md'; /** * 标签卡样式类型 */ type?: 'plain' | 'card' | 'tag' | 'button-group-intensive' | 'button-group-important'; /** * 标签页 */ panes?: TabItem[]; /** * 激活 tab id 的 控制值 */ activeId?: TabPaneId; /** * 激活 tab id 的 默认值 */ defaultActiveId?: TabPaneId | null; /** * activeId 变化时的回调 */ onChange?: (activeId: TabPaneId) => void; /** * 点击 tab 的回调 * * type `button-group-intensive` 和 `button-group-important` 无效,因 RadioGroup 没有 onClick 事件 */ onClickTab?: (e: MouseEvent, id: TabPaneId) => void; /** * 下拉列表触发方式 */ triggerType?: MenuPopperProps['type']; /** * 是否干掉非当前激活的 pane dom */ shouldDestroyInactivePane?: boolean; /** * 添加按钮点击回调 * * 提供回调则显示添加按钮,仅 type 'card' 支持 */ onClickAdd?: (e: MouseEvent) => void | TabPaneId; /** * delete 删除tab回调 */ onTabDelete?: (activeId: TabPaneId) => void; /** * @private 暂不公布,以便于收集需要使用 "非 bottom-end" 场景的普遍率 * 收起到等多下拉 popper 位置 */ ellipsisDropdownPlacement?: MenuPopperProps['placement']; } export declare function Tabs(props: PropsWithChildren): import("react/jsx-runtime").JSX.Element; export declare namespace Tabs { var displayName: string; } export {};