@vonage/vivid-react
Version:
Vivid wrapped for easy React usage & IDE autocomplete support & typescript typings
254 lines (245 loc) • 5.9 kB
JavaScript
/*
* DO NOT EDIT THIS FILE. IT IS GENERATED
*/
/*
Code in this file were generated using following JSON:
{
"name": "vwc-select",
"path": "./../node_modules/@vonage/vwc-select/src/vwc-select.ts",
"description": "This component is an extension of [<mwc-select>](https://github.com/material-components/material-components-web-components/tree/master/packages/select)",
"attributes": [
{
"name": "dense",
"type": "boolean",
"default": "false"
},
{
"name": "shape",
"type": "SelectShape | undefined"
},
{
"name": "form",
"type": "string | undefined"
},
{
"name": "name",
"type": "string | undefined"
},
{
"name": "appearance",
"type": "SelectLayout | undefined"
}
],
"properties": [
{
"name": "dense",
"attribute": "dense",
"type": "boolean",
"default": "false",
"bindable": false
},
{
"name": "shape",
"attribute": "shape",
"type": "SelectShape | undefined",
"bindable": false
},
{
"name": "form",
"attribute": "form",
"type": "string | undefined",
"bindable": false
},
{
"name": "name",
"attribute": "name",
"type": "string | undefined",
"bindable": false
},
{
"name": "appearance",
"attribute": "appearance",
"type": "SelectLayout | undefined",
"bindable": false
},
{
"name": "styles",
"type": "CSSResult[]"
},
{
"name": "disabled",
"type": "boolean",
"bindable": false
},
{
"name": "outlined",
"type": "boolean",
"bindable": false
},
{
"name": "label",
"type": "string",
"bindable": false
},
{
"name": "value",
"type": "string",
"bindable": false
},
{
"name": "icon",
"type": "string",
"bindable": false
},
{
"name": "helper",
"type": "string",
"bindable": false
},
{
"name": "validateOnInitialRender",
"type": "boolean",
"bindable": false
},
{
"name": "validationMessage",
"type": "string",
"bindable": false
},
{
"name": "required",
"type": "boolean",
"bindable": false
},
{
"name": "naturalMenuWidth",
"type": "boolean",
"bindable": false
},
{
"name": "fixedMenuPosition",
"type": "boolean",
"bindable": false
},
{
"name": "items",
"type": "ListItemBase[]"
},
{
"name": "selected",
"type": "ListItemBase | null",
"bindable": false
},
{
"name": "index",
"type": "number",
"bindable": false
},
{
"name": "validityTransform",
"type": "((value: string, nativeValidity: ValidityState) => Partial<ValidityState>) | null",
"bindable": true
},
{
"name": "validity",
"type": "ValidityState",
"bindable": false
},
{
"name": "shadowRootOptions",
"type": "ShadowRootInit",
"bindable": false
},
{
"name": "ripple",
"description": "Implement ripple getter for Ripple integration with mwc-formfield",
"type": "Promise<RippleInterface | null> | undefined"
}
],
"events": [
{
"name": "selected"
},
{
"name": "action"
},
{
"name": "opened"
},
{
"name": "closed"
},
{
"name": "change"
},
{
"name": "invalid"
}
]
}
*/
import PropTypes from 'prop-types'
import wrapper from '@vonage/vivid-react-wrapper'
import '@vonage/vwc-select'
/** This component is an extension of [<mwc-select>](https://github.com/material-components/material-components-web-components/tree/master/packages/select)
* @param {boolean} dense attribute: <VwcSelect dense />
* @param {SelectShape | undefined} shape attribute: <VwcSelect shape />
* @param {string | undefined} form attribute: <VwcSelect form />
* @param {string | undefined} name attribute: <VwcSelect name />
* @param {SelectLayout | undefined} appearance attribute: <VwcSelect appearance />
* @param {boolean} disabled
* @param {boolean} outlined
* @param {string} label
* @param {string} value
* @param {string} icon
* @param {string} helper
* @param {boolean} validateOnInitialRender
* @param {string} validationMessage
* @param {boolean} required
* @param {boolean} naturalMenuWidth
* @param {boolean} fixedMenuPosition
* @param {ListItemBase | null} selected
* @param {number} index
* @param {((value: string, nativeValidity: ValidityState) => Partial<ValidityState>) | null} validityTransform
* @param {ValidityState} validity
* @param {ShadowRootInit} shadowRootOptions
*/
const VwcSelect = wrapper('vwc-select', {
events: [{"name":"invalid"},{"name":"change"},{"name":"closed"},{"name":"opened"},{"name":"action"},{"name":"selected"}],
attributes: [],
properties: ["validityTransform"]
});
VwcSelect.propTypes = {
onSelected: PropTypes.func,
onAction: PropTypes.func,
onOpened: PropTypes.func,
onClosed: PropTypes.func,
onChange: PropTypes.func,
onInvalid: PropTypes.func,
dense: PropTypes.bool/* default: false *//* attribute: dense */,
shape: PropTypes.any /* SelectShape | undefined *//* attribute: shape */,
form: PropTypes.string/* attribute: form */,
name: PropTypes.string/* attribute: name */,
appearance: PropTypes.any /* SelectLayout | undefined *//* attribute: appearance */,
disabled: PropTypes.bool,
outlined: PropTypes.bool,
label: PropTypes.string,
value: PropTypes.string,
icon: PropTypes.string,
helper: PropTypes.string,
validateOnInitialRender: PropTypes.bool,
validationMessage: PropTypes.string,
required: PropTypes.bool,
naturalMenuWidth: PropTypes.bool,
fixedMenuPosition: PropTypes.bool,
selected: PropTypes.any /* ListItemBase | null */,
index: PropTypes.number,
validityTransform: PropTypes.any /* ((value: string, nativeValidity: ValidityState) => Partial<ValidityState>) | null */,
validity: PropTypes.any /* ValidityState */,
shadowRootOptions: PropTypes.any /* ShadowRootInit */
}
VwcSelect.defaultProps = {
dense: false
}
VwcSelect.displayName = 'VwcSelect'
export default VwcSelect