@vonage/vivid-react
Version:
Vivid wrapped for easy React usage & IDE autocomplete support & typescript typings
491 lines (486 loc) • 12.2 kB
JavaScript
/*
* DO NOT EDIT THIS FILE. IT IS GENERATED
*/
/*
Code in this file were generated using following JSON:
{
"kind": "class",
"description": "",
"name": "Avatar",
"cssProperties": [
{
"name": "--vvd-avatar-cta-primary",
"default": "var(--vvd-color-cta-500)"
},
{
"name": "--vvd-avatar-cta-primary-text",
"default": "var(--vvd-color-canvas)"
},
{
"name": "--vvd-avatar-cta-firm",
"default": "var(--vvd-color-cta-600)"
},
{
"name": "--vvd-avatar-cta-firm-all",
"default": "var(--vvd-color-cta-600)"
},
{
"name": "--vvd-avatar-cta-fierce",
"default": "var(--vvd-color-cta-700)"
},
{
"name": "--vvd-avatar-cta-pale",
"default": "var(--vvd-color-cta-300)"
},
{
"name": "--vvd-avatar-cta-soft",
"default": "var(--vvd-color-cta-100)"
},
{
"name": "--vvd-avatar-cta-contrast",
"default": "var(--vvd-color-cta-800)"
},
{
"name": "--vvd-avatar-accent-primary",
"default": "var(--vvd-color-canvas-text)"
},
{
"name": "--vvd-avatar-accent-primary-text",
"default": "var(--vvd-color-canvas)"
},
{
"name": "--vvd-avatar-accent-firm",
"default": "var(--vvd-color-canvas-text)"
},
{
"name": "--vvd-avatar-accent-firm-all",
"default": "var(--vvd-color-neutral-600)"
},
{
"name": "--vvd-avatar-accent-fierce",
"default": "var(--vvd-color-neutral-700)"
},
{
"name": "--vvd-avatar-accent-pale",
"default": "var(--vvd-color-neutral-300)"
},
{
"name": "--vvd-avatar-accent-soft",
"default": "var(--vvd-color-neutral-100)"
},
{
"name": "--vvd-avatar-accent-contrast",
"default": "var(--vvd-color-neutral-800)"
}
],
"slots": [
{
"description": "Assign nodes to the graphic slot to set a graphic media of any kind (e.g. image, illustration etc).",
"name": "graphic"
},
{
"description": "The preferred way to add an icon to the component.",
"name": "icon"
}
],
"members": [
{
"kind": "field",
"name": "connotation",
"type": {
"text": "AvatarConnotation | undefined"
},
"description": "The connotation the avatar should have.",
"privacy": "public"
},
{
"kind": "field",
"name": "shape",
"type": {
"text": "AvatarShape | undefined"
},
"description": "The shape the avatar should have.",
"privacy": "public"
},
{
"kind": "field",
"name": "appearance",
"type": {
"text": "AvatarAppearance | undefined"
},
"description": "The appearance the avatar should have.",
"privacy": "public"
},
{
"kind": "field",
"name": "size",
"type": {
"text": "AvatarSize | undefined"
},
"description": "The size the avatar should have.",
"privacy": "public"
},
{
"kind": "field",
"name": "icon",
"type": {
"text": "string | undefined"
},
"privacy": "public",
"description": ""
},
{
"kind": "field",
"name": "initials",
"type": {
"text": "string | undefined"
},
"description": "avatar name",
"privacy": "public"
},
{
"kind": "field",
"name": "clickable",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Indicates whether avatar should be a clickable <button> element.",
"privacy": "public"
},
{
"kind": "field",
"name": "download",
"type": {
"text": "string | undefined"
},
"description": "Prompts the user to save the linked URL. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.",
"privacy": "public",
"inheritedFrom": {
"name": "Linkable",
"module": "src/shared/patterns/linkable.ts"
}
},
{
"kind": "field",
"name": "href",
"type": {
"text": "string | undefined"
},
"description": "The URL the hyperlink references. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.",
"privacy": "public",
"inheritedFrom": {
"name": "Linkable",
"module": "src/shared/patterns/linkable.ts"
}
},
{
"kind": "field",
"name": "hreflang",
"type": {
"text": "string | undefined"
},
"description": "Hints at the language of the referenced resource. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.",
"privacy": "public",
"inheritedFrom": {
"name": "Linkable",
"module": "src/shared/patterns/linkable.ts"
}
},
{
"kind": "field",
"name": "ping",
"type": {
"text": "string | undefined"
},
"description": "See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.",
"privacy": "public",
"inheritedFrom": {
"name": "Linkable",
"module": "src/shared/patterns/linkable.ts"
}
},
{
"kind": "field",
"name": "referrerpolicy",
"type": {
"text": "string | undefined"
},
"description": "See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.",
"privacy": "public",
"inheritedFrom": {
"name": "Linkable",
"module": "src/shared/patterns/linkable.ts"
}
},
{
"kind": "field",
"name": "rel",
"type": {
"text": "string | undefined"
},
"description": "See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.",
"privacy": "public",
"inheritedFrom": {
"name": "Linkable",
"module": "src/shared/patterns/linkable.ts"
}
},
{
"kind": "field",
"name": "target",
"type": {
"text": "'_self' | '_blank' | '_parent' | '_top' | undefined"
},
"description": "See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.",
"privacy": "public",
"inheritedFrom": {
"name": "Linkable",
"module": "src/shared/patterns/linkable.ts"
}
},
{
"kind": "field",
"name": "type",
"type": {
"text": "string | undefined"
},
"description": "See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.",
"privacy": "public",
"inheritedFrom": {
"name": "Linkable",
"module": "src/shared/patterns/linkable.ts"
}
},
{
"kind": "field",
"name": "control",
"type": {
"text": "HTMLAnchorElement"
},
"description": "References the root element",
"inheritedFrom": {
"name": "Linkable",
"module": "src/shared/patterns/linkable.ts"
}
},
{
"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"
}
}
],
"attributes": [
{
"name": "connotation",
"type": {
"text": "AvatarConnotation | undefined"
},
"description": "The connotation the avatar should have.",
"fieldName": "connotation"
},
{
"name": "shape",
"type": {
"text": "AvatarShape | undefined"
},
"description": "The shape the avatar should have.",
"fieldName": "shape"
},
{
"name": "appearance",
"type": {
"text": "AvatarAppearance | undefined"
},
"description": "The appearance the avatar should have.",
"fieldName": "appearance"
},
{
"name": "size",
"type": {
"text": "AvatarSize | undefined"
},
"description": "The size the avatar should have.",
"fieldName": "size"
},
{
"name": "icon",
"type": {
"text": "string | undefined"
},
"fieldName": "icon"
},
{
"name": "initials",
"type": {
"text": "string | undefined"
},
"description": "avatar name",
"fieldName": "initials"
},
{
"name": "clickable",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Indicates whether avatar should be a clickable <button> element.",
"fieldName": "clickable"
},
{
"name": "download",
"type": {
"text": "string | undefined"
},
"description": "Prompts the user to save the linked URL. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.",
"fieldName": "download",
"inheritedFrom": {
"name": "Linkable",
"module": "src/shared/patterns/linkable.ts"
}
},
{
"name": "href",
"type": {
"text": "string | undefined"
},
"description": "The URL the hyperlink references. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.",
"fieldName": "href",
"inheritedFrom": {
"name": "Linkable",
"module": "src/shared/patterns/linkable.ts"
}
},
{
"name": "hreflang",
"type": {
"text": "string | undefined"
},
"description": "Hints at the language of the referenced resource. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.",
"fieldName": "hreflang",
"inheritedFrom": {
"name": "Linkable",
"module": "src/shared/patterns/linkable.ts"
}
},
{
"name": "ping",
"type": {
"text": "string | undefined"
},
"description": "See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.",
"fieldName": "ping",
"inheritedFrom": {
"name": "Linkable",
"module": "src/shared/patterns/linkable.ts"
}
},
{
"name": "referrerpolicy",
"type": {
"text": "string | undefined"
},
"description": "See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.",
"fieldName": "referrerpolicy",
"inheritedFrom": {
"name": "Linkable",
"module": "src/shared/patterns/linkable.ts"
}
},
{
"name": "rel",
"type": {
"text": "string | undefined"
},
"description": "See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.",
"fieldName": "rel",
"inheritedFrom": {
"name": "Linkable",
"module": "src/shared/patterns/linkable.ts"
}
},
{
"name": "target",
"type": {
"text": "'_self' | '_blank' | '_parent' | '_top' | undefined"
},
"description": "See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.",
"fieldName": "target",
"inheritedFrom": {
"name": "Linkable",
"module": "src/shared/patterns/linkable.ts"
}
},
{
"name": "type",
"type": {
"text": "string | undefined"
},
"description": "See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element for more information.",
"fieldName": "type",
"inheritedFrom": {
"name": "Linkable",
"module": "src/shared/patterns/linkable.ts"
}
}
],
"mixins": [
{
"name": "Linkable",
"module": "/src/shared/patterns/linkable"
}
],
"superclass": {
"name": "VividElement",
"module": "/src/shared/foundation/vivid-element/vivid-element"
},
"vividComponent": {
"public": true,
"name": "avatar"
}
}
*/
import wrapper from '@vonage/vivid-react-wrapper'
import { registerAvatar } from '@vonage/vivid'
registerAvatar('vvd3')
const VwcAvatar = wrapper(`vvd3-avatar`, {
events: [],
attributes: [],
properties: ['connotation', 'shape', 'appearance', 'size', 'icon', 'initials', 'clickable', 'download', 'href', 'hreflang', 'ping', 'referrerpolicy', 'rel', 'target', 'type', 'control', '_vividAriaBehaviour', 'VIVID_VERSION', 'componentName']
})
VwcAvatar.displayName = 'VwcAvatar'
export default VwcAvatar