UNPKG

@vonage/vivid-react

Version:

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

501 lines (496 loc) 12.3 kB
/* * DO NOT EDIT THIS FILE. IT IS GENERATED */ /* Code in this file were generated using following JSON: { "kind": "class", "description": "", "name": "SimpleColorPicker", "slots": [ { "description": "Slot for attaching the toggle button", "name": "anchor" } ], "members": [ { "kind": "field", "name": "placement", "type": { "text": "Placement | undefined" }, "default": "'top-start'", "description": "Placement of the popup with color swatches", "privacy": "public" }, { "kind": "field", "name": "swatchesPerRow", "type": { "text": "number" }, "default": "7", "description": "Number of swatches per row for grid layout", "privacy": "public" }, { "kind": "field", "name": "anchor", "type": { "text": "AnchorType | undefined" }, "description": "ID or direct reference to the component's anchor element.", "privacy": "public", "inheritedFrom": { "name": "Anchored", "module": "src/shared/patterns/anchored.ts" } }, { "kind": "field", "name": "#updateAnchorEl", "privacy": "private", "inheritedFrom": { "name": "Anchored", "module": "src/shared/patterns/anchored.ts" } }, { "kind": "field", "name": "#observer", "privacy": "private", "type": { "text": "MutationObserver | undefined" }, "inheritedFrom": { "name": "Anchored", "module": "src/shared/patterns/anchored.ts" } }, { "kind": "field", "name": "#observeMissingAnchor", "privacy": "private", "inheritedFrom": { "name": "Anchored", "module": "src/shared/patterns/anchored.ts" } }, { "kind": "field", "name": "#cleanupObserverIfNeeded", "privacy": "private", "inheritedFrom": { "name": "Anchored", "module": "src/shared/patterns/anchored.ts" } }, { "kind": "field", "name": "open", "type": { "text": "boolean" }, "default": "false", "description": "Indicates whether the popup is open", "privacy": "public", "inheritedFrom": { "name": "BaseColorPicker", "module": "src/shared/color-picker/base-color-picker.ts" } }, { "kind": "field", "name": "swatches", "type": { "text": "ColorSwatch[]" }, "default": "[]", "description": "List of color swatches, has to be an array of objects\n\n### Examples", "privacy": "public", "inheritedFrom": { "name": "BaseColorPicker", "module": "src/shared/color-picker/base-color-picker.ts" } }, { "kind": "field", "name": "label", "type": { "text": "string | undefined" }, "description": "The label for the form element.", "inheritedFrom": { "name": "FormElement", "module": "src/shared/patterns/form-elements/form-element.ts" } }, { "kind": "field", "name": "#handleInvalidEvent", "privacy": "private", "inheritedFrom": { "name": "FormElement", "module": "src/shared/patterns/form-elements/form-element.ts" } }, { "kind": "field", "name": "validity", "type": { "text": "ValidityState" }, "description": "Returns the validity state of the element", "readonly": true, "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "field", "name": "form", "type": { "text": "HTMLFormElement | null" }, "description": "Retrieve a reference to the associated form.\nReturns null if not associated to any form.", "readonly": true, "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "field", "name": "validationMessage", "type": { "text": "string" }, "description": "Retrieve the localized validation message,\nor custom validation message if set.", "readonly": true, "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "field", "name": "willValidate", "type": { "text": "boolean" }, "description": "Whether the element will be validated when the\nform is submitted", "readonly": true, "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "field", "name": "labels", "type": { "text": "ReadonlyArray<Node>" }, "description": "A reference to all associated label elements", "readonly": true, "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "field", "name": "value", "type": { "text": "string" }, "description": "The current value of the element.", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "field", "name": "currentValue", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "field", "name": "initialValue", "type": { "text": "string" }, "description": "The default value of the element. This value sets the `value` property\nonly when the `value` property has not been explicitly set.", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "field", "name": "disabled", "type": { "text": "boolean" }, "default": "false", "description": "Sets the element's disabled state. A disabled element will not be included during form submission.", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "field", "name": "name", "type": { "text": "string" }, "description": "The name of the element. This element's value will be surfaced during form submission under the provided name.", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "field", "name": "required", "type": { "text": "boolean" }, "description": "Require the field to be completed prior to form submission.", "default": "false", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "method", "name": "checkValidity", "return": { "type": { "text": "boolean" } }, "description": "Return the current validity of the element.", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "kind": "method", "name": "reportValidity", "return": { "type": { "text": "boolean" } }, "description": "Return the current validity of the element.\nIf false, fires an invalid event at the element.", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.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 value changes", "name": "change" } ], "attributes": [ { "name": "placement", "type": { "text": "Placement | undefined" }, "default": "'top-start'", "description": "Placement of the popup with color swatches", "fieldName": "placement" }, { "name": "swatches-per-row", "type": { "text": "number" }, "default": "7", "description": "Number of swatches per row for grid layout", "fieldName": "swatchesPerRow" }, { "name": "anchor", "type": { "text": "AnchorType | undefined" }, "description": "ID or direct reference to the component's anchor element.", "fieldName": "anchor", "inheritedFrom": { "name": "Anchored", "module": "src/shared/patterns/anchored.ts" } }, { "name": "open", "type": { "text": "boolean" }, "default": "false", "description": "Indicates whether the popup is open", "fieldName": "open", "inheritedFrom": { "name": "BaseColorPicker", "module": "src/shared/color-picker/base-color-picker.ts" } }, { "name": "label", "type": { "text": "string | undefined" }, "description": "The label for the form element.", "fieldName": "label", "inheritedFrom": { "name": "FormElement", "module": "src/shared/patterns/form-elements/form-element.ts" } }, { "name": "current-value", "type": { "text": "string" }, "description": "The current value of the element.", "fieldName": "value", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "name": "value", "type": { "text": "string" }, "description": "The default value of the element. This value sets the `value` property\nonly when the `value` property has not been explicitly set.", "fieldName": "initialValue", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "name": "disabled", "type": { "text": "boolean" }, "default": "false", "description": "Sets the element's disabled state. A disabled element will not be included during form submission.", "fieldName": "disabled", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "name": "name", "type": { "text": "string" }, "description": "The name of the element. This element's value will be surfaced during form submission under the provided name.", "fieldName": "name", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } }, { "name": "required", "type": { "text": "boolean" }, "description": "Require the field to be completed prior to form submission.", "default": "false", "fieldName": "required", "inheritedFrom": { "name": "FormAssociated", "module": "src/shared/foundation/form-associated/form-associated.ts" } } ], "mixins": [ { "name": "Anchored", "module": "/src/shared/patterns/anchored" }, { "name": "BaseColorPicker", "module": "/src/shared/color-picker" } ], "superclass": { "name": "VividElement", "module": "/src/shared/foundation/vivid-element/vivid-element" }, "vividComponent": { "public": true, "name": "simple-color-picker", "vueModels": [ { "name": "modelValue", "propName": "value", "eventNames": [ "input" ], "valueMapping": "event.currentTarget.value" } ] } } */ import wrapper from '@vonage/vivid-react-wrapper' import { registerSimpleColorPicker } from '@vonage/vivid' registerSimpleColorPicker('vvd3') const VwcSimpleColorPicker = wrapper(`vvd3-simple-color-picker`, { events: [{"name":"change","propName":"onChange"}], attributes: [], properties: ['placement', 'swatchesPerRow', 'anchor', 'open', 'swatches', 'label', 'value', 'currentValue', 'initialValue', 'disabled', 'name', 'required', 'VIVID_VERSION', 'componentName'] }) VwcSimpleColorPicker.displayName = 'VwcSimpleColorPicker' export default VwcSimpleColorPicker