@vonage/vivid-react
Version:
Vivid wrapped for easy React usage & IDE autocomplete support & typescript typings
288 lines (283 loc) • 6.51 kB
JavaScript
/*
* DO NOT EDIT THIS FILE. IT IS GENERATED
*/
/*
Code in this file were generated using following JSON:
{
"kind": "class",
"description": "",
"name": "TreeItem",
"cssProperties": [
{
"name": "--vvd-tree-item-accent-primary",
"default": "var(--vvd-color-canvas-text)"
},
{
"name": "--vvd-tree-item-accent-primary-text",
"default": "var(--vvd-color-canvas)"
},
{
"name": "--vvd-tree-item-accent-primary-increment",
"default": "var(--vvd-color-neutral-800)"
},
{
"name": "--vvd-tree-item-accent-faint",
"default": "var(--vvd-color-neutral-50)"
},
{
"name": "--vvd-tree-item-accent-soft",
"default": "var(--vvd-color-neutral-100)"
},
{
"name": "--vvd-tree-item-accent-firm",
"default": "var(--vvd-color-canvas-text)"
}
],
"slots": [
{
"description": "To specify a child tree item.",
"name": "item"
},
{
"description": "The preferred way to add an icon to the component.",
"name": "icon"
}
],
"members": [
{
"kind": "field",
"name": "text",
"type": {
"text": "string | undefined"
},
"description": "Indicates the text's text.",
"privacy": "public"
},
{
"kind": "field",
"name": "expanded",
"type": {
"text": "boolean"
},
"default": "false",
"description": "When true, the control will be appear expanded by user interaction.",
"privacy": "public"
},
{
"kind": "method",
"name": "expandedChanged",
"return": {
"type": {
"text": "void"
}
}
},
{
"kind": "field",
"name": "selected",
"type": {
"text": "boolean"
},
"default": "false",
"description": "When true, the control will appear selected by user interaction.",
"privacy": "public"
},
{
"kind": "method",
"name": "selectedChanged",
"return": {
"type": {
"text": "void"
}
}
},
{
"kind": "field",
"name": "disabled",
"type": {
"text": "boolean"
},
"default": "false",
"description": "When true, the control will be immutable by user interaction. See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled | disabled HTML attribute for more information.",
"privacy": "public"
},
{
"kind": "method",
"name": "itemsChanged",
"return": {
"type": {
"text": "void"
}
}
},
{
"kind": "method",
"name": "focusItem",
"static": true,
"parameters": [
{
"name": "el",
"type": {
"text": "HTMLElement"
},
"description": "the element to focus"
}
],
"description": "Places document focus on a tree item",
"privacy": "public"
},
{
"kind": "field",
"name": "isNestedItem",
"description": "Whether the tree is nested",
"privacy": "public",
"readonly": true
},
{
"kind": "field",
"name": "_vividAriaBehaviour",
"default": "'host'",
"type": {
"text": "'host'"
},
"inheritedFrom": {
"name": "HostSemantics",
"module": "src/shared/aria/host-semantics.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"
}
}
],
"events": [
{
"type": {
"text": "CustomEvent<HTMLElement>"
},
"description": "Fires a custom 'expanded-change' event when the expanded state changes",
"name": "expanded-change"
},
{
"type": {
"text": "CustomEvent<HTMLElement>"
},
"description": "Fires a custom 'selected-change' event when the selected state changes",
"name": "selected-change"
}
],
"attributes": [
{
"name": "text",
"type": {
"text": "string | undefined"
},
"description": "Indicates the text's text.",
"fieldName": "text"
},
{
"name": "expanded",
"type": {
"text": "boolean"
},
"default": "false",
"description": "When true, the control will be appear expanded by user interaction.",
"fieldName": "expanded"
},
{
"name": "selected",
"type": {
"text": "boolean"
},
"default": "false",
"description": "When true, the control will appear selected by user interaction.",
"fieldName": "selected"
},
{
"name": "disabled",
"type": {
"text": "boolean"
},
"default": "false",
"description": "When true, the control will be immutable by user interaction. See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled | disabled HTML attribute for more information.",
"fieldName": "disabled"
},
{
"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": "AffixIcon",
"module": "/src/shared/patterns/affix"
}
],
"superclass": {
"name": "VividElement",
"module": "/src/shared/foundation/vivid-element/vivid-element"
},
"vividComponent": {
"public": true,
"name": "tree-item"
}
}
*/
import wrapper from '@vonage/vivid-react-wrapper'
import { registerTreeItem } from '@vonage/vivid'
registerTreeItem('vvd3')
const VwcTreeItem = wrapper(`vvd3-tree-item`, {
events: [{"name":"selected-change","propName":"onSelectedChange"},{"name":"expanded-change","propName":"onExpandedChange"}],
attributes: [],
properties: ['text', 'expanded', 'selected', 'disabled', '_vividAriaBehaviour', 'icon', 'VIVID_VERSION', 'componentName']
})
VwcTreeItem.displayName = 'VwcTreeItem'
export default VwcTreeItem