Test/node_modules/@radix-ui/react-tabs/dist/index.d.ts
2026-04-09 22:54:00 +07:00

55 lines
2.7 KiB
TypeScript

import * as React from "react";
import * as Radix from "@radix-ui/react-primitive";
import { Primitive } from "@radix-ui/react-primitive";
import * as RovingFocusGroup from "@radix-ui/react-roving-focus";
export const createTabsScope: import("@radix-ui/react-context").CreateScope;
type RovingFocusGroupProps = Radix.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
export interface TabsProps extends PrimitiveDivProps {
/** The value for the selected tab, if controlled */
value?: string;
/** The value of the tab to select by default, if uncontrolled */
defaultValue?: string;
/** A function called when a new tab is selected */
onValueChange?: (value: string) => void;
/**
* The orientation the tabs are layed out.
* Mainly so arrow navigation is done accordingly (left & right vs. up & down)
* @defaultValue horizontal
*/
orientation?: RovingFocusGroupProps['orientation'];
/**
* The direction of navigation between toolbar items.
*/
dir?: RovingFocusGroupProps['dir'];
/**
* Whether a tab is activated automatically or manually.
* @defaultValue automatic
* */
activationMode?: 'automatic' | 'manual';
}
export const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
export interface TabsListProps extends PrimitiveDivProps {
loop?: RovingFocusGroupProps['loop'];
}
export const TabsList: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<HTMLDivElement>>;
type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;
export interface TabsTriggerProps extends PrimitiveButtonProps {
value: string;
}
export const TabsTrigger: React.ForwardRefExoticComponent<TabsTriggerProps & React.RefAttributes<HTMLButtonElement>>;
export interface TabsContentProps extends PrimitiveDivProps {
value: string;
/**
* Used to force mounting when more control is needed. Useful when
* controlling animation with React animation libraries.
*/
forceMount?: true;
}
export const TabsContent: React.ForwardRefExoticComponent<TabsContentProps & React.RefAttributes<HTMLDivElement>>;
export const Root: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
export const List: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<HTMLDivElement>>;
export const Trigger: React.ForwardRefExoticComponent<TabsTriggerProps & React.RefAttributes<HTMLButtonElement>>;
export const Content: React.ForwardRefExoticComponent<TabsContentProps & React.RefAttributes<HTMLDivElement>>;
//# sourceMappingURL=index.d.ts.map