@vonage/vivid-react
Version:
Vivid wrapped for easy React usage & IDE autocomplete support & typescript typings
394 lines (389 loc) • 8.4 kB
JavaScript
/*
* DO NOT EDIT THIS FILE. IT IS GENERATED
*/
/*
Code in this file were generated using following JSON:
{
"kind": "class",
"description": "An Option Custom HTML Element.\nImplements https://www.w3.org/TR/wai-aria-1.1/#option | ARIA option .",
"name": "ListboxOption",
"cssProperties": [
{
"name": "--vvd-option-accent-primary",
"default": "var(--vvd-color-canvas-text)"
},
{
"name": "--vvd-option-accent-primary-text",
"default": "var(--vvd-color-canvas)"
},
{
"name": "--vvd-option-accent-primary-increment",
"default": "var(--vvd-color-neutral-800)"
},
{
"name": "--vvd-option-accent-firm",
"default": "var(--vvd-color-canvas-text)"
},
{
"name": "--vvd-option-accent-faint",
"default": "var(--vvd-color-neutral-50)"
},
{
"name": "--vvd-option-accent-soft",
"default": "var(--vvd-color-neutral-100)"
},
{
"name": "--vvd-option-accent-pale",
"default": "var(--vvd-color-neutral-300)"
},
{
"name": "--vvd-option-accent-dim",
"default": "var(--vvd-color-neutral-200)"
}
],
"slots": [
{
"description": "The preferred way to add an icon to the component.",
"name": "icon"
}
],
"members": [
{
"kind": "field",
"name": "checked",
"type": {
"text": "boolean | undefined"
},
"description": "The checked state is used when the parent listbox is in multiple selection mode.\nTo avoid accessibility conflicts, the checked state should not be present in\nsingle selection mode.",
"privacy": "public"
},
{
"kind": "field",
"name": "defaultSelected",
"type": {
"text": "boolean"
},
"default": "false",
"description": "The defaultSelected state of the option.",
"privacy": "public"
},
{
"kind": "method",
"name": "defaultSelectedChanged",
"privacy": "protected",
"return": {
"type": {
"text": "void"
}
}
},
{
"kind": "field",
"name": "disabled",
"type": {
"text": "boolean"
},
"description": "The disabled state of the option.",
"privacy": "public"
},
{
"kind": "method",
"name": "disabledChanged",
"privacy": "protected",
"return": {
"type": {
"text": "void"
}
}
},
{
"kind": "field",
"name": "selectedAttribute"
},
{
"kind": "field",
"name": "selected",
"type": {
"text": "boolean"
},
"description": "The checked state of the control.",
"privacy": "public"
},
{
"kind": "method",
"name": "selectedChanged",
"privacy": "protected",
"return": {
"type": {
"text": "void"
}
}
},
{
"kind": "field",
"name": "value",
"type": {
"text": "string"
},
"default": "''",
"description": "The value of the option.",
"privacy": "public"
},
{
"kind": "method",
"name": "valueChanged",
"privacy": "protected"
},
{
"kind": "field",
"name": "_label",
"type": {
"text": "string | undefined"
},
"privacy": "public",
"description": ""
},
{
"kind": "field",
"name": "label",
"type": {
"text": "string"
}
},
{
"kind": "field",
"name": "_text",
"type": {
"text": "string | undefined"
},
"privacy": "public",
"description": ""
},
{
"kind": "field",
"name": "text"
},
{
"kind": "field",
"name": "form",
"type": {
"text": "HTMLFormElement | null"
},
"readonly": true
},
{
"kind": "field",
"name": "matchedText",
"type": {
"text": "string | undefined"
},
"description": "Text to highlighted as matching a search query."
},
{
"kind": "field",
"name": "_hasMatchedText",
"readonly": true
},
{
"kind": "field",
"name": "tagConnotation",
"type": {
"text": "OptionTagConnotation | undefined"
},
"description": "When displayed as a tag, the connotation of the tag.",
"privacy": "public"
},
{
"kind": "field",
"name": "proxy",
"default": "new Option(\n\t\t\tthis.text,\n\t\t\tthis.value,\n\t\t\tthis.defaultSelected,\n\t\t\tthis.selected\n\t\t)",
"description": ""
},
{
"kind": "field",
"name": "_vividAriaBehaviour",
"default": "'host'",
"type": {
"text": "'host'"
},
"inheritedFrom": {
"name": "HostSemantics",
"module": "src/shared/aria/host-semantics.ts"
}
},
{
"kind": "field",
"name": "iconTrailing",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Indicates the icon affix alignment.",
"privacy": "public",
"inheritedFrom": {
"name": "AffixIconWithTrailing",
"module": "src/shared/patterns/affix.ts"
}
},
{
"kind": "field",
"name": "icon",
"type": {
"text": "string | undefined"
},
"description": "A decorative icon the custom element should have.",
"privacy": "public",
"inheritedFrom": {
"name": "AffixIcon",
"module": "src/shared/patterns/affix.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"
}
}
],
"attributes": [
{
"name": "selected",
"type": {
"text": "boolean"
},
"default": "false",
"description": "The defaultSelected state of the option.",
"fieldName": "defaultSelected"
},
{
"name": "disabled",
"type": {
"text": "boolean"
},
"description": "The disabled state of the option.",
"fieldName": "disabled"
},
{
"name": "current-selected",
"type": {
"text": "boolean"
},
"description": "The checked state of the control.",
"fieldName": "selected"
},
{
"name": "value",
"type": {
"text": "string"
},
"default": "''",
"description": "The value of the option.",
"fieldName": "value"
},
{
"name": "label",
"type": {
"text": "string | undefined"
},
"fieldName": "_label"
},
{
"name": "text",
"type": {
"text": "string | undefined"
},
"fieldName": "_text"
},
{
"name": "matched-text",
"type": {
"text": "string | undefined"
},
"description": "Text to highlighted as matching a search query.",
"fieldName": "matchedText"
},
{
"name": "tag-connotation",
"type": {
"text": "OptionTagConnotation | undefined"
},
"description": "When displayed as a tag, the connotation of the tag.",
"fieldName": "tagConnotation"
},
{
"name": "icon-trailing",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Indicates the icon affix alignment.",
"fieldName": "iconTrailing",
"inheritedFrom": {
"name": "AffixIconWithTrailing",
"module": "src/shared/patterns/affix.ts"
}
},
{
"name": "icon",
"type": {
"text": "string | undefined"
},
"description": "A decorative icon the custom element should have.",
"fieldName": "icon",
"inheritedFrom": {
"name": "AffixIcon",
"module": "src/shared/patterns/affix.ts"
}
}
],
"mixins": [
{
"name": "HostSemantics",
"module": "/src/shared/aria/host-semantics"
},
{
"name": "AffixIconWithTrailing",
"module": "/src/shared/patterns/affix"
}
],
"superclass": {
"name": "VividElement",
"module": "/src/shared/foundation/vivid-element/vivid-element"
},
"vividComponent": {
"public": true,
"name": "option"
}
}
*/
import wrapper from '@vonage/vivid-react-wrapper'
import { registerOption } from '@vonage/vivid'
registerOption('vvd3')
const VwcOption = wrapper(`vvd3-option`, {
events: [],
attributes: [],
properties: ['checked', 'defaultSelected', 'disabled', 'selectedAttribute', 'selected', 'value', '_label', 'label', '_text', 'text', 'matchedText', 'tagConnotation', 'proxy', '_vividAriaBehaviour', 'iconTrailing', 'icon', 'VIVID_VERSION', 'componentName']
})
VwcOption.displayName = 'VwcOption'
export default VwcOption