{"code":"import * as tslib_1 from \"tslib\";\r\nimport { LitElement } from '@polymer/lit-element';\r\nimport { html } from 'lit-html/lib/lit-extended';\r\nimport { component, property, bindAttributes, dispatchChange } from '../../util/decorators';\r\nimport CSS from './input-css';\r\nlet Input = class Input extends LitElement {\r\n    constructor() {\r\n        super(...arguments);\r\n        this.type = 'text';\r\n    }\r\n    _render({ icon, loading, type, placeholder, disabled, value }) {\r\n        const v = value || '';\r\n        return html `\n            ${CSS}\n            ${icon\r\n            ? html `<zen-icon type=\"${icon}\" color=\"grey-300\"></zen-icon>`\r\n            : ''}\n\n            <input\n                value=\"${v}\"\n                type=\"${type}\"\n                placeholder=\"${placeholder}\"\n                disabled=\"${disabled}\"\n                on-input=\"${this._handleInput.bind(this)}\"\n            />\n\n            ${loading\r\n            ? html `<zen-loading></zen-loading>`\r\n            : ''}\n        `;\r\n    }\r\n    focus() {\r\n        this.shadowRoot.querySelector('input').focus();\r\n    }\r\n    _handleInput(e) {\r\n        this.value = e.target.value;\r\n    }\r\n};\r\nInput._boundAttributes = [\r\n    'placeholder', 'name', 'type', 'icon', 'loading', 'disabled'\r\n];\r\ntslib_1.__decorate([\r\n    property,\r\n    tslib_1.__metadata(\"design:type\", String)\r\n], Input.prototype, \"placeholder\", void 0);\r\ntslib_1.__decorate([\r\n    property,\r\n    tslib_1.__metadata(\"design:type\", String)\r\n], Input.prototype, \"name\", void 0);\r\ntslib_1.__decorate([\r\n    property,\r\n    tslib_1.__metadata(\"design:type\", String)\r\n], Input.prototype, \"type\", void 0);\r\ntslib_1.__decorate([\r\n    property,\r\n    tslib_1.__metadata(\"design:type\", String)\r\n], Input.prototype, \"icon\", void 0);\r\ntslib_1.__decorate([\r\n    property,\r\n    tslib_1.__metadata(\"design:type\", Boolean)\r\n], Input.prototype, \"loading\", void 0);\r\ntslib_1.__decorate([\r\n    property,\r\n    tslib_1.__metadata(\"design:type\", String)\r\n], Input.prototype, \"value\", void 0);\r\ntslib_1.__decorate([\r\n    property,\r\n    tslib_1.__metadata(\"design:type\", String)\r\n], Input.prototype, \"disabled\", void 0);\r\nInput = tslib_1.__decorate([\r\n    component('zen-input'),\r\n    bindAttributes,\r\n    dispatchChange()\r\n], Input);\r\nexport default Input;\r\n","dts":{"name":"/Users/tristanmatthias/projects/origami/zen/packages/components/Input/Input.d.ts","text":"import { LitElement } from '@polymer/lit-element';\r\nimport { TemplateResult } from 'lit-html';\r\nexport interface props {\r\n    placeholder?: string;\r\n    name?: string;\r\n    type: string;\r\n    icon?: string;\r\n    loading?: boolean;\r\n    value?: string;\r\n    disabled?: string;\r\n}\r\nexport default class Input extends LitElement implements props {\r\n    placeholder?: string;\r\n    name?: string;\r\n    type: string;\r\n    icon?: string;\r\n    loading?: boolean;\r\n    value?: string;\r\n    disabled?: string;\r\n    static _boundAttributes: string[];\r\n    _render({icon, loading, type, placeholder, disabled, value}: props): TemplateResult;\r\n    focus(): void;\r\n    private _handleInput(e);\r\n}\r\n"}}
