UNPKG

@harvest-profit/npk

Version:
73 lines 2.16 kB
import React, { ReactNode, ComponentType, Ref, HTMLAttributes } from 'react'; export declare const BaseInputContext: React.Context<BaseInputContextType>; export declare const useBaseInput: (props: any) => { disabled: any; 'aria-label': any; 'aria-labelledby': any; id: any; name: any; autoFocus: any; placeholder: any; 'aria-invalid': any; 'aria-required': any; 'aria-describedby': any; 'aria-controls': any; 'aria-activedescendant': any; 'aria-autocomplete': any; autoComplete: any; autoCorrect: any; autoCapitalize: any; form: any; rows: any; type: any; }; declare const BaseInput: React.FC<BaseInputProps>; export default BaseInput; interface LabelObjectType { label?: string; description?: string; requirement?: string; info?: string; error?: string; uuid?: string; additional?: string; } interface BaseInputContextType { variant?: 'default' | 'invisible' | 'plain'; size?: 'sm' | 'md' | 'lg'; align?: 'start' | 'center' | 'end'; disabled?: boolean; loading?: boolean; muted?: boolean; id?: string; name?: string; 'aria-label'?: string; 'aria-labelledby'?: string; labelingIds?: LabelObjectType; } export interface BaseInputProps extends HTMLAttributes<HTMLElement> { className?: string; variant?: 'default' | 'invisible' | 'plain'; as?: keyof React.JSX.IntrinsicElements | ComponentType<any>; disabled?: boolean; size?: 'sm' | 'md' | 'lg'; align?: 'start' | 'center' | 'end'; labelAlign?: 'start' | 'center' | 'end'; leadingVisual?: ReactNode | any; trailingVisual?: ReactNode | any; children?: ReactNode; contentsProps?: HTMLAttributes<HTMLDivElement>; contentsRef?: Ref<HTMLDivElement>; containsSegments?: boolean; loading?: boolean; block?: boolean; label?: string | ReactNode; labelRequirement?: string | ReactNode; labelDescription?: string | ReactNode; info?: string | ReactNode; error?: string | ReactNode; type?: string; width?: string | number; [key: string]: any; } //# sourceMappingURL=BaseInput.d.ts.map