@vonage/vivid-react
Version:
Vivid wrapped for easy React usage & IDE autocomplete support & typescript typings
90 lines (89 loc) • 5.07 kB
TypeScript
import React, { ReactNode, SyntheticEvent } from 'react';
/** VwcSearchableSelect
* For more info on this Vivid element please visit https://vivid.deno.dev/components/searchable-select
* @param {SearchableSelectAppearance | undefined} appearance **attribute** `appearance`
* @param {SearchableSelectShape | undefined} shape **attribute** `shape`
* @param {boolean} fixedDropdown **attribute** `fixed-dropdown`
* @param {string | undefined} placeholder **attribute** `placeholder`
* @param {boolean} open **attribute** `open`
* @param {boolean} multiple **attribute** `multiple`
* @param {boolean} externalTags **attribute** `external-tags`
* @param {number | null} maxLines **attribute** `max-lines`
* @param {string[]} values - List of selected values.
* @param {string[]} initialValues - The initial values. This value sets the `values` property
only when the `values` property has not been explicitly set.
* @param selectedIndex
* @param {(
option: ListboxOption,
searchText: string
) => boolean | undefined} optionFilter - Function to filter the options to display.
* @param {boolean} loading - Whether the component is in a loading state. **attribute** `loading`
* @param {boolean} clearable - Adds a clear button to the input field that clears the selected values. **attribute** `clearable`
* @param {number | null} maxSelected **attribute** `max-selected`
* @param setFormValue
* @param {string | undefined} helperText - Provides additional information to help the user enter the correct information.
To add HTML to the helper text, use the helper-text slot instead. **attribute** `helper-text`
* @param {string | undefined} errorText - Provides a custom error message. Any current error state will be overridden. **attribute** `error-text`
* @param validate
* @param {string | undefined} successText - Provides a custom success message. Any current error state will be overridden. **attribute** `success-text`
* @param {string | undefined} label - The label for the form element. **attribute** `label`
* @param {'delegate'} _vividAriaBehaviour
* @param {boolean} iconTrailing - Indicates the icon affix alignment. **attribute** `icon-trailing`
* @param {string | undefined} icon - A decorative icon the custom element should have. **attribute** `icon`
* @param {string} value - The current value of the element. **attribute** `current-value`
* @param currentValue
* @param {string} initialValue - The default value of the element. This value sets the `value` property
only when the `value` property has not been explicitly set. **attribute** `value`
* @param {boolean} disabled - Sets the element's disabled state. A disabled element will not be included during form submission. **attribute** `disabled`
* @param {string} name - The name of the element. This element's value will be surfaced during form submission under the provided name. **attribute** `name`
* @param {boolean} required - Require the field to be completed prior to form submission. **attribute** `required`
* @param {string} VIVID_VERSION - The current version of the Vivid library, which is useful for debugging.
It can be accessed from any Vivid element via `<el>.constructor.VIVID_VERSION`.
* @param {string} componentName - Core component name, without prefix
*/
declare const VwcSearchableSelect: {
(props: {
children?: ReactNode;
slot?: string | undefined;
id?: string | undefined;
style?: React.CSSProperties | undefined;
ref?: React.RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined;
onInput?: ((event: SyntheticEvent) => void) | undefined;
onSearchTextChange?: ((event: SyntheticEvent) => void) | undefined;
onChange?: ((event: SyntheticEvent) => void) | undefined;
appearance?: any;
shape?: any;
fixedDropdown?: boolean | undefined;
placeholder?: string | undefined;
open?: boolean | undefined;
multiple?: boolean | undefined;
externalTags?: boolean | undefined;
maxLines?: number | undefined;
values?: any[] | undefined;
initialValues?: any[] | undefined;
selectedIndex?: any;
optionFilter?: any;
loading?: boolean | undefined;
clearable?: boolean | undefined;
maxSelected?: number | undefined;
setFormValue?: any;
helperText?: string | undefined;
errorText?: string | undefined;
validate?: any;
successText?: string | undefined;
label?: string | undefined;
_vividAriaBehaviour?: any;
iconTrailing?: boolean | undefined;
icon?: string | undefined;
value?: string | undefined;
currentValue?: any;
initialValue?: string | undefined;
disabled?: boolean | undefined;
name?: string | undefined;
required?: boolean | undefined;
VIVID_VERSION?: string | undefined;
componentName?: string | undefined;
}): JSX.Element;
displayName: string;
};
export default VwcSearchableSelect;