dk-plus
Version:
79 lines (78 loc) • 3.15 kB
TypeScript
import type { dkPlusSize, ClassListName } from '../_interface';
import type { returnType } from '../_utils/props';
import type { DefineComponent, PropType, Ref, ComputedRef, CSSProperties, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
import type { Install } from '../_utils/withInstall';
import mySwitch from "./src/switch";
export declare const DkSwitch: Install<DefineComponent<{
modelValue: returnType<BooleanConstructor, boolean>;
disabled: returnType<BooleanConstructor, boolean>;
size: returnType<PropType<dkPlusSize>, dkPlusSize | null>;
checkedColor: {
type: StringConstructor;
default: () => string | null;
};
uncheckedColor: {
type: StringConstructor;
default: () => string | null;
};
checkedText: returnType<PropType<"">, "" | null>;
uncheckedText: returnType<PropType<"">, "" | null>;
width: returnType<PropType<string>, string | null>;
checkedIcon: returnType<PropType<"">, "" | null>;
uncheckedIcon: returnType<PropType<"">, "" | null>;
loading: returnType<BooleanConstructor, boolean>;
checkedCustomIcon: returnType<PropType<"">, "" | null>;
uncheckedCustomIcon: returnType<PropType<"">, "" | null>;
}, {
switchRef: Ref<HTMLInputElement | undefined>;
handleChange: (e: Event) => void;
refreshStatus: () => void;
modelValue: Ref<boolean>;
disabled: Ref<boolean>;
checkedText: Ref<"">;
uncheckedText: Ref<"">;
checkText: Ref<"">;
checkIcon: Ref<"">;
loading: Ref<boolean>;
customIcon: Ref<"">;
classList: ComputedRef<ClassListName>;
styleList: CSSProperties;
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ("update:modelValue" | "change")[], "update:modelValue" | "change", PublicProps, Readonly<ExtractPropTypes<{
modelValue: returnType<BooleanConstructor, boolean>;
disabled: returnType<BooleanConstructor, boolean>;
size: returnType<PropType<dkPlusSize>, dkPlusSize | null>;
checkedColor: {
type: StringConstructor;
default: () => string | null;
};
uncheckedColor: {
type: StringConstructor;
default: () => string | null;
};
checkedText: returnType<PropType<"">, "" | null>;
uncheckedText: returnType<PropType<"">, "" | null>;
width: returnType<PropType<string>, string | null>;
checkedIcon: returnType<PropType<"">, "" | null>;
uncheckedIcon: returnType<PropType<"">, "" | null>;
loading: returnType<BooleanConstructor, boolean>;
checkedCustomIcon: returnType<PropType<"">, "" | null>;
uncheckedCustomIcon: returnType<PropType<"">, "" | null>;
}>> & {
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
onChange?: ((...args: any[]) => any) | undefined;
}, {
size: dkPlusSize;
disabled: boolean;
loading: boolean;
width: string;
modelValue: boolean;
checkedColor: string;
uncheckedColor: string;
checkedText: "";
uncheckedText: "";
checkedIcon: "";
uncheckedIcon: "";
checkedCustomIcon: "";
uncheckedCustomIcon: "";
}, {}>>;
export type switchInstance = InstanceType<typeof mySwitch>;