@vonage/vivid-react
Version:
Vivid wrapped for easy React usage & IDE autocomplete support & typescript typings
235 lines (230 loc) • 4.34 kB
JavaScript
/*
* DO NOT EDIT THIS FILE. IT IS GENERATED
*/
/*
Code in this file were generated using following JSON:
{
"kind": "class",
"description": "",
"name": "Accordion",
"slots": [
{
"description": "Default slot.",
"name": ""
}
],
"members": [
{
"kind": "field",
"name": "expandmode",
"type": {
"text": "AccordionExpandMode"
},
"description": "Controls the expand mode of the Accordion, either allowing\nsingle or multiple item expansion.",
"privacy": "public"
},
{
"kind": "field",
"name": "activeid",
"type": {
"text": "string | null"
}
},
{
"kind": "field",
"name": "activeItemIndex",
"type": {
"text": "number"
},
"default": "0"
},
{
"kind": "field",
"name": "accordionIds",
"type": {
"text": "Array<string | null>"
}
},
{
"kind": "field",
"name": "change",
"privacy": "private"
},
{
"kind": "method",
"name": "findExpandedItem",
"privacy": "private",
"return": {
"type": {
"text": "AccordionItem | null"
}
}
},
{
"kind": "field",
"name": "setItems",
"privacy": "private"
},
{
"kind": "method",
"name": "resetItems",
"privacy": "private",
"return": {
"type": {
"text": "void"
}
}
},
{
"kind": "field",
"name": "removeItemListeners",
"privacy": "private"
},
{
"kind": "field",
"name": "activeItemChange",
"privacy": "private"
},
{
"kind": "method",
"name": "getItemIds",
"privacy": "private",
"return": {
"type": {
"text": "Array<string | null>"
}
}
},
{
"kind": "method",
"name": "isSingleExpandMode",
"privacy": "private",
"return": {
"type": {
"text": "boolean"
}
}
},
{
"kind": "field",
"name": "handleItemKeyDown",
"privacy": "private"
},
{
"kind": "method",
"name": "adjust",
"privacy": "private",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "item",
"type": {
"text": "AccordionItem"
}
},
{
"name": "adjustment",
"type": {
"text": "number"
}
}
]
},
{
"kind": "method",
"name": "focusItem",
"privacy": "private",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "index",
"type": {
"text": "number"
}
}
]
},
{
"kind": "method",
"name": "closeAll",
"return": {
"type": {
"text": "void"
}
}
},
{
"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<string | null>"
},
"description": "Fires a custom 'change' event when the active item changes",
"name": "change"
}
],
"attributes": [
{
"name": "expand-mode",
"type": {
"text": "AccordionExpandMode"
},
"description": "Controls the expand mode of the Accordion, either allowing\nsingle or multiple item expansion.",
"fieldName": "expandmode"
}
],
"superclass": {
"name": "VividElement",
"module": "/src/shared/foundation/vivid-element/vivid-element"
},
"vividComponent": {
"public": true,
"name": "accordion"
}
}
*/
import wrapper from '@vonage/vivid-react-wrapper'
import { registerAccordion } from '@vonage/vivid'
registerAccordion('vvd3')
const VwcAccordion = wrapper(`vvd3-accordion`, {
events: [{"name":"change","propName":"onChange"}],
attributes: [],
properties: ['expandmode', 'activeid', 'activeItemIndex', 'accordionIds', 'VIVID_VERSION', 'componentName']
})
VwcAccordion.displayName = 'VwcAccordion'
export default VwcAccordion