@vonage/vivid-react
Version:
Vivid wrapped for easy React usage & IDE autocomplete support & typescript typings
295 lines (290 loc) • 6.38 kB
JavaScript
/*
* DO NOT EDIT THIS FILE. IT IS GENERATED
*/
/*
Code in this file were generated using following JSON:
{
"kind": "class",
"description": "",
"name": "SelectableBox",
"cssProperties": [
{
"name": "--vvd-selectable-box-cta-firm-all",
"default": "var(--vvd-color-cta-600)"
},
{
"name": "--vvd-selectable-box-cta-pale",
"default": "var(--vvd-color-cta-300)"
},
{
"name": "--vvd-selectable-box-cta-fierce",
"default": "var(--vvd-color-cta-700)"
},
{
"name": "--vvd-selectable-box-cta-faint",
"default": "var(--vvd-color-cta-50)"
},
{
"name": "--vvd-selectable-box-cta-soft",
"default": "var(--vvd-color-cta-100)"
},
{
"name": "--vvd-selectable-box-accent-firm-all",
"default": "var(--vvd-color-neutral-600)"
},
{
"name": "--vvd-selectable-box-accent-pale",
"default": "var(--vvd-color-neutral-300)"
},
{
"name": "--vvd-selectable-box-accent-fierce",
"default": "var(--vvd-color-neutral-700)"
},
{
"name": "--vvd-selectable-box-accent-faint",
"default": "var(--vvd-color-neutral-50)"
},
{
"name": "--vvd-selectable-box-accent-soft",
"default": "var(--vvd-color-neutral-100)"
}
],
"slots": [
{
"description": "Slot for box's content.",
"name": "default"
}
],
"members": [
{
"kind": "field",
"name": "checked",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Controls the checked state of the box",
"privacy": "public"
},
{
"kind": "field",
"name": "clickableBox",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Makes the entire selectable box clickable",
"privacy": "public"
},
{
"kind": "field",
"name": "connotation",
"type": {
"text": "SelectableBoxConnotation | undefined"
},
"description": "The connotation the selectable box should have.",
"privacy": "public"
},
{
"kind": "field",
"name": "controlType",
"type": {
"text": "SelectableBoxControlType | undefined"
},
"description": "The type of control the box should have: checkbox or radio.",
"privacy": "public"
},
{
"kind": "field",
"name": "controlPlacement",
"type": {
"text": "SelectableBoxControlPlacement"
},
"default": "'end-stacked'",
"description": "Defines where the control (checkbox or radio) should be located.",
"privacy": "public"
},
{
"kind": "field",
"name": "tight",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Removes the padding around the box's slot content",
"privacy": "public"
},
{
"kind": "field",
"name": "_vividAriaBehaviour",
"default": "'delegate'",
"type": {
"text": "'delegate'"
},
"inheritedFrom": {
"name": "DelegatesAria",
"module": "src/shared/aria/delegates-aria.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": "Fired when the checked state changes",
"name": "change"
}
],
"attributes": [
{
"name": "checked",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Controls the checked state of the box",
"fieldName": "checked"
},
{
"name": "clickable-box",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Makes the entire selectable box clickable",
"fieldName": "clickableBox"
},
{
"name": "connotation",
"type": {
"text": "SelectableBoxConnotation | undefined"
},
"description": "The connotation the selectable box should have.",
"fieldName": "connotation"
},
{
"name": "control-type",
"type": {
"text": "SelectableBoxControlType | undefined"
},
"description": "The type of control the box should have: checkbox or radio.",
"fieldName": "controlType"
},
{
"name": "control-placement",
"type": {
"text": "SelectableBoxControlPlacement"
},
"default": "'end-stacked'",
"description": "Defines where the control (checkbox or radio) should be located.",
"fieldName": "controlPlacement"
},
{
"name": "tight",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Removes the padding around the box's slot content",
"fieldName": "tight"
}
],
"mixins": [
{
"name": "DelegatesAria",
"module": "/src/shared/aria/delegates-aria"
}
],
"superclass": {
"name": "VividElement",
"module": "/src/shared/foundation/vivid-element/vivid-element"
},
"vividComponent": {
"public": true,
"name": "selectable-box"
},
"vividTesting": {
"selectors": [],
"actions": [
{
"name": "check",
"args": [
"check",
"#control"
]
},
{
"name": "uncheck",
"args": [
"uncheck",
"#control"
]
}
],
"queries": [
{
"name": "checked",
"args": [
"checked",
"true"
]
},
{
"name": "unchecked",
"args": [
"checked",
"false"
]
}
],
"refs": [
{
"name": "control",
"args": [
"nestedShadow",
"[data-vvd-component].control",
"div.control"
]
}
]
}
}
*/
import wrapper from '@vonage/vivid-react-wrapper'
import { registerSelectableBox } from '@vonage/vivid'
registerSelectableBox('vvd3')
const VwcSelectableBox = wrapper(`vvd3-selectable-box`, {
events: [{"name":"change","propName":"onChange"}],
attributes: [],
properties: ['checked', 'clickableBox', 'connotation', 'controlType', 'controlPlacement', 'tight', '_vividAriaBehaviour', 'VIVID_VERSION', 'componentName']
})
VwcSelectableBox.displayName = 'VwcSelectableBox'
export default VwcSelectableBox