@vonage/vivid-react
Version:
Vivid wrapped for easy React usage & IDE autocomplete support & typescript typings
487 lines (482 loc) • 12.1 kB
JavaScript
/*
* DO NOT EDIT THIS FILE. IT IS GENERATED
*/
/*
Code in this file were generated using following JSON:
{
"kind": "class",
"description": "",
"name": "Card",
"cssProperties": [
{
"name": "--vvd-card-cta-primary",
"default": "var(--vvd-color-cta-500)"
},
{
"name": "--vvd-card-cta-primary-text",
"default": "var(--vvd-color-canvas)"
},
{
"name": "--vvd-card-cta-primary-increment",
"default": "var(--vvd-color-cta-600)"
},
{
"name": "--vvd-card-cta-faint",
"default": "var(--vvd-color-cta-50)"
},
{
"name": "--vvd-card-cta-soft",
"default": "var(--vvd-color-cta-100)"
}
],
"slots": [
{
"description": "The graphic slot overrides the icon property.",
"name": "graphic"
},
{
"description": "The media slot is mainly for images or video content above the card header.",
"name": "media"
},
{
"description": "The meta slot is for action content in the card header.",
"name": "meta"
},
{
"description": "The footer slot is for content in the card footer.",
"name": "footer"
},
{
"description": "Assign nodes to main slot to fully override a card's predefined flow and style with your own.",
"name": "main"
}
],
"members": [
{
"kind": "field",
"name": "appearance",
"type": {
"text": "CardAppearance | undefined"
},
"description": "The appearance the card should have.",
"privacy": "public"
},
{
"kind": "field",
"name": "headline",
"type": {
"text": "string | undefined"
},
"description": "the text of the card heading\naccepts string",
"privacy": "public"
},
{
"kind": "field",
"name": "subtitle",
"type": {
"text": "string | undefined"
},
"description": "the text of the card sub-heading\naccepts string",
"privacy": "public"
},
{
"kind": "field",
"name": "text",
"type": {
"text": "string | undefined"
},
"description": "the text of the card sub-heading\naccepts string",
"privacy": "public"
},
{
"kind": "field",
"name": "icon",
"type": {
"text": "string | undefined"
},
"description": "card header icon",
"privacy": "public"
},
{
"kind": "field",
"name": "elevation",
"type": {
"text": "0 | 2 | 4 | 8 | 12 | 16 | 24 | undefined"
},
"description": "card elevation dp",
"privacy": "public"
},
{
"kind": "field",
"name": "clickableCard",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Indicates whether card should be a clickable <button> element.",
"privacy": "public"
},
{
"kind": "field",
"name": "graphicSlottedContent",
"type": {
"text": "HTMLElement[] | undefined"
}
},
{
"kind": "field",
"name": "hasMetaSlottedContent",
"type": {
"text": "HTMLElement[] | undefined"
}
},
{
"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": "appearance",
"type": {
"text": "CardAppearance | undefined"
},
"description": "The appearance the card should have.",
"fieldName": "appearance"
},
{
"name": "headline",
"type": {
"text": "string | undefined"
},
"description": "the text of the card heading\naccepts string",
"fieldName": "headline"
},
{
"name": "subtitle",
"type": {
"text": "string | undefined"
},
"description": "the text of the card sub-heading\naccepts string",
"fieldName": "subtitle"
},
{
"name": "text",
"type": {
"text": "string | undefined"
},
"description": "the text of the card sub-heading\naccepts string",
"fieldName": "text"
},
{
"name": "icon",
"type": {
"text": "string | undefined"
},
"description": "card header icon",
"fieldName": "icon"
},
{
"name": "elevation",
"type": {
"text": "0 | 2 | 4 | 8 | 12 | 16 | 24 | undefined"
},
"description": "card elevation dp",
"fieldName": "elevation"
},
{
"name": "clickable-card",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Indicates whether card should be a clickable <button> element.",
"fieldName": "clickableCard"
},
{
"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": "card"
},
"vividTesting": {
"selectors": [],
"actions": [],
"queries": [
{
"name": "headline",
"args": [
"headline"
]
}
],
"refs": []
}
}
*/
import wrapper from '@vonage/vivid-react-wrapper'
import { registerCard } from '@vonage/vivid'
registerCard('vvd3')
const VwcCard = wrapper(`vvd3-card`, {
events: [],
attributes: [],
properties: ['appearance', 'headline', 'subtitle', 'text', 'icon', 'elevation', 'clickableCard', 'graphicSlottedContent', 'hasMetaSlottedContent', 'download', 'href', 'hreflang', 'ping', 'referrerpolicy', 'rel', 'target', 'type', 'control', '_vividAriaBehaviour', 'VIVID_VERSION', 'componentName']
})
VwcCard.displayName = 'VwcCard'
export default VwcCard