UNPKG

@bitrix24/b24ui-nuxt

Version:

Bitrix24 UI-Kit for developing web applications REST API for NUXT & VUE

123 lines (122 loc) 3.89 kB
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 { BadgeProps } from '../types'; import type { AcceptableValue, ComponentConfig } from '../types/utils'; type Input = ComponentConfig<typeof theme, AppConfig, 'input'>; export interface InputProps<T extends AcceptableValue = AcceptableValue> 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 'air-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 'air-primary' */ tagColor?: BadgeProps['color']; /** * Highlight the ring color like a focus state * @defaultValue false */ highlight?: boolean; modelValue?: T; defaultValue?: T; modelModifiers?: { string?: boolean; number?: boolean; trim?: boolean; lazy?: boolean; nullify?: boolean; }; class?: any; b24ui?: Input['slots']; } export interface InputEmits<T extends AcceptableValue = AcceptableValue> { 'update:modelValue': [value: T]; 'blur': [event: FocusEvent]; 'change': [event: Event]; } export interface InputSlots { leading(props?: {}): any; default(props?: {}): any; trailing(props?: {}): any; } declare const _default: <T extends AcceptableValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{ props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{ readonly onBlur?: ((event: FocusEvent) => any) | undefined; readonly onChange?: ((event: Event) => any) | undefined; readonly "onUpdate:modelValue"?: ((value: T) => any) | undefined; } & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onBlur" | "onChange" | "onUpdate:modelValue"> & InputProps<T> & {}> & import("vue").PublicProps; expose(exposed: import("vue").ShallowUnwrapRef<{ inputRef: import("vue").Ref<HTMLInputElement | null, HTMLInputElement | null>; }>): void; attrs: any; slots: InputSlots; emit: ((evt: "blur", event: FocusEvent) => void) & ((evt: "change", event: Event) => void) & ((evt: "update:modelValue", value: T) => void); }>) => import("vue").VNode & { __ctx?: Awaited<typeof __VLS_setup>; }; export default _default; type __VLS_PrettifyLocal<T> = { [K in keyof T as K]: T[K]; } & {};