UNPKG

@vonage/vivid-react

Version:

Vivid wrapped for easy React usage & IDE autocomplete support & typescript typings

97 lines (96 loc) 6.72 kB
import React, { ReactNode, SyntheticEvent } from 'react'; /** Base class for text-field * For more info on this Vivid element please visit https://vivid.deno.dev/components/text-field * @param {string | undefined} icon **attribute** `icon` * @param {string | undefined} value **attribute** `current-value` * @param {string | undefined} placeholder **attribute** `placeholder` * @param {string | undefined} label **attribute** `label` * @param {any} onInput * @param {number | undefined} charCount **attribute** `char-count` * @param {boolean | undefined} disabled **attribute** `disabled` * @param {string | undefined} errorText **attribute** `error-text` * @param {string | undefined} helperText **attribute** `helper-text` * @param {boolean | undefined} required **attribute** `required` * @param {string | undefined} successText **attribute** `success-text` * @param {boolean} readOnly - When true, the control will be immutable by user interaction. See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly | readonly HTML attribute for more information. **attribute** `readonly` * @param {boolean} autofocus - Indicates that this element should get focus after the page finishes loading. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefautofocus | autofocus HTML attribute for more information. **attribute** `autofocus` * @param {string} placeholder - Sets the placeholder value of the element, generally used to provide a hint to the user. **attribute** `placeholder` * @param {TextFieldType} type - Allows setting a type or mode of text. **attribute** `type` * @param {string} list - Allows associating a https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist | datalist to the element by https://developer.mozilla.org/en-US/docs/Web/API/Element/id. **attribute** `list` * @param {number} maxlength - The maximum number of characters a user can enter. **attribute** `maxlength` * @param {number} minlength - The minimum number of characters a user can enter. **attribute** `minlength` * @param {string} pattern - A regular expression that the value must match to pass validation. **attribute** `pattern` * @param {number} size - Sets the width of the element to a specified number of characters. **attribute** `size` * @param {boolean} spellcheck - Controls whether or not to enable spell checking for the input field, or if the default spell checking configuration should be used. **attribute** `spellcheck` * @param {TextFieldAppearance | undefined} appearance **attribute** `appearance` * @param {TextFieldShape | undefined} shape **attribute** `shape` * @param {string | undefined} autoComplete **attribute** `autoComplete` * @param {TextFieldSize | undefined} scale - The size the text-field should have. **attribute** `scale` * @param {string} inputMode - Hints at the type of data that might be entered by the user while editing the element or its contents. This allows a browser to display an appropriate virtual keyboard. **attribute** `inputmode` * @param {HTMLElement[] | undefined} leadingActionItemsSlottedContent * @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} value - The current value of the element. **attribute** `current-value` * @param {boolean} charCount - Use in combination with `maxlength` to display a character count. **attribute** `char-count` * @param {string | undefined} errorText - Provides a custom error message. Any current error state will be overridden. **attribute** `error-text` * @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 {string | undefined} icon - A decorative icon the custom element should have. **attribute** `icon` * @param {'delegate'} _vividAriaBehaviour * @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 VwcTextField: { (props: { children?: ReactNode; slot?: string | undefined; id?: string | undefined; style?: React.CSSProperties | undefined; ref?: React.RefObject<HTMLDivElement> | ((instance: HTMLDivElement | null) => void) | null | undefined; onChange?: ((event: SyntheticEvent) => void) | undefined; onBlur?: ((event: SyntheticEvent) => void) | undefined; onFocus?: ((event: SyntheticEvent) => void) | undefined; onInput?: ((event: SyntheticEvent) => void) | undefined; icon?: string | undefined; value?: string | undefined; placeholder?: string | undefined; label?: string | undefined; charCount?: any; disabled?: any; errorText?: string | undefined; helperText?: string | undefined; required?: any; successText?: string | undefined; readOnly?: boolean | undefined; autofocus?: boolean | undefined; type?: any; list?: string | undefined; maxlength?: number | undefined; minlength?: number | undefined; pattern?: string | undefined; size?: number | undefined; spellcheck?: boolean | undefined; appearance?: any; shape?: any; autoComplete?: string | undefined; scale?: any; inputMode?: string | undefined; leadingActionItemsSlottedContent?: any; _vividAriaBehaviour?: any; currentValue?: any; initialValue?: string | undefined; name?: string | undefined; VIVID_VERSION?: string | undefined; componentName?: string | undefined; }): JSX.Element; displayName: string; }; export default VwcTextField;