/*! * All material copyright ESRI, All Rights Reserved, unless otherwise specified. * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details. * v1.0.0-beta.97 */ import { h, Fragment } from "@stencil/core"; /** * @slot - A slot for adding `calcite-option`s. */ export class OptionGroup { constructor() { //-------------------------------------------------------------------------- // // Properties // //-------------------------------------------------------------------------- /** * When `true`, interaction is prevented and the component is displayed with lower opacity. */ this.disabled = false; } handlePropChange() { this.calciteInternalOptionGroupChange.emit(); } //-------------------------------------------------------------------------- // // Render Methods // //-------------------------------------------------------------------------- render() { return (h(Fragment, null, h("div", null, this.label), h("slot", null))); } static get is() { return "calcite-option-group"; } static get encapsulation() { return "shadow"; } static get originalStyleUrls() { return { "$": ["option-group.scss"] }; } static get styleUrls() { return { "$": ["option-group.css"] }; } static get properties() { return { "disabled": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "When `true`, interaction is prevented and the component is displayed with lower opacity." }, "attribute": "disabled", "reflect": true, "defaultValue": "false" }, "label": { "type": "string", "mutable": false, "complexType": { "original": "string", "resolved": "string", "references": {} }, "required": true, "optional": false, "docs": { "tags": [], "text": "Accessible name for the component." }, "attribute": "label", "reflect": false } }; } static get events() { return [{ "method": "calciteInternalOptionGroupChange", "name": "calciteInternalOptionGroupChange", "bubbles": true, "cancelable": false, "composed": true, "docs": { "tags": [{ "name": "internal", "text": undefined }], "text": "" }, "complexType": { "original": "void", "resolved": "void", "references": {} } }]; } static get watchers() { return [{ "propName": "disabled", "methodName": "handlePropChange" }, { "propName": "label", "methodName": "handlePropChange" }]; } }