import type * as React from 'react'; import type { LabelProps } from "../Label/index.js"; import type { DOMProps, QAProps } from "../types.js"; export type TabSize = 'm' | 'l' | 'xl'; export interface TabProviderProps { value?: string; onUpdate?: (value: string) => void; children?: React.ReactNode; } export interface TabListProps extends DOMProps, QAProps, Omit, 'style'> { onUpdate?: (value: string) => void; value?: string; size?: TabSize; contentOverflow?: 'wrap' | 'scroll' | 'collapse'; /** Label for the collapse overflow trigger when the active tab is visible in the list */ moreLabel?: React.ReactNode; activateOnFocus?: boolean; children?: React.ReactNode; } interface TabCommonProps extends QAProps, DOMProps { value: string; icon?: React.ReactNode; counter?: number | string; label?: { content: React.ReactNode; theme?: LabelProps['theme']; }; disabled?: boolean; children?: React.ReactNode; /** Tab was collapsed and rendered in `Menu` */ isMenuItem?: boolean; } export interface TabButtonProps extends TabCommonProps, Omit, 'value' | 'disabled' | 'style'> { component?: never; href?: never; } export interface TabLinkProps extends TabCommonProps, Omit, 'style'> { component?: never; href: string; } export type TabComponentElementType = Exclude | undefined; export type TabComponentProps> = TabCommonProps & React.ComponentPropsWithoutRef & { component: T; }; export type TabProps = TabButtonProps | TabLinkProps | TabComponentProps>; export interface TabPanelProps extends DOMProps, QAProps, Omit, 'style'> { value: string; children?: React.ReactNode; } export interface TabListCollapseItemProps { children: React.ReactNode; triggerChild?: React.ReactNode; moreLabel?: React.ReactNode; size?: TabSize; } export {};