@bitrix24/b24ui-nuxt
Version:
Bitrix24 UI-Kit for developing web applications REST API for NUXT & VUE
121 lines (120 loc) • 3.4 kB
TypeScript
import type { InputHTMLAttributes } from 'vue';
import type { AppConfig } from '@nuxt/schema';
import theme from '#build/b24ui/input';
import type { UseComponentIconsProps } from '../composables/useComponentIcons';
import type { ComponentConfig } from '../types/utils';
type Input = ComponentConfig<typeof theme, AppConfig, 'input'>;
export interface InputProps extends UseComponentIconsProps {
/**
* The element or component this component should render as.
* @defaultValue 'div'
*/
as?: any;
id?: string;
name?: string;
/**
* @defaultValue 'text'
*/
type?: InputHTMLAttributes['type'];
/**
* The placeholder text when the input is empty.
*/
placeholder?: string;
/**
* @defaultValue 'primary'
*/
color?: Input['variants']['color'];
/**
* @defaultValue 'md'
*/
size?: Input['variants']['size'];
/**
* Removes padding from input
* @defaultValue false
*/
noPadding?: boolean;
/**
* Removes all borders (rings)
* @defaultValue false
*/
noBorder?: boolean;
/**
* Removes all borders (rings) except the bottom one
* @defaultValue false
*/
underline?: boolean;
/**
* Rounds the corners of the button
* @defaultValue false
*/
rounded?: boolean;
/**
* @defaultValue false
*/
required?: boolean;
/**
* @defaultValue 'off'
*/
autocomplete?: InputHTMLAttributes['autocomplete'];
/**
* @defaultValue false
*/
autofocus?: boolean;
/**
* @defaultValue 0
*/
autofocusDelay?: number;
/**
* @defaultValue false
*/
disabled?: boolean;
tag?: string;
/**
* @defaultValue 'primary'
*/
tagColor?: Input['variants']['tagColor'];
/**
* Highlight the ring color like a focus state
* @defaultValue false
*/
highlight?: boolean;
class?: any;
b24ui?: Input['slots'];
}
export interface InputEmits {
(e: 'update:modelValue', payload: string | number): void;
(e: 'blur', event: FocusEvent): void;
(e: 'change', event: Event): void;
}
export interface InputSlots {
leading(props?: {}): any;
default(props?: {}): any;
trailing(props?: {}): any;
}
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<InputProps & {
modelValue?: string | number | null;
}, {
inputRef: import("vue").Ref<HTMLInputElement | null, HTMLInputElement | null>;
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
"update:modelValue": (value: string | number | null | undefined) => any;
} & {
blur: (event: FocusEvent) => any;
change: (event: Event) => any;
"update:modelValue": (payload: string | number) => any;
}, string, import("vue").PublicProps, Readonly<InputProps & {
modelValue?: string | number | null;
}> & Readonly<{
onBlur?: ((event: FocusEvent) => any) | undefined;
onChange?: ((event: Event) => any) | undefined;
"onUpdate:modelValue"?: ((payload: string | number) => any) | undefined;
}>, {
type: import("vue").InputTypeHTMLAttribute;
autocomplete: string;
autofocusDelay: number;
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, InputSlots>;
export default _default;
type __VLS_WithSlots<T, S> = T & {
new (): {
$slots: S;
};
};