@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
131 lines (130 loc) • 4.58 kB
JavaScript
/*!
* KoliBri - The accessible HTML-Standard
*/
import { h, Host } from "@stencil/core";
import { BaseWebComponent } from "../../internal/functional-components/base-web-component";
import { SpinFC } from "../../internal/functional-components/spin/component";
import { SpinController } from "../../internal/functional-components/spin/controller";
export class KolSpin extends BaseWebComponent {
constructor() {
this.ctrl = new SpinController(this.stateAccess);
this.showToggled = false;
super();
}
watchShow(value) {
this.ctrl.watchShow(value);
}
watchLabel(value) {
this.ctrl.watchLabel(value);
}
watchVariant(value) {
this.ctrl.watchVariant(value);
}
componentWillLoad() {
this.ctrl.componentWillLoad({
show: this._show,
label: this._label,
variant: this._variant,
});
}
render() {
return (h(Host, { key: 'b4fec1b0b595bf2eebe1c8f866b5f1352be06093' }, h(SpinFC, { key: '95988885799767328412a77384e5636b6444cc52', show: this.ctrl.getRenderProp('show'), label: this.ctrl.getRenderProp('label'), variant: this.ctrl.getRenderProp('variant'), showToggled: this.showToggled, handleGetTranslateActionRunning: this.ctrl.handleGetTranslateActionRunning, handleGetTranslateActionDone: this.ctrl.handleGetTranslateActionDone })));
}
static get is() { return "kol-spin"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() {
return {
"default": ["./style.scss"]
};
}
static get styleUrls() {
return {
"default": ["style.css"]
};
}
static get properties() {
return {
"_show": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean | undefined",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "Makes the element show up."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "_show"
},
"_label": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string | undefined",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "Defines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.)."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "_label"
},
"_variant": {
"type": "string",
"mutable": false,
"complexType": {
"original": "SpinVariantType",
"resolved": "\"cycle\" | \"dot\" | \"none\" | undefined",
"references": {
"SpinVariantType": {
"location": "import",
"path": "../../internal/props/variant-spin",
"id": "src/internal/props/variant-spin.ts::SpinVariantType"
}
}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "Defines which variant should be used for presentation."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "_variant"
}
};
}
static get states() {
return {
"showToggled": {}
};
}
static get watchers() {
return [{
"propName": "_show",
"methodName": "watchShow"
}, {
"propName": "_label",
"methodName": "watchLabel"
}, {
"propName": "_variant",
"methodName": "watchVariant"
}];
}
}
//# sourceMappingURL=component.js.map