import { ElementType, ComponentPropsWithRef, ReactElement, RefObject, Context, ReactNode, ChangeEvent } from 'react'; declare function requiredProp(propName?: string): never; type Value = number | string | null; type LeafValue = string | number | boolean; declare function flatten>(obj: Record, parentPath?: string[], result?: Record): Record; type PropertyAccessorProxy = { [P in keyof T]: T[P] extends Value ? U : PropertyAccessorProxy; }; type CSSPropertyAccessorProxy = PropertyAccessorProxy; declare function cssProxy(object: T): CSSPropertyAccessorProxy; declare class CssCustomProperty { value: T; path: string[]; constructor(path: string[], value: T); raw(): T; valueOf(): string; } type As = ElementType; type PropsWithAs = Props & Omit, 'as' | keyof Props> & { as?: Type; }; interface ComponentWithAs { (props: PropsWithAs & { as: Type; }): ReactElement; (props: PropsWithAs): ReactElement; displayName?: string; } declare function withAs(component: (props: PropsWithAs) => ReactNode): ComponentWithAs; type AssignableRef = { bivarianceHack(instance: ValueType | null): void; }['bivarianceHack'] | RefObject; declare function assignRef(ref: AssignableRef | null | undefined, value: any): void; declare function useForkedRef(...refs: (AssignableRef | null | undefined)[]): ((node: any) => void) | null; declare function createNamedContext(name: string, defaultValue: ContextValueType): Context; /** * Group a collection by a given key. * * Returns a new object with the keys being the set * of distinct results from the `groupKey` function. */ declare function groupBy(collection: Iterable, groupKey: (item: T) => K): Record; /** * Make sure the value is enclosed in an array. * * If the value already is an array, it will do nothing. */ declare function toCssLength(value: T): T | string; declare function toArray(value: T | T[] | null): T[]; declare function indexByKey>(collection: Iterable, key: keyof T): Record; interface InputProps { error?: ReactNode; hint?: ReactNode; label?: ReactNode; size?: string | number; multiline?: boolean; startAdornment?: ReactNode; endAdornment?: ReactNode; inputClassName?: string; wrapperRef?: React.Ref | null | undefined; } /** * With `multiline`, Input renders a textarea, so it takes textarea props * like `rows`, and the ref and events are for a textarea. */ type MultilineInput = (props: PropsWithAs) => ReactElement; type InputWithMultiline = MultilineInput & ComponentWithAs; declare const Input: InputWithMultiline; declare function useInputState(initialValue: string): { value: string; onChange: (e: ChangeEvent) => void; }; export { Input as I, CssCustomProperty as c, assignRef as f, createNamedContext as g, cssProxy as h, flatten as i, groupBy as j, indexByKey as k, toCssLength as l, useInputState as m, requiredProp as r, toArray as t, useForkedRef as u, withAs as w }; export type { As as A, ComponentWithAs as C, PropertyAccessorProxy as P, CSSPropertyAccessorProxy as a, AssignableRef as b, InputProps as d, PropsWithAs as e };