@vonage/vivid-react
Version:
Vivid wrapped for easy React usage & IDE autocomplete support & typescript typings
478 lines (473 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": "A Nav Item Custom HTML Element.\nBased largely on the https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a | <a> element .",
"name": "NavItem",
"cssProperties": [
{
"name": "--vvd-nav-item-cta-primary",
"default": "var(--vvd-color-cta-500)"
},
{
"name": "--vvd-nav-item-cta-primary-text",
"default": "var(--vvd-color-canvas)"
},
{
"name": "--vvd-nav-item-cta-primary-increment",
"default": "var(--vvd-color-cta-600)"
},
{
"name": "--vvd-nav-item-cta-contrast",
"default": "var(--vvd-color-cta-800)"
},
{
"name": "--vvd-nav-item-cta-fierce",
"default": "var(--vvd-color-cta-700)"
},
{
"name": "--vvd-nav-item-cta-fierce-primary",
"default": "var(--vvd-color-cta-700)"
},
{
"name": "--vvd-nav-item-cta-faint",
"default": "var(--vvd-color-cta-50)"
},
{
"name": "--vvd-nav-item-cta-firm",
"default": "var(--vvd-color-cta-600)"
},
{
"name": "--vvd-nav-item-cta-soft",
"default": "var(--vvd-color-cta-100)"
},
{
"name": "--vvd-nav-item-accent-primary",
"default": "var(--vvd-color-canvas-text)"
},
{
"name": "--vvd-nav-item-accent-primary-text",
"default": "var(--vvd-color-canvas)"
},
{
"name": "--vvd-nav-item-accent-primary-increment",
"default": "var(--vvd-color-neutral-800)"
},
{
"name": "--vvd-nav-item-accent-contrast",
"default": "var(--vvd-color-neutral-800)"
},
{
"name": "--vvd-nav-item-accent-fierce",
"default": "var(--vvd-color-neutral-700)"
},
{
"name": "--vvd-nav-item-accent-fierce-primary",
"default": "var(--vvd-color-canvas-text)"
},
{
"name": "--vvd-nav-item-accent-faint",
"default": "var(--vvd-color-neutral-50)"
},
{
"name": "--vvd-nav-item-accent-firm",
"default": "var(--vvd-color-canvas-text)"
},
{
"name": "--vvd-nav-item-accent-soft",
"default": "var(--vvd-color-neutral-100)"
}
],
"slots": [
{
"description": "A slot to add additional content to the nav item.",
"name": "meta"
},
{
"description": "The preferred way to add an icon to the component.",
"name": "icon"
}
],
"members": [
{
"kind": "field",
"name": "text",
"type": {
"text": "string | undefined"
},
"description": "Text of the nav item",
"privacy": "public"
},
{
"kind": "field",
"name": "connotation",
"type": {
"text": "NavItemConnotation | undefined"
},
"description": "Sets the connotation color of the selected nav item",
"privacy": "public"
},
{
"kind": "field",
"name": "appearance",
"type": {
"text": "NavItemAppearance | undefined"
},
"description": "Sets the nav item's appearance",
"privacy": "public"
},
{
"kind": "field",
"name": "current",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Sets the nav item as a current",
"privacy": "public"
},
{
"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": "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": "text",
"type": {
"text": "string | undefined"
},
"description": "Text of the nav item",
"fieldName": "text"
},
{
"name": "connotation",
"type": {
"text": "NavItemConnotation | undefined"
},
"description": "Sets the connotation color of the selected nav item",
"fieldName": "connotation"
},
{
"name": "appearance",
"type": {
"text": "NavItemAppearance | undefined"
},
"description": "Sets the nav item's appearance",
"fieldName": "appearance"
},
{
"name": "current",
"type": {
"text": "boolean"
},
"default": "false",
"description": "Sets the nav item as a current",
"fieldName": "current"
},
{
"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"
}
},
{
"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": "AffixIcon",
"module": "/src/shared/patterns"
},
{
"name": "Linkable",
"module": "/src/shared/patterns"
}
],
"superclass": {
"name": "VividElement",
"module": "/src/shared/foundation/vivid-element/vivid-element"
},
"vividComponent": {
"public": true,
"name": "nav-item"
}
}
*/
import wrapper from '@vonage/vivid-react-wrapper'
import { registerNavItem } from '@vonage/vivid'
registerNavItem('vvd3')
const VwcNavItem = wrapper(`vvd3-nav-item`, {
events: [],
attributes: [],
properties: ['text', 'connotation', 'appearance', 'current', 'icon', 'download', 'href', 'hreflang', 'ping', 'referrerpolicy', 'rel', 'target', 'type', 'control', '_vividAriaBehaviour', 'VIVID_VERSION', 'componentName']
})
VwcNavItem.displayName = 'VwcNavItem'
export default VwcNavItem