UNPKG

@esri/calcite-components

Version:

Web Components for Esri's Calcite Design System.

93 lines (92 loc) 2.44 kB
import { Component, Host, h, Prop, Watch, Event } from "@stencil/core"; export class CalciteOptionGroup { constructor() { //-------------------------------------------------------------------------- // // Properties // //-------------------------------------------------------------------------- /** * When true, it prevents selection from any of its associated options. */ this.disabled = false; } handlePropChange() { this.calciteOptionGroupChange.emit(); } //-------------------------------------------------------------------------- // // Render Methods // //-------------------------------------------------------------------------- render() { return (h(Host, null, h("div", null, this.label), h("slot", null))); } static get is() { return "calcite-option-group"; } static get encapsulation() { return "shadow"; } static get properties() { return { "disabled": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "When true, it prevents selection from any of its associated options." }, "attribute": "disabled", "reflect": true, "defaultValue": "false" }, "label": { "type": "string", "mutable": false, "complexType": { "original": "string", "resolved": "string", "references": {} }, "required": true, "optional": false, "docs": { "tags": [], "text": "The group label. This property is required." }, "attribute": "label", "reflect": false } }; } static get events() { return [{ "method": "calciteOptionGroupChange", "name": "calciteOptionGroupChange", "bubbles": true, "cancelable": true, "composed": true, "docs": { "tags": [{ "text": undefined, "name": "internal" }], "text": "" }, "complexType": { "original": "any", "resolved": "any", "references": {} } }]; } static get watchers() { return [{ "propName": "disabled", "methodName": "handlePropChange" }, { "propName": "label", "methodName": "handlePropChange" }]; } }