UNPKG

@public-ui/components

Version:

Contains all web components that belong to KoliBri - The accessible HTML-Standard.

81 lines (80 loc) 2.77 kB
/*! * KoliBri - The accessible HTML-Standard */ import { h, Host } from "@stencil/core"; import { BaseWebComponent } from "../../../../internal/functional-components/base-web-component"; import { ClickButtonFC } from "../../../../internal/functional-components/click-button/component"; import { ClickButtonController } from "../../../../internal/functional-components/click-button/controller"; export class KolClickButton extends BaseWebComponent { constructor() { this.ctrl = new ClickButtonController(this.stateAccess); super(); } watchLabel(value) { this.ctrl.watchLabel(value); } async focus() { return Promise.resolve(this.ctrl.focus()); } componentWillLoad() { this.ctrl.componentWillLoad({ label: this._label, }); } render() { return (h(Host, { key: '13b02362df73f8676bd663d495d9f8db728aced1' }, h(ClickButtonFC, { key: 'dcd11986d2f98368d9c36d1233f34040794ce8e2', label: this.ctrl.getRenderProp('label'), refButton: this.ctrl.setButtonRef, handleClick: this.ctrl.handleClick }))); } static get is() { return "kol-click-button"; } static get encapsulation() { return "shadow"; } static get properties() { return { "_label": { "type": "string", "mutable": false, "complexType": { "original": "string", "resolved": "string", "references": {} }, "required": true, "optional": false, "docs": { "tags": [], "text": "Sets the label of the click button component." }, "getter": false, "setter": false, "reflect": false, "attribute": "_label" } }; } static get methods() { return { "focus": { "complexType": { "signature": "() => Promise<void>", "parameters": [], "references": { "Promise": { "location": "global", "id": "global::Promise" } }, "return": "Promise<void>" }, "docs": { "text": "Focuses the interactive element of the component.", "tags": [] } } }; } static get watchers() { return [{ "propName": "_label", "methodName": "watchLabel" }]; } } //# sourceMappingURL=component.js.map