@extclp/vexip-ui
Version:
A Vue 3 UI library, Highly customizability, full TypeScript, performance pretty good
29 lines (28 loc) • 1.14 kB
TypeScript
import { InjectionKey, Ref } from 'vue';
import { IconEffect } from '../icon';
import { ComponentSize, ComponentState } from '@vexip-ui/config';
export type RadioShape = 'default' | 'border' | 'button';
export type RadioGroupShape = RadioShape | 'button-group';
export type RadioRawOption = string | {
label: string | number | boolean;
content?: string;
disabled?: boolean;
};
export interface GroupState {
currentValue: string | number | boolean;
size: ComponentSize;
state: ComponentState;
disabled: boolean;
loading: boolean;
loadingIcon: Record<string, any>;
loadingLock: boolean;
loadingEffect: IconEffect;
shape: RadioGroupShape;
updateValue(value: string | number | boolean): void;
registerInput(input: Ref<HTMLElement | null | undefined>): void;
unregisterInput(input: Ref<HTMLElement | null | undefined>): void;
}
export type ChangeEvent = (value: string | number | boolean) => void;
export declare const GROUP_STATE: InjectionKey<GroupState>;
export declare const radioShapes: readonly RadioShape[];
export declare const radioGroupShapes: readonly RadioGroupShape[];