radix-vue
Version:
Vue port for Radix UI Primitives.
122 lines (121 loc) • 3.78 kB
TypeScript
import type { Ref } from 'vue';
import type { PrimitiveProps } from '../Primitive';
import type { DataOrientation, Direction } from '../shared/types';
type TypeEnum = 'single' | 'multiple';
export interface ToggleGroupRootProps extends PrimitiveProps {
type?: TypeEnum;
defaultValue?: string | string[];
modelValue?: string | string[];
rovingFocus?: boolean;
disabled?: boolean;
orientation?: DataOrientation;
dir?: Direction;
loop?: boolean;
}
export type ToggleGroupRootEmits = {
'update:modelValue': [payload: string];
};
interface ToggleGroupRootContext {
type: TypeEnum;
modelValue: Ref<string | string[] | undefined>;
changeModelValue: (value: string) => void;
dir?: Ref<Direction>;
orientation?: DataOrientation;
loop: Ref<boolean>;
rovingFocus: Ref<boolean>;
disabled?: Ref<boolean>;
}
export declare const injectToggleGroupRootContext: <T extends ToggleGroupRootContext | null | undefined = ToggleGroupRootContext>(fallback?: T | undefined) => T extends null ? ToggleGroupRootContext | null : ToggleGroupRootContext, provideToggleGroupRootContext: (contextValue: ToggleGroupRootContext) => ToggleGroupRootContext;
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
dir: {
type: import("vue").PropType<Direction>;
};
disabled: {
type: import("vue").PropType<boolean>;
default: boolean;
};
loop: {
type: import("vue").PropType<boolean>;
default: boolean;
};
type: {
type: import("vue").PropType<TypeEnum>;
default: string;
};
asChild: {
type: import("vue").PropType<boolean>;
};
as: {
type: import("vue").PropType<import('../Primitive').AsTag | import("vue").Component>;
};
defaultValue: {
type: import("vue").PropType<string | string[]>;
};
orientation: {
type: import("vue").PropType<DataOrientation>;
default: string;
};
modelValue: {
type: import("vue").PropType<string | string[]>;
};
rovingFocus: {
type: import("vue").PropType<boolean>;
default: boolean;
};
}, {}, 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>;
};
disabled: {
type: import("vue").PropType<boolean>;
default: boolean;
};
loop: {
type: import("vue").PropType<boolean>;
default: boolean;
};
type: {
type: import("vue").PropType<TypeEnum>;
default: string;
};
asChild: {
type: import("vue").PropType<boolean>;
};
as: {
type: import("vue").PropType<import('../Primitive').AsTag | import("vue").Component>;
};
defaultValue: {
type: import("vue").PropType<string | string[]>;
};
orientation: {
type: import("vue").PropType<DataOrientation>;
default: string;
};
modelValue: {
type: import("vue").PropType<string | string[]>;
};
rovingFocus: {
type: import("vue").PropType<boolean>;
default: boolean;
};
}>> & {
"onUpdate:modelValue"?: ((payload: string) => any) | undefined;
}, {
disabled: boolean;
loop: boolean;
type: TypeEnum;
orientation: DataOrientation;
rovingFocus: boolean;
}, {}>, {
default?(_: {
modelValue: string | string[] | undefined;
}): any;
}>;
export default _default;
type __VLS_WithTemplateSlots<T, S> = T & {
new (): {
$slots: S;
};
};