UNPKG

@wix/design-system

Version:

@wix/design-system

57 lines 2.81 kB
import * as React from 'react'; import { InputProps } from '../Input'; import { DropdownLayoutOption, DropdownLayoutValueOption } from '../DropdownLayout'; export interface AutoCompleteWithLabelProps { /** Sets a default value for those who want to use this component un-controlled. */ dataHook?: string; /** Defines a value label to show inside of a field. * @default '' */ label?: string; /** Specify an array of options to display in the dropdown list. */ options?: DropdownLayoutOption[]; /** Pass a component you want to show as the suffix of the input, e.g., text string, icon. */ suffix?: React.ReactNode[]; /** Specify the status of a field. */ status?: InputProps['status']; /** Defines the message to display on status icon hover. If not given or empty there will be no tooltip. */ statusMessage?: InputProps['statusMessage']; /** Defines a standard input onFocus callback. */ onFocus?: React.FocusEventHandler<HTMLInputElement>; /** Defines a standard input onBlur callback */ onBlur?: React.FocusEventHandler<HTMLInputElement>; /** Defines a standard input onChange callback. */ onChange?: React.ChangeEventHandler<HTMLInputElement>; /** Reference element data when a form is submitted. */ name?: string; /** Specifies the type of `<input/>` element to display. Default is text string. */ type?: string; /** Define a string that labels the current element in case where a text label is not visible on the screen. */ ariaLabel?: string; /** Focus the element on mount (standard React input autoFocus). */ autoFocus?: boolean; /** Sets the value of native autocomplete attribute (check the [HTML spec](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#attr-fe-autocomplete) for possible values * @default 'on' */ autocomplete?: string; /** Specifies whether input should be disabled or not. */ disabled?: boolean; /** * Specifies a CSS class name to be appended to the component's root element. * @internal */ className?: string; /** Sets the maximum number of characters that can be entered into a field. */ maxLength?: number; /** Sets a placeholder message to display. */ placeholder?: string; /** Defines a callback function which is called whenever user selects a different option in the list. */ onSelect?: (option: DropdownLayoutValueOption) => void; /** Indicates whether to render using the native select element */ native?: boolean; /** Value of rendered child input */ value?: string | number; /** Sets the maximum height of the dropdownLayout in pixels. */ maxHeightPixels?: string | number; } //# sourceMappingURL=AutoCompleteWithLabel.types.d.ts.map