UNPKG

radix-vue

Version:

Vue port for Radix UI Primitives.

100 lines (99 loc) 3.29 kB
import type { Ref } from 'vue'; import type { PrimitiveProps } from '../Primitive'; import type { DataOrientation, Direction } from '../shared/types'; export interface TabsRootContext { modelValue: Ref<string | undefined>; changeModelValue: (value: string) => void; orientation: Ref<DataOrientation>; dir: Ref<Direction>; activationMode: 'automatic' | 'manual'; baseId: string; tabsList: Ref<HTMLElement | undefined>; } export interface TabsRootProps extends PrimitiveProps { defaultValue?: string; /** * The orientation the tabs are layed out. * Mainly so arrow navigation is done accordingly (left & right vs. up & down) * @defaultValue horizontal */ orientation?: DataOrientation; /** * The direction of navigation between toolbar items. */ dir?: Direction; /** * Whether a tab is activated automatically or manually. * @defaultValue automatic * */ activationMode?: 'automatic' | 'manual'; modelValue?: string; } export type TabsRootEmits = { 'update:modelValue': [payload: string]; }; export declare const injectTabsRootContext: <T extends TabsRootContext | null | undefined = TabsRootContext>(fallback?: T | undefined) => T extends null ? TabsRootContext | null : TabsRootContext, provideTabsRootContext: (contextValue: TabsRootContext) => TabsRootContext; declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{ dir: { type: import("vue").PropType<Direction>; }; asChild: { type: import("vue").PropType<boolean>; }; as: { type: import("vue").PropType<import('../Primitive').AsTag | import("vue").Component>; }; defaultValue: { type: import("vue").PropType<string>; }; orientation: { type: import("vue").PropType<DataOrientation>; default: string; }; modelValue: { type: import("vue").PropType<string>; }; activationMode: { type: import("vue").PropType<"manual" | "automatic">; default: string; }; }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { "update:modelValue": (payload: string) => void; }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{ dir: { type: import("vue").PropType<Direction>; }; asChild: { type: import("vue").PropType<boolean>; }; as: { type: import("vue").PropType<import('../Primitive').AsTag | import("vue").Component>; }; defaultValue: { type: import("vue").PropType<string>; }; orientation: { type: import("vue").PropType<DataOrientation>; default: string; }; modelValue: { type: import("vue").PropType<string>; }; activationMode: { type: import("vue").PropType<"manual" | "automatic">; default: string; }; }>> & { "onUpdate:modelValue"?: ((payload: string) => any) | undefined; }, { orientation: DataOrientation; activationMode: "manual" | "automatic"; }, {}>, { default?(_: {}): any; }>; export default _default; type __VLS_WithTemplateSlots<T, S> = T & { new (): { $slots: S; }; };