UNPKG

@vonage/vivid-react

Version:

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

468 lines (463 loc) 9.97 kB
/* * DO NOT EDIT THIS FILE. IT IS GENERATED */ /* Code in this file were generated using following JSON: { "kind": "class", "description": "", "name": "MenuItem", "cssProperties": [ { "name": "--vvd-menu-item-cta-primary", "default": "var(--vvd-color-cta-500)" }, { "name": "--vvd-menu-item-cta-primary-text", "default": "var(--vvd-color-canvas)" }, { "name": "--vvd-menu-item-cta-primary-increment", "default": "var(--vvd-color-cta-600)" }, { "name": "--vvd-menu-item-cta-firm", "default": "var(--vvd-color-cta-600)" }, { "name": "--vvd-menu-item-cta-faint", "default": "var(--vvd-color-cta-50)" }, { "name": "--vvd-menu-item-cta-soft", "default": "var(--vvd-color-cta-100)" }, { "name": "--vvd-menu-item-cta-pale", "default": "var(--vvd-color-cta-300)" }, { "name": "--vvd-menu-item-cta-dim", "default": "var(--vvd-color-cta-200)" }, { "name": "--vvd-menu-item-accent-primary", "default": "var(--vvd-color-canvas-text)" }, { "name": "--vvd-menu-item-accent-primary-text", "default": "var(--vvd-color-canvas)" }, { "name": "--vvd-menu-item-accent-primary-increment", "default": "var(--vvd-color-neutral-800)" }, { "name": "--vvd-menu-item-accent-firm", "default": "var(--vvd-color-canvas-text)" }, { "name": "--vvd-menu-item-accent-faint", "default": "var(--vvd-color-neutral-50)" }, { "name": "--vvd-menu-item-accent-soft", "default": "var(--vvd-color-neutral-100)" }, { "name": "--vvd-menu-item-accent-pale", "default": "var(--vvd-color-neutral-300)" }, { "name": "--vvd-menu-item-accent-dim", "default": "var(--vvd-color-neutral-200)" } ], "slots": [ { "description": "Assign nodes to the `meta` slot to set a badge or an additional icon.", "name": "meta" }, { "description": "Assign nodes to the `meta` slot to set a badge or an additional icon.", "name": "trailing-meta" }, { "description": "Assign a Menu to the `submenu` slot to add a submenu.", "name": "submenu" } ], "members": [ { "kind": "field", "name": "disabled", "type": { "text": "boolean" }, "description": "The disabled state of the element.", "privacy": "public" }, { "kind": "field", "name": "expanded", "type": { "text": "boolean" }, "description": "The expanded state of the element.", "privacy": "public" }, { "kind": "field", "name": "role", "type": { "text": "MenuItemRole" }, "description": "The role of the element.", "privacy": "public" }, { "kind": "method", "name": "#ensureRoleMatchesPresentational" }, { "kind": "field", "name": "controlType", "type": { "text": "ControlType | undefined" }, "description": "Whether the menu item should behave as a checkbox or radio button.", "privacy": "public" }, { "kind": "field", "name": "checked", "type": { "text": "boolean" }, "default": "false", "description": "The checked value of the element.", "privacy": "public" }, { "kind": "field", "name": "invoke", "privacy": "private" }, { "kind": "field", "name": "text", "type": { "text": "string | undefined" }, "description": "Indicates the menu item's text.", "privacy": "public" }, { "kind": "field", "name": "textSecondary", "type": { "text": "string | undefined" }, "description": "Indicates the menu item's secondary text.", "privacy": "public" }, { "kind": "field", "name": "connotation", "type": { "text": "MenuItemConnotation | undefined" }, "description": "The connotation the fab should have.", "privacy": "public" }, { "kind": "field", "name": "checkTrailing", "type": { "text": "boolean" }, "default": "false", "description": "Controls the placement of the menu item's checkmark or radio icon.", "privacy": "public" }, { "kind": "field", "name": "checkedAppearance", "type": { "text": "| 'normal'\n\t\t| 'tick-only' | undefined" }, "description": "Controls the appearance of the check indicator.", "privacy": "public" }, { "kind": "field", "name": "trailingMetaSlottedContent", "type": { "text": "HTMLElement[] | undefined" } }, { "kind": "method", "name": "#collapseExpandedItem" }, { "kind": "method", "name": "#expandedChange" }, { "kind": "field", "name": "#syntheticClickEvents", "privacy": "private", "default": "new WeakSet<Event>()" }, { "kind": "method", "name": "#emitSyntheticClick" }, { "kind": "field", "name": "_vividAriaBehaviour", "default": "'host'", "type": { "text": "'host'" }, "inheritedFrom": { "name": "HostSemantics", "module": "src/shared/aria/host-semantics.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<HTMLElement>" }, "description": "Fired when the expanded state changes.", "name": "expanded-change" }, { "type": { "text": "CustomEvent<undefined>" }, "description": "Fired when the item is triggered. Does not fire when a submenu is collapsed or expanded.", "name": "change" } ], "attributes": [ { "name": "disabled", "type": { "text": "boolean" }, "description": "The disabled state of the element.", "fieldName": "disabled" }, { "name": "expanded", "type": { "text": "boolean" }, "description": "The expanded state of the element.", "fieldName": "expanded" }, { "name": "control-type", "type": { "text": "ControlType | undefined" }, "description": "Whether the menu item should behave as a checkbox or radio button.", "fieldName": "controlType" }, { "name": "checked", "type": { "text": "boolean" }, "default": "false", "description": "The checked value of the element.", "fieldName": "checked" }, { "name": "text", "type": { "text": "string | undefined" }, "description": "Indicates the menu item's text.", "fieldName": "text" }, { "name": "text-secondary", "type": { "text": "string | undefined" }, "description": "Indicates the menu item's secondary text.", "fieldName": "textSecondary" }, { "name": "connotation", "type": { "text": "MenuItemConnotation | undefined" }, "description": "The connotation the fab should have.", "fieldName": "connotation" }, { "name": "check-trailing", "type": { "text": "boolean" }, "default": "false", "description": "Controls the placement of the menu item's checkmark or radio icon.", "fieldName": "checkTrailing" }, { "name": "check-appearance", "type": { "text": "| 'normal'\n\t\t| 'tick-only' | undefined" }, "description": "Controls the appearance of the check indicator.", "fieldName": "checkedAppearance" }, { "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": "HostSemantics", "module": "/src/shared/aria/host-semantics" }, { "name": "AffixIcon", "module": "/src/shared/patterns/affix" } ], "superclass": { "name": "VividElement", "module": "/src/shared/foundation/vivid-element/vivid-element" }, "vividComponent": { "public": true, "name": "menu-item", "vueModels": [ { "name": "modelValue", "propName": "checked", "eventNames": [ "change" ], "valueMapping": "event.currentTarget.checked" } ] }, "vividTesting": { "selectors": [ { "name": "byText", "args": [ "byText" ] } ], "actions": [ { "name": "click", "args": [ "click", "#base" ] } ], "queries": [ { "name": "checked", "args": [ "checked", "true" ] }, { "name": "unchecked", "args": [ "checked", "false" ] }, { "name": "disabled", "args": [ "disabled" ] } ], "refs": [ { "name": "base", "args": [ "shadow", ".base" ] } ] } } */ import wrapper from '@vonage/vivid-react-wrapper' import { registerMenuItem } from '@vonage/vivid' registerMenuItem('vvd3') const VwcMenuItem = wrapper(`vvd3-menu-item`, { events: [{"name":"change","propName":"onChange"},{"name":"expanded-change","propName":"onExpandedChange"}], attributes: [], properties: ['icon', 'disabled', 'expanded', 'role', 'controlType', 'checked', 'text', 'textSecondary', 'connotation', 'checkTrailing', 'checkedAppearance', 'trailingMetaSlottedContent', '_vividAriaBehaviour', 'icon', 'VIVID_VERSION', 'componentName'] }) VwcMenuItem.displayName = 'VwcMenuItem' export default VwcMenuItem