UNPKG

@vonage/vivid-react

Version:

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

910 lines (905 loc) 22.6 kB
/* * DO NOT EDIT THIS FILE. IT IS GENERATED */ /* Code in this file were generated using following JSON: { "kind": "class", "description": "", "name": "TextArea", "cssProperties": [ { "name": "--vvd-text-area-success-primary", "default": "var(--vvd-color-success-500)" }, { "name": "--vvd-text-area-success-primary-text", "default": "var(--vvd-color-canvas)" }, { "name": "--vvd-text-area-success-primary-increment", "default": "var(--vvd-color-success-600)" }, { "name": "--vvd-text-area-success-intermediate", "default": "var(--vvd-color-success-500)" }, { "name": "--vvd-text-area-success-firm", "default": "var(--vvd-color-success-600)" }, { "name": "--vvd-text-area-success-fierce", "default": "var(--vvd-color-success-700)" }, { "name": "--vvd-text-area-success-faint", "default": "var(--vvd-color-success-50)" }, { "name": "--vvd-text-area-success-soft", "default": "var(--vvd-color-success-100)" }, { "name": "--vvd-text-area-alert-primary", "default": "var(--vvd-color-alert-500)" }, { "name": "--vvd-text-area-alert-primary-text", "default": "var(--vvd-color-canvas)" }, { "name": "--vvd-text-area-alert-primary-increment", "default": "var(--vvd-color-alert-600)" }, { "name": "--vvd-text-area-alert-intermediate", "default": "var(--vvd-color-alert-500)" }, { "name": "--vvd-text-area-alert-firm", "default": "var(--vvd-color-alert-600)" }, { "name": "--vvd-text-area-alert-fierce", "default": "var(--vvd-color-alert-700)" }, { "name": "--vvd-text-area-alert-faint", "default": "var(--vvd-color-alert-50)" }, { "name": "--vvd-text-area-alert-soft", "default": "var(--vvd-color-alert-100)" }, { "name": "--vvd-text-area-accent-primary", "default": "var(--vvd-color-canvas-text)" }, { "name": "--vvd-text-area-accent-primary-text", "default": "var(--vvd-color-canvas)" }, { "name": "--vvd-text-area-accent-primary-increment", "default": "var(--vvd-color-neutral-800)" }, { "name": "--vvd-text-area-accent-intermediate", "default": "var(--vvd-color-neutral-500)" }, { "name": "--vvd-text-area-accent-firm", "default": "var(--vvd-color-canvas-text)" }, { "name": "--vvd-text-area-accent-fierce", "default": "var(--vvd-color-neutral-700)" }, { "name": "--vvd-text-area-accent-faint", "default": "var(--vvd-color-neutral-50)" }, { "name": "--vvd-text-area-accent-soft", "default": "var(--vvd-color-neutral-100)" } ], "slots": [ { "description": "Describes how to use the text-area. Alternative to the `helper-text` attribute.", "name": "helper-text" } ], "members": [ { "kind": "field", "name": "readOnly", "type": { "text": "boolean" }, "description": "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.", "privacy": "public" }, { "kind": "field", "name": "resize", "type": { "text": "TextAreaResize" }, "description": "The resize mode of the element.", "privacy": "public" }, { "kind": "field", "name": "autofocus", "type": { "text": "boolean" }, "description": "Indicates that this element should get focus after the page finishes loading.", "privacy": "public" }, { "kind": "field", "name": "formId", "type": { "text": "string" }, "description": "The https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id | id of the https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form | form the element is associated to", "privacy": "public" }, { "kind": "field", "name": "list", "type": { "text": "string" }, "description": "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.", "privacy": "public" }, { "kind": "field", "name": "maxlength", "type": { "text": "number" }, "description": "The maximum number of characters a user can enter.", "privacy": "public", "inheritedFrom": { "name": "WithCharCount", "module": "src/shared/patterns/char-count/char-count.ts" } }, { "kind": "field", "name": "minlength", "type": { "text": "number" }, "description": "The minimum number of characters a user can enter.", "privacy": "public" }, { "kind": "field", "name": "placeholder", "type": { "text": "string" }, "description": "Sets the placeholder value of the element, generally used to provide a hint to the user.", "privacy": "public" }, { "kind": "field", "name": "cols", "type": { "text": "number" }, "default": "20", "description": "Sizes the element horizontally by a number of character columns.", "privacy": "public" }, { "kind": "field", "name": "rows", "type": { "text": "number" }, "description": "Sizes the element vertically by a number of character rows.", "privacy": "public" }, { "kind": "field", "name": "spellcheck", "type": { "text": "boolean" }, "description": "Sets if the element is eligible for spell checking\nbut the UA.", "privacy": "public" }, { "kind": "method", "name": "select", "description": "Selects all the text in the text area", "privacy": "public" }, { "kind": "method", "name": "validate", "return": { "type": { "text": "void" } }, "description": "{@inheritDoc (FormAssociated:interface).validate}", "inheritedFrom": { "name": "WithErrorText", "module": "src/shared/patterns/form-elements/with-error-text.ts" } }, { "kind": "field", "name": "wrap", "type": { "text": "TextAreaWrap | undefined" }, "description": "The wrap attribute", "privacy": "public" }, { "kind": "field", "name": "#reflectToTextArea", "privacy": "private", "type": { "text": "Reflector<this, HTMLTextAreaElement> | undefined" } }, { "kind": "field", "name": "helperText", "type": { "text": "string | undefined" }, "description": "Provides additional information to help the user enter the correct information.\nTo add HTML to the helper text, use the helper-text slot instead.", "privacy": "public", "inheritedFrom": { "name": "WithFeedback", "module": "src/shared/feedback/mixins.ts" } }, { "kind": "field", "name": "value", "type": { "text": "string" }, "description": "The current value of the element.", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "field", "name": "charCount", "type": { "text": "boolean" }, "default": "false", "description": "Use in combination with `maxlength` to display a character count.", "privacy": "public", "inheritedFrom": { "name": "WithCharCount", "module": "src/shared/patterns/char-count/char-count.ts" } }, { "kind": "field", "name": "errorText", "type": { "text": "string | undefined" }, "description": "Provides a custom error message. Any current error state will be overridden.", "privacy": "public", "inheritedFrom": { "name": "WithErrorText", "module": "src/shared/patterns/form-elements/with-error-text.ts" } }, { "kind": "field", "name": "#blockValidateCalls", "privacy": "private", "type": { "text": "boolean" }, "default": "false", "inheritedFrom": { "name": "WithErrorText", "module": "src/shared/patterns/form-elements/with-error-text.ts" } }, { "kind": "field", "name": "#originalValidateFn", "privacy": "private", "type": { "text": "() => void" }, "inheritedFrom": { "name": "WithErrorText", "module": "src/shared/patterns/form-elements/with-error-text.ts" } }, { "kind": "method", "name": "#forceCustomError", "parameters": [ { "name": "errorMessage", "type": { "text": "string" } } ], "inheritedFrom": { "name": "WithErrorText", "module": "src/shared/patterns/form-elements/with-error-text.ts" } }, { "kind": "method", "name": "#clearCustomErrorAndRevalidate", "inheritedFrom": { "name": "WithErrorText", "module": "src/shared/patterns/form-elements/with-error-text.ts" } }, { "kind": "field", "name": "successText", "type": { "text": "string | undefined" }, "description": "Provides a custom success message. Any current error state will be overridden.", "privacy": "public", "inheritedFrom": { "name": "WithSuccessText", "module": "src/shared/patterns/form-elements/with-success-text.ts" } }, { "kind": "field", "name": "label", "type": { "text": "string | undefined" }, "description": "The label for the form element.", "inheritedFrom": { "name": "FormElement", "module": "src/shared/patterns/form-elements/form-element.ts" } }, { "kind": "field", "name": "#handleInvalidEvent", "privacy": "private", "inheritedFrom": { "name": "FormElement", "module": "src/shared/patterns/form-elements/form-element.ts" } }, { "kind": "field", "name": "_vividAriaBehaviour", "default": "'delegate'", "type": { "text": "'delegate'" }, "inheritedFrom": { "name": "DelegatesAria", "module": "src/shared/aria/delegates-aria.ts" } }, { "kind": "field", "name": "validity", "type": { "text": "ValidityState" }, "description": "Returns the validity state of the element", "readonly": true, "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "field", "name": "form", "type": { "text": "HTMLFormElement | null" }, "description": "Retrieve a reference to the associated form.\nReturns null if not associated to any form.", "readonly": true, "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "field", "name": "validationMessage", "type": { "text": "string" }, "description": "Retrieve the localized validation message,\nor custom validation message if set.", "readonly": true, "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "field", "name": "willValidate", "type": { "text": "boolean" }, "description": "Whether the element will be validated when the\nform is submitted", "readonly": true, "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "field", "name": "labels", "type": { "text": "ReadonlyArray<Node>" }, "description": "A reference to all associated label elements", "readonly": true, "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "field", "name": "currentValue", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "field", "name": "initialValue", "type": { "text": "string" }, "description": "The default value of the element. This value sets the `value` property\nonly when the `value` property has not been explicitly set.", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "field", "name": "disabled", "type": { "text": "boolean" }, "default": "false", "description": "Sets the element's disabled state. A disabled element will not be included during form submission.", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "field", "name": "name", "type": { "text": "string" }, "description": "The name of the element. This element's value will be surfaced during form submission under the provided name.", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "field", "name": "required", "type": { "text": "boolean" }, "description": "Require the field to be completed prior to form submission.", "default": "false", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "method", "name": "checkValidity", "return": { "type": { "text": "boolean" } }, "description": "Return the current validity of the element.", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "method", "name": "reportValidity", "return": { "type": { "text": "boolean" } }, "description": "Return the current validity of the element.\nIf false, fires an invalid event at the element.", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "field", "name": "VIVID_VERSION", "static": true, "default": "__PACKAGE_VERSION__", "description": "The current version of the Vivid library, which is useful for debugging.\nIt can be accessed from any Vivid element via `<el>.constructor.VIVID_VERSION`.", "type": { "text": "string" }, "inheritedFrom": { "name": "VividElement", "module": "src/shared/foundation/vivid-element/vivid-element.ts" } }, { "kind": "field", "name": "componentName", "type": { "text": "string" }, "static": true, "description": "Core component name, without prefix", "inheritedFrom": { "name": "VividElement", "module": "src/shared/foundation/vivid-element/vivid-element.ts" } } ], "events": [ { "type": { "text": "CustomEvent<undefined>" }, "description": "Emits a custom 'change' event when the textarea emits a change event", "name": "change" } ], "attributes": [ { "name": "readOnly", "type": { "text": "boolean" }, "description": "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.", "fieldName": "readOnly" }, { "name": "resize", "type": { "text": "TextAreaResize" }, "description": "The resize mode of the element.", "fieldName": "resize" }, { "name": "autofocus", "type": { "text": "boolean" }, "description": "Indicates that this element should get focus after the page finishes loading.", "fieldName": "autofocus" }, { "name": "form", "type": { "text": "string" }, "description": "The https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id | id of the https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form | form the element is associated to", "fieldName": "formId" }, { "name": "list", "type": { "text": "string" }, "description": "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.", "fieldName": "list" }, { "name": "maxlength", "type": { "text": "number" }, "description": "The maximum number of characters a user can enter.", "fieldName": "maxlength" }, { "name": "minlength", "type": { "text": "number" }, "description": "The minimum number of characters a user can enter.", "fieldName": "minlength" }, { "name": "placeholder", "type": { "text": "string" }, "description": "Sets the placeholder value of the element, generally used to provide a hint to the user.", "fieldName": "placeholder" }, { "name": "cols", "type": { "text": "number" }, "default": "20", "description": "Sizes the element horizontally by a number of character columns.", "fieldName": "cols" }, { "name": "rows", "type": { "text": "number" }, "description": "Sizes the element vertically by a number of character rows.", "fieldName": "rows" }, { "name": "spellcheck", "type": { "text": "boolean" }, "description": "Sets if the element is eligible for spell checking\nbut the UA.", "fieldName": "spellcheck" }, { "name": "wrap", "type": { "text": "TextAreaWrap | undefined" }, "description": "The wrap attribute", "fieldName": "wrap" }, { "name": "helper-text", "type": { "text": "string | undefined" }, "description": "Provides additional information to help the user enter the correct information.\nTo add HTML to the helper text, use the helper-text slot instead.", "fieldName": "helperText", "inheritedFrom": { "name": "WithFeedback", "module": "src/shared/feedback/mixins.ts" } }, { "name": "char-count", "type": { "text": "boolean" }, "default": "false", "description": "Use in combination with `maxlength` to display a character count.", "fieldName": "charCount", "inheritedFrom": { "name": "WithCharCount", "module": "src/shared/patterns/char-count/char-count.ts" } }, { "name": "error-text", "type": { "text": "string | undefined" }, "description": "Provides a custom error message. Any current error state will be overridden.", "fieldName": "errorText", "inheritedFrom": { "name": "WithErrorText", "module": "src/shared/patterns/form-elements/with-error-text.ts" } }, { "name": "success-text", "type": { "text": "string | undefined" }, "description": "Provides a custom success message. Any current error state will be overridden.", "fieldName": "successText", "inheritedFrom": { "name": "WithSuccessText", "module": "src/shared/patterns/form-elements/with-success-text.ts" } }, { "name": "label", "type": { "text": "string | undefined" }, "description": "The label for the form element.", "fieldName": "label", "inheritedFrom": { "name": "FormElement", "module": "src/shared/patterns/form-elements/form-element.ts" } }, { "name": "current-value", "type": { "text": "string" }, "description": "The current value of the element.", "fieldName": "value", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "name": "value", "type": { "text": "string" }, "description": "The default value of the element. This value sets the `value` property\nonly when the `value` property has not been explicitly set.", "fieldName": "initialValue", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "name": "disabled", "type": { "text": "boolean" }, "default": "false", "description": "Sets the element's disabled state. A disabled element will not be included during form submission.", "fieldName": "disabled", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "name": "name", "type": { "text": "string" }, "description": "The name of the element. This element's value will be surfaced during form submission under the provided name.", "fieldName": "name", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "name": "required", "type": { "text": "boolean" }, "description": "Require the field to be completed prior to form submission.", "default": "false", "fieldName": "required", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } } ], "mixins": [ { "name": "WithContextualHelp", "module": "/src/shared/patterns" }, { "name": "WithFeedback", "module": "/src/shared/feedback/mixins" }, { "name": "WithCharCount", "module": "/src/shared/patterns" }, { "name": "WithErrorText", "module": "/src/shared/patterns" }, { "name": "WithSuccessText", "module": "/src/shared/patterns" }, { "name": "FormElement", "module": "/src/shared/patterns" }, { "name": "DelegatesAria", "module": "/src/shared/aria/delegates-aria" }, { "name": "FormAssociated", "module": "/src/shared/foundation/form-associated/form-associated" } ], "superclass": { "name": "VividElement", "module": "/src/shared/foundation/vivid-element/vivid-element" }, "vividComponent": { "public": true, "name": "text-area", "vueModels": [ { "name": "modelValue", "propName": "value", "eventNames": [ "input" ], "valueMapping": "event.currentTarget.value" } ] }, "vividTesting": { "selectors": [], "actions": [ { "name": "fill", "args": [ "fill", "#control" ] }, { "name": "clear", "args": [ "clear", "#control" ] } ], "queries": [], "refs": [ { "name": "control", "args": [ "shadow", ".control" ] } ] } } */ import wrapper from '@vonage/vivid-react-wrapper' import { registerTextArea } from '@vonage/vivid' registerTextArea('vvd3') const VwcTextArea = wrapper(`vvd3-text-area`, { events: [{"name":"input","propName":"onInput"},{"name":"change","propName":"onChange"}], attributes: [], properties: ['readOnly', 'resize', 'autofocus', 'formId', 'list', 'maxlength', 'minlength', 'placeholder', 'cols', 'rows', 'spellcheck', 'wrap', 'helperText', 'value', 'charCount', 'errorText', 'successText', 'label', '_vividAriaBehaviour', 'currentValue', 'initialValue', 'disabled', 'name', 'required', 'VIVID_VERSION', 'componentName'] }) VwcTextArea.displayName = 'VwcTextArea' export default VwcTextArea