123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- /*!
- * 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.82
- */
- import { Component, h, Prop, Watch, Event, Fragment } from "@stencil/core";
- /**
- * @slot - A slot for adding `calcite-option`s.
- */
- export class OptionGroup {
- 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(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, 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": [{
- "name": "internal",
- "text": undefined
- }],
- "text": ""
- },
- "complexType": {
- "original": "any",
- "resolved": "any",
- "references": {}
- }
- }]; }
- static get watchers() { return [{
- "propName": "disabled",
- "methodName": "handlePropChange"
- }, {
- "propName": "label",
- "methodName": "handlePropChange"
- }]; }
- }
|