@vonage/vivid-react
Version:
Vivid wrapped for easy React usage & IDE autocomplete support & typescript typings
376 lines (371 loc) • 7.76 kB
JavaScript
/*
* DO NOT EDIT THIS FILE. IT IS GENERATED
*/
/*
Code in this file were generated using following JSON:
{
"kind": "class",
"description": "",
"name": "AccordionItem",
"cssProperties": [
{
"name": "--vvd-accordion-item-accent-primary",
"default": "var(--vvd-color-canvas-text)"
},
{
"name": "--vvd-accordion-item-accent-primary-text",
"default": "var(--vvd-color-canvas)"
},
{
"name": "--vvd-accordion-item-accent-primary-increment",
"default": "var(--vvd-color-neutral-800)"
},
{
"name": "--vvd-accordion-item-accent-fierce",
"default": "var(--vvd-color-neutral-700)"
},
{
"name": "--vvd-accordion-item-accent-faint",
"default": "var(--vvd-color-neutral-50)"
},
{
"name": "--vvd-accordion-item-accent-soft",
"default": "var(--vvd-color-neutral-100)"
},
{
"name": "--vvd-accordion-item-accent-firm",
"default": "var(--vvd-color-canvas-text)"
}
],
"slots": [
{
"description": "Default slot.",
"name": ""
},
{
"description": "The preferred way to add an icon to the component.",
"name": "icon"
},
{
"description": "Used to add additional content to the heading.",
"name": "meta"
},
{
"description": "Used to add content to the heading.",
"name": "heading"
}
],
"members": [
{
"kind": "field",
"name": "headinglevel",
"type": {
"text": "1 | 2 | 3 | 4 | 5 | 6"
},
"default": "2",
"description": "Configures the https://www.w3.org/TR/wai-aria-1.1/#aria-level | level of the\nheading element.",
"privacy": "public"
},
{
"kind": "field",
"name": "appearance",
"type": {
"text": "AccordionItemAppearance | undefined"
},
"description": "The appearance the button should have.",
"privacy": "public"
},
{
"kind": "field",
"name": "expanded",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Expands or collapses the item.",
"privacy": "public"
},
{
"kind": "field",
"name": "id",
"type": {
"text": "string"
},
"description": "The item ID",
"privacy": "public"
},
{
"kind": "field",
"name": "heading",
"type": {
"text": "string | undefined"
},
"privacy": "public",
"description": ""
},
{
"kind": "field",
"name": "noIndicator",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Indicates whether the accordion-item has indicator",
"privacy": "public"
},
{
"kind": "field",
"name": "meta",
"type": {
"text": "string | undefined"
},
"privacy": "public",
"description": ""
},
{
"kind": "field",
"name": "size",
"type": {
"text": "AccordionItemSize | undefined"
},
"description": "The size the accordion-item should have.",
"privacy": "public"
},
{
"kind": "field",
"name": "change",
"privacy": "private"
},
{
"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"
}
}
],
"events": [
{
"type": {
"text": "CustomEvent<undefined>"
},
"description": "Fires a custom 'change' event when the button is invoked",
"name": "change"
}
],
"attributes": [
{
"name": "heading-level",
"type": {
"text": "1 | 2 | 3 | 4 | 5 | 6"
},
"default": "2",
"description": "Configures the https://www.w3.org/TR/wai-aria-1.1/#aria-level | level of the\nheading element.",
"fieldName": "headinglevel"
},
{
"name": "appearance",
"type": {
"text": "AccordionItemAppearance | undefined"
},
"description": "The appearance the button should have.",
"fieldName": "appearance"
},
{
"name": "expanded",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Expands or collapses the item.",
"fieldName": "expanded"
},
{
"name": "id",
"type": {
"text": "string"
},
"description": "The item ID",
"fieldName": "id"
},
{
"name": "heading",
"type": {
"text": "string | undefined"
},
"fieldName": "heading"
},
{
"name": "no-indicator",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Indicates whether the accordion-item has indicator",
"fieldName": "noIndicator"
},
{
"name": "meta",
"type": {
"text": "string | undefined"
},
"fieldName": "meta"
},
{
"name": "size",
"type": {
"text": "AccordionItemSize | undefined"
},
"description": "The size the accordion-item should have.",
"fieldName": "size"
},
{
"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": "AffixIconWithTrailing",
"module": "/src/shared/patterns/affix"
}
],
"superclass": {
"name": "VividElement",
"module": "/src/shared/foundation/vivid-element/vivid-element"
},
"vividComponent": {
"public": true,
"name": "accordion-item"
},
"vividTesting": {
"selectors": [
{
"name": "byHeading",
"args": [
"byHeading"
]
}
],
"actions": [
{
"name": "expand",
"args": [
"toggleAccordionItem",
"true"
]
},
{
"name": "collapse",
"args": [
"toggleAccordionItem",
"false"
]
}
],
"queries": [
{
"name": "expanded",
"args": [
"expanded",
"true"
]
},
{
"name": "collapsed",
"args": [
"expanded",
"false"
]
}
],
"refs": [
{
"name": "button",
"args": [
"shadow",
".heading-button"
]
}
]
}
}
*/
import wrapper from '@vonage/vivid-react-wrapper'
import { registerAccordionItem } from '@vonage/vivid'
registerAccordionItem('vvd3')
const VwcAccordionItem = wrapper(`vvd3-accordion-item`, {
events: [{"name":"change","propName":"onChange"}],
attributes: [],
properties: ['headinglevel', 'appearance', 'expanded', 'id', 'heading', 'noIndicator', 'meta', 'size', 'iconTrailing', 'icon', 'VIVID_VERSION', 'componentName']
})
VwcAccordionItem.displayName = 'VwcAccordionItem'
export default VwcAccordionItem