UNPKG

@vonage/vivid-react

Version:

Vivid wrapped for easy React usage & IDE autocomplete support & typescript typings

375 lines (370 loc) 7.78 kB
/* * DO NOT EDIT THIS FILE. IT IS GENERATED */ /* Code in this file were generated using following JSON: { "kind": "class", "description": "", "name": "Tag", "cssProperties": [ { "name": "--vvd-tag-cta-contrast", "default": "var(--vvd-color-cta-800)" }, { "name": "--vvd-tag-cta-soft", "default": "var(--vvd-color-cta-100)" }, { "name": "--vvd-tag-cta-pale", "default": "var(--vvd-color-cta-300)" }, { "name": "--vvd-tag-cta-fierce", "default": "var(--vvd-color-cta-700)" }, { "name": "--vvd-tag-cta-firm-all", "default": "var(--vvd-color-cta-600)" }, { "name": "--vvd-tag-cta-faint", "default": "var(--vvd-color-cta-50)" }, { "name": "--vvd-tag-cta-dim", "default": "var(--vvd-color-cta-200)" }, { "name": "--vvd-tag-accent-contrast", "default": "var(--vvd-color-neutral-800)" }, { "name": "--vvd-tag-accent-soft", "default": "var(--vvd-color-neutral-100)" }, { "name": "--vvd-tag-accent-pale", "default": "var(--vvd-color-neutral-300)" }, { "name": "--vvd-tag-accent-fierce", "default": "var(--vvd-color-neutral-700)" }, { "name": "--vvd-tag-accent-firm-all", "default": "var(--vvd-color-neutral-600)" }, { "name": "--vvd-tag-accent-faint", "default": "var(--vvd-color-neutral-50)" }, { "name": "--vvd-tag-accent-dim", "default": "var(--vvd-color-neutral-200)" } ], "slots": [ { "description": "The preferred way to add an icon to the component.", "name": "icon" } ], "members": [ { "kind": "field", "name": "connotation", "type": { "text": "TagConnotation | undefined" }, "description": "The connotation the tag should have.", "privacy": "public" }, { "kind": "field", "name": "shape", "type": { "text": "TagShape | undefined" }, "description": "The shape the tag should have.", "privacy": "public" }, { "kind": "field", "name": "appearance", "type": { "text": "TagAppearance | undefined" }, "description": "The appearance the tag should have.", "privacy": "public" }, { "kind": "field", "name": "label", "type": { "text": "string | undefined" }, "description": "Indicates the tag's label.", "privacy": "public" }, { "kind": "field", "name": "removable", "type": { "text": "boolean" }, "default": "false", "description": "indicates whether the tag is removable", "privacy": "public" }, { "kind": "field", "name": "disabled", "type": { "text": "boolean" }, "default": "false", "description": "indicates whether the tag is disabled", "privacy": "public" }, { "kind": "field", "name": "selectable", "type": { "text": "boolean" }, "default": "false", "description": "indicates whether the tag is selectable", "privacy": "public" }, { "kind": "field", "name": "selected", "type": { "text": "boolean" }, "default": "false", "description": "indicates whether the tag is selected", "privacy": "public" }, { "kind": "method", "name": "remove", "return": { "type": { "text": "void" } } }, { "kind": "field", "name": "#select", "privacy": "private" }, { "kind": "method", "name": "handleKeydown", "parameters": [ { "name": "e", "type": { "text": "KeyboardEvent" } } ] }, { "kind": "method", "name": "handleClick", "return": { "type": { "text": "void" } } }, { "kind": "field", "name": "_vividAriaBehaviour", "default": "'delegate'", "type": { "text": "'delegate'" }, "inheritedFrom": { "name": "DelegatesAria", "module": "src/shared/aria/delegates-aria.ts" } }, { "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": "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": "Fires when the selected state changes", "name": "selected-change" }, { "type": { "text": "CustomEvent<undefined>" }, "description": "Fires when the tag is removed", "name": "removed" } ], "attributes": [ { "name": "connotation", "type": { "text": "TagConnotation | undefined" }, "description": "The connotation the tag should have.", "fieldName": "connotation" }, { "name": "shape", "type": { "text": "TagShape | undefined" }, "description": "The shape the tag should have.", "fieldName": "shape" }, { "name": "appearance", "type": { "text": "TagAppearance | undefined" }, "description": "The appearance the tag should have.", "fieldName": "appearance" }, { "name": "label", "type": { "text": "string | undefined" }, "description": "Indicates the tag's label.", "fieldName": "label" }, { "name": "removable", "type": { "text": "boolean" }, "default": "false", "description": "indicates whether the tag is removable", "fieldName": "removable" }, { "name": "disabled", "type": { "text": "boolean" }, "default": "false", "description": "indicates whether the tag is disabled", "fieldName": "disabled" }, { "name": "selectable", "type": { "text": "boolean" }, "default": "false", "description": "indicates whether the tag is selectable", "fieldName": "selectable" }, { "name": "selected", "type": { "text": "boolean" }, "default": "false", "description": "indicates whether the tag is selected", "fieldName": "selected" }, { "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" } } ], "mixins": [ { "name": "Localized", "module": "/src/shared/patterns" }, { "name": "DelegatesAria", "module": "/src/shared/aria/delegates-aria" }, { "name": "AffixIcon", "module": "/src/shared/patterns/affix" } ], "superclass": { "name": "VividElement", "module": "/src/shared/foundation/vivid-element/vivid-element" }, "vividComponent": { "public": true, "name": "tag" } } */ import wrapper from '@vonage/vivid-react-wrapper' import { registerTag } from '@vonage/vivid' registerTag('vvd3') const VwcTag = wrapper(`vvd3-tag`, { events: [{"name":"removed","propName":"onRemoved"},{"name":"selected-change","propName":"onSelectedChange"}], attributes: [], properties: ['connotation', 'shape', 'appearance', 'label', 'removable', 'disabled', 'selectable', 'selected', '_vividAriaBehaviour', 'icon', 'VIVID_VERSION', 'componentName'] }) VwcTag.displayName = 'VwcTag' export default VwcTag