@vonage/vivid-react
Version:
Vivid wrapped for easy React usage & IDE autocomplete support & typescript typings
381 lines (376 loc) • 7.34 kB
JavaScript
/*
* DO NOT EDIT THIS FILE. IT IS GENERATED
*/
/*
Code in this file were generated using following JSON:
{
"kind": "class",
"description": "",
"name": "Popup",
"slots": [
{
"description": "Default slot.",
"name": ""
}
],
"members": [
{
"kind": "field",
"name": "#middleware",
"privacy": "private",
"type": {
"text": "Array<any>"
},
"readonly": true
},
{
"kind": "field",
"name": "#cleanup",
"privacy": "private",
"type": {
"text": "() => void | undefined"
}
},
{
"kind": "field",
"name": "popupEl",
"type": {
"text": "HTMLElement"
}
},
{
"kind": "field",
"name": "arrowEl",
"type": {
"text": "HTMLElement"
}
},
{
"kind": "field",
"name": "open",
"type": {
"text": "boolean"
},
"default": "false",
"description": "indicates whether the popup is open",
"privacy": "public"
},
{
"kind": "method",
"name": "openChanged",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "_",
"type": {
"text": "boolean"
}
},
{
"name": "newValue",
"type": {
"text": "boolean"
}
}
]
},
{
"kind": "field",
"name": "dismissible",
"type": {
"text": "boolean"
},
"default": "false",
"description": "adds close button to the popup",
"privacy": "public"
},
{
"kind": "field",
"name": "arrow",
"type": {
"text": "boolean"
},
"default": "false",
"description": "adds small triangle to indicate the trigger element",
"privacy": "public"
},
{
"kind": "field",
"name": "alternate",
"type": {
"text": "boolean"
},
"default": "false",
"description": "set the color-scheme to dark",
"privacy": "public"
},
{
"kind": "field",
"name": "placement",
"type": {
"text": "Placement | undefined"
},
"description": "the placement of the popup",
"privacy": "public"
},
{
"kind": "field",
"name": "placementStrategy",
"type": {
"text": "PlacementStrategyId"
},
"description": "The placement strategy of the popup.",
"privacy": "public"
},
{
"kind": "field",
"name": "animationFrame",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Whether to update the position of the floating element on every animation frame if required.",
"privacy": "public"
},
{
"kind": "field",
"name": "strategy",
"type": {
"text": "Strategy | undefined"
},
"default": "'fixed'",
"description": "The strategy of the popup",
"privacy": "public"
},
{
"kind": "field",
"name": "offset",
"type": {
"text": "number | null"
},
"default": "null",
"description": "Adds offset to the popup",
"privacy": "public"
},
{
"kind": "field",
"name": "anchor",
"type": {
"text": "HTMLElement | undefined"
},
"description": "The element to anchor the popup to.",
"privacy": "public"
},
{
"kind": "method",
"name": "#updateAutoUpdate"
},
{
"kind": "method",
"name": "#togglePopover"
},
{
"kind": "field",
"name": "#lastPositionUpdate",
"privacy": "private",
"type": {
"text": "Promise<void> | undefined"
}
},
{
"kind": "field",
"name": "#autoUpdateCallback",
"privacy": "private"
},
{
"kind": "method",
"name": "updatePosition",
"description": "Updates popup's position",
"privacy": "public",
"async": true
},
{
"kind": "method",
"name": "#assignPopupPosition",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "data",
"type": {
"text": "any"
}
}
]
},
{
"kind": "method",
"name": "#assignArrowPosition",
"return": {
"type": {
"text": "void"
}
},
"parameters": [
{
"name": "data",
"type": {
"text": "any"
}
}
]
},
{
"kind": "field",
"name": "anchorEl",
"type": {
"text": "HTMLElement | null"
},
"readonly": true
},
{
"kind": "method",
"name": "show",
"return": {
"type": {
"text": "Promise<void>"
}
},
"description": "Shows the popup.\nUnlike toggling the `open` attribute, show() will wait for the popup to become visible and positioned correctly."
},
{
"kind": "method",
"name": "hide",
"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"
}
}
],
"attributes": [
{
"name": "open",
"type": {
"text": "boolean"
},
"default": "false",
"description": "indicates whether the popup is open",
"fieldName": "open"
},
{
"name": "dismissible",
"type": {
"text": "boolean"
},
"default": "false",
"description": "adds close button to the popup",
"fieldName": "dismissible"
},
{
"name": "arrow",
"type": {
"text": "boolean"
},
"default": "false",
"description": "adds small triangle to indicate the trigger element",
"fieldName": "arrow"
},
{
"name": "alternate",
"type": {
"text": "boolean"
},
"default": "false",
"description": "set the color-scheme to dark",
"fieldName": "alternate"
},
{
"name": "placement",
"type": {
"text": "Placement | undefined"
},
"description": "the placement of the popup",
"fieldName": "placement"
},
{
"name": "animation-frame",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Whether to update the position of the floating element on every animation frame if required.",
"fieldName": "animationFrame"
},
{
"name": "strategy",
"type": {
"text": "Strategy | undefined"
},
"default": "'fixed'",
"description": "The strategy of the popup",
"fieldName": "strategy"
},
{
"name": "offset",
"type": {
"text": "number | null"
},
"default": "null",
"description": "Adds offset to the popup",
"fieldName": "offset"
}
],
"superclass": {
"name": "VividElement",
"module": "/src/shared/foundation/vivid-element/vivid-element"
},
"vividComponent": {
"name": "popup"
}
}
*/
import wrapper from '@vonage/vivid-react-wrapper'
import { registerPopup } from '@vonage/vivid'
registerPopup('vvd3')
const VwcPopup = wrapper(`vvd3-popup`, {
events: [],
attributes: [],
properties: ['popupEl', 'arrowEl', 'open', 'dismissible', 'arrow', 'alternate', 'placement', 'placementStrategy', 'animationFrame', 'strategy', 'offset', 'anchor', 'VIVID_VERSION', 'componentName']
})
VwcPopup.displayName = 'VwcPopup'
export default VwcPopup