@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
92 lines (91 loc) • 3.02 kB
JavaScript
/*!
* KoliBri - The accessible HTML-Standard
*/
import { h, Host } from "@stencil/core";
import { BaseWebComponent } from "../../internal/functional-components/base-web-component";
import { IconFC } from "../../internal/functional-components/icon/component";
import { IconController } from "../../internal/functional-components/icon/controller";
export class KolIcon {
constructor() {
this.ctrl = new IconController(BaseWebComponent.stateLess);
}
watchIcons(value) {
this.ctrl.watchIcons(value);
}
watchLabel(value) {
this.ctrl.watchLabel(value);
}
componentWillLoad() {
this.ctrl.componentWillLoad({
icons: this._icons,
label: this._label,
});
}
render() {
return (h(Host, { key: '0127f2d35f4164f440a30fec825e10158fc833a5' }, h(IconFC, { key: '6fa23897706337c29bc4ef2551904436b2a65785', icons: this.ctrl.getRenderProp('icons'), label: this.ctrl.getRenderProp('label') })));
}
static get is() { return "kol-icon"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() {
return {
"default": ["./style.scss"]
};
}
static get styleUrls() {
return {
"default": ["style.css"]
};
}
static get properties() {
return {
"_icons": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": true,
"optional": false,
"docs": {
"tags": [],
"text": "Defines the icon classnames (e.g. `_icons=\"fa-solid fa-user\"`)."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "_icons"
},
"_label": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": true,
"optional": false,
"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"
}
};
}
static get watchers() {
return [{
"propName": "_icons",
"methodName": "watchIcons"
}, {
"propName": "_label",
"methodName": "watchLabel"
}];
}
}
//# sourceMappingURL=component.js.map