@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
152 lines (151 loc) • 5.21 kB
JavaScript
/*!
* KoliBri - The accessible HTML-Standard
*/
import { h, Host } from "@stencil/core";
import { BaseWebComponent } from "../../internal/functional-components/base-web-component";
import { QuoteFC } from "../../internal/functional-components/quote/component";
import { QuoteController } from "../../internal/functional-components/quote/controller";
export class KolQuote {
constructor() {
this.ctrl = new QuoteController(BaseWebComponent.stateLess);
this._variant = 'inline';
}
watchHref(value) {
this.ctrl.watchHref(value);
}
watchLabel(value) {
this.ctrl.watchLabel(value);
}
watchQuote(value) {
this.ctrl.watchQuote(value);
}
watchVariant(value) {
this.ctrl.watchVariant(value);
}
componentWillLoad() {
this.ctrl.componentWillLoad({
href: this._href,
label: this._label,
quote: this._quote,
variant: this._variant,
});
}
render() {
return (h(Host, { key: '6dbdd16912a99997f52326f7cca426f704a7357b' }, h(QuoteFC, { key: 'a523fb0f75067faad16629169193f76e9e879ace', href: this.ctrl.getRenderProp('href'), label: this.ctrl.getRenderProp('label'), quote: this.ctrl.getRenderProp('quote'), variant: this.ctrl.getRenderProp('variant') })));
}
static get is() { return "kol-quote"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() {
return {
"default": ["./style.scss"]
};
}
static get styleUrls() {
return {
"default": ["style.css"]
};
}
static get properties() {
return {
"_href": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": true,
"optional": false,
"docs": {
"tags": [],
"text": "Sets the target URI of the link or citation source."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "_href"
},
"_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"
},
"_quote": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": true,
"optional": false,
"docs": {
"tags": [],
"text": "Defines the text of the quote."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "_quote"
},
"_variant": {
"type": "string",
"mutable": false,
"complexType": {
"original": "QuoteVariantType",
"resolved": "\"block\" | \"inline\" | undefined",
"references": {
"QuoteVariantType": {
"location": "import",
"path": "../../internal/props/variant-quote",
"id": "src/internal/props/variant-quote.ts::QuoteVariantType"
}
}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "Defines which variant should be used for presentation."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "_variant",
"defaultValue": "'inline'"
}
};
}
static get watchers() {
return [{
"propName": "_href",
"methodName": "watchHref"
}, {
"propName": "_label",
"methodName": "watchLabel"
}, {
"propName": "_quote",
"methodName": "watchQuote"
}, {
"propName": "_variant",
"methodName": "watchVariant"
}];
}
}
//# sourceMappingURL=component.js.map