UNPKG

@bulmil/core

Version:

![bulmil](https://user-images.githubusercontent.com/2362138/65766959-c721a080-e16f-11e9-9fb9-45a5a2ad0391.jpg)

222 lines (221 loc) 7.33 kB
/*! * Bulmil - MIT License */ import { h } from "@stencil/core"; export class Textarea { constructor() { this.controlClass = ''; this.value = undefined; this.color = undefined; this.size = undefined; this.state = undefined; this.readonly = false; this.disabled = false; this.isLoading = false; this.hasFixedSize = false; this.rows = undefined; } render() { return (h("div", { key: '9ea42c68d103728857f0d7213909668733442e0f', class: { control: true, 'is-loading': this.isLoading, [this.controlClass]: Boolean(this.controlClass), } }, h("textarea", { key: '50dc71296a89360d050afd014d6f43c86a3f3579', class: { textarea: true, 'has-fixed-size': this.hasFixedSize, [this.color]: Boolean(this.color), [this.size]: Boolean(this.size), [this.state]: Boolean(this.state), }, disabled: this.disabled, readonly: this.readonly }, this.value))); } static get is() { return "bm-textarea"; } static get originalStyleUrls() { return { "$": ["textarea.scss"] }; } static get styleUrls() { return { "$": ["textarea.css"] }; } static get properties() { return { "controlClass": { "type": "string", "mutable": false, "complexType": { "original": "string", "resolved": "string", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Control class" }, "attribute": "control-class", "reflect": false, "defaultValue": "''" }, "value": { "type": "any", "mutable": false, "complexType": { "original": "string | number", "resolved": "number | string", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Value" }, "attribute": "value", "reflect": false }, "color": { "type": "string", "mutable": false, "complexType": { "original": "'is-primary' | 'is-info' | 'is-success' | 'is-warning' | 'is-danger'", "resolved": "\"is-danger\" | \"is-info\" | \"is-primary\" | \"is-success\" | \"is-warning\"", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Color" }, "attribute": "color", "reflect": false }, "size": { "type": "string", "mutable": false, "complexType": { "original": "'is-small' | 'is-normal' | 'is-medium' | 'is-large'", "resolved": "\"is-large\" | \"is-medium\" | \"is-normal\" | \"is-small\"", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Size" }, "attribute": "size", "reflect": false }, "state": { "type": "string", "mutable": false, "complexType": { "original": "'is-hovered' | 'is-focused'", "resolved": "\"is-focused\" | \"is-hovered\"", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "State" }, "attribute": "state", "reflect": false }, "readonly": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Readonly state" }, "attribute": "readonly", "reflect": false, "defaultValue": "false" }, "disabled": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Disabled state" }, "attribute": "disabled", "reflect": false, "defaultValue": "false" }, "isLoading": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Loading state" }, "attribute": "is-loading", "reflect": false, "defaultValue": "false" }, "hasFixedSize": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Fixed size" }, "attribute": "has-fixed-size", "reflect": false, "defaultValue": "false" }, "rows": { "type": "number", "mutable": false, "complexType": { "original": "number", "resolved": "number", "references": {} }, "required": false, "optional": false, "docs": { "tags": [], "text": "Rows" }, "attribute": "rows", "reflect": false } }; } }