@gits-id/button
Version:
GITS Button Component
198 lines (197 loc) • 8.26 kB
TypeScript
import type { DefaultColors } from '@gits-id/theme/defaultTheme';
import type { RouteLocationRaw } from 'vue-router';
export declare type ButtonColors = DefaultColors | string;
export interface Props {
color?: ButtonColors;
size?: 'sm' | 'md' | 'lg' | string;
to?: RouteLocationRaw;
href?: string;
text?: boolean;
outlined?: boolean;
rounded?: boolean;
disabled?: boolean;
noRing?: boolean;
tile?: boolean;
block?: boolean;
shadow?: boolean;
icon?: boolean;
loading?: boolean;
loadingText?: string;
newTab?: boolean;
type?: 'submit' | 'reset' | 'button';
/**
* @deprecated
*/
ring?: boolean;
/**
* @deprecated
*/
solid?: boolean;
fab?: boolean;
loadingIcon?: string;
prefix?: boolean;
prefixIcon?: string;
prefixIconSize?: string;
prefixIconClass?: string;
suffix?: boolean;
suffixIcon?: string;
suffixIconSize?: string;
suffixIconClass?: string;
loadingClass?: string;
flush?: boolean;
}
declare const _default: {
new (...args: any[]): {
$: import("vue").ComponentInternalInstance;
$data: {};
$props: Partial<{
color: string;
size: string;
loadingText: string;
type: "button" | "submit" | "reset";
loadingIcon: string;
prefixIcon: string;
prefixIconSize: string;
prefixIconClass: string;
suffixIcon: string;
suffixIconSize: string;
suffixIconClass: string;
loadingClass: string;
}> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
size: string;
color: string;
type: string;
loadingText: string;
loadingIcon: string;
prefixIcon: string;
prefixIconClass: string;
prefixIconSize: string;
suffixIcon: string;
suffixIconSize: string;
suffixIconClass: string;
loadingClass: string;
}>>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "color" | "size" | "loadingText" | "type" | "loadingIcon" | "prefixIcon" | "prefixIconSize" | "prefixIconClass" | "suffixIcon" | "suffixIconSize" | "suffixIconClass" | "loadingClass">;
$attrs: {
[x: string]: unknown;
};
$refs: {
[x: string]: unknown;
};
$slots: Readonly<{
[name: string]: import("vue").Slot | undefined;
}>;
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null;
$emit: (event: string, ...args: any[]) => void;
$el: any;
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
size: string;
color: string;
type: string;
loadingText: string;
loadingIcon: string;
prefixIcon: string;
prefixIconClass: string;
prefixIconSize: string;
suffixIcon: string;
suffixIconSize: string;
suffixIconClass: string;
loadingClass: string;
}>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
color: string;
size: string;
loadingText: string;
type: "button" | "submit" | "reset";
loadingIcon: string;
prefixIcon: string;
prefixIconSize: string;
prefixIconClass: string;
suffixIcon: string;
suffixIconSize: string;
suffixIconClass: string;
loadingClass: string;
}> & {
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
created?: ((() => void) | (() => void)[]) | undefined;
beforeMount?: ((() => void) | (() => void)[]) | undefined;
mounted?: ((() => void) | (() => void)[]) | undefined;
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
updated?: ((() => void) | (() => void)[]) | undefined;
activated?: ((() => void) | (() => void)[]) | undefined;
deactivated?: ((() => void) | (() => void)[]) | undefined;
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
destroyed?: ((() => void) | (() => void)[]) | undefined;
unmounted?: ((() => void) | (() => void)[]) | undefined;
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>> | null, info: string) => boolean | void)[]) | undefined;
};
$forceUpdate: () => void;
$nextTick: typeof import("vue").nextTick;
$watch(source: string | Function, cb: Function, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
} & Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
size: string;
color: string;
type: string;
loadingText: string;
loadingIcon: string;
prefixIcon: string;
prefixIconClass: string;
prefixIconSize: string;
suffixIcon: string;
suffixIconSize: string;
suffixIconClass: string;
loadingClass: string;
}>>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties;
__isFragment?: undefined;
__isTeleport?: undefined;
__isSuspense?: undefined;
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<Props>, {
size: string;
color: string;
type: string;
loadingText: string;
loadingIcon: string;
prefixIcon: string;
prefixIconClass: string;
prefixIconSize: string;
suffixIcon: string;
suffixIconSize: string;
suffixIconClass: string;
loadingClass: string;
}>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
color: string;
size: string;
loadingText: string;
type: "button" | "submit" | "reset";
loadingIcon: string;
prefixIcon: string;
prefixIconSize: string;
prefixIconClass: string;
suffixIcon: string;
suffixIconSize: string;
suffixIconClass: string;
loadingClass: string;
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
$slots: {
prefix: (_: {}) => any;
default: (_: {}) => any;
suffix: (_: {}) => any;
};
});
export default _default;
declare type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
declare type __VLS_TypePropsToRuntimeProps<T> = {
[K in keyof T]-?: {} extends Pick<T, K> ? {
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
} : {
type: import('vue').PropType<T[K]>;
required: true;
};
};
declare type __VLS_WithDefaults<P, D> = {
[K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
default: D[K];
} : P[K];
};