UNPKG

@public-ui/components

Version:

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

212 lines (211 loc) 7.88 kB
/*! * KoliBri - The accessible HTML-Standard */ import { h } from "@stencil/core"; import { KolAlertWcTag } from "../../core/component-names"; export class KolAlert { constructor() { this._alert = false; this._hasCloser = false; this._level = 0; this._type = 'default'; this._variant = 'msg'; this.state = { _level: 0, }; } render() { return (h(KolAlertWcTag, { key: '721b696fb334639b5996187b75774aa357e7131c', _alert: this._alert, _hasCloser: this._hasCloser, _label: this._label, _level: this._level, _on: this._on, _type: this._type, _variant: this._variant }, h("slot", { key: '49b4a02832d1ce95880243eaeb88bab7211f8137' }))); } static get is() { return "kol-alert"; } static get encapsulation() { return "shadow"; } static get originalStyleUrls() { return { "default": ["./style.scss"] }; } static get styleUrls() { return { "default": ["style.css"] }; } static get properties() { return { "_alert": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean | undefined", "references": {} }, "required": false, "optional": true, "docs": { "tags": [], "text": "Defines whether the screen-readers should read out the notification." }, "getter": false, "setter": false, "reflect": false, "attribute": "_alert", "defaultValue": "false" }, "_hasCloser": { "type": "boolean", "mutable": false, "complexType": { "original": "boolean", "resolved": "boolean | undefined", "references": {} }, "required": false, "optional": true, "docs": { "tags": [{ "name": "TODO", "text": ": Change type back to `HasCloserPropType` after Stencil#4663 has been resolved." }], "text": "Defines whether the element can be closed." }, "getter": false, "setter": false, "reflect": false, "attribute": "_has-closer", "defaultValue": "false" }, "_label": { "type": "string", "mutable": false, "complexType": { "original": "LabelPropType", "resolved": "string | undefined", "references": { "LabelPropType": { "location": "import", "path": "../../schema", "id": "src/schema/index.ts::LabelPropType" } } }, "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" }, "_level": { "type": "number", "mutable": false, "complexType": { "original": "HeadingLevel", "resolved": "0 | 1 | 2 | 3 | 4 | 5 | 6 | undefined", "references": { "HeadingLevel": { "location": "import", "path": "../../schema", "id": "src/schema/index.ts::HeadingLevel" } } }, "required": false, "optional": true, "docs": { "tags": [], "text": "Defines which H-level from 1-6 the heading has. 0 specifies no heading and is shown as bold text." }, "getter": false, "setter": false, "reflect": false, "attribute": "_level", "defaultValue": "0" }, "_on": { "type": "unknown", "mutable": false, "complexType": { "original": "KoliBriAlertEventCallbacks", "resolved": "undefined | { onClose?: EventCallback<Event> | undefined; }", "references": { "KoliBriAlertEventCallbacks": { "location": "import", "path": "../../schema", "id": "src/schema/index.ts::KoliBriAlertEventCallbacks" } } }, "required": false, "optional": true, "docs": { "tags": [], "text": "Gibt die EventCallback-Function f\u00FCr das Schlie\u00DFen des Alerts an." }, "getter": false, "setter": false }, "_type": { "type": "string", "mutable": false, "complexType": { "original": "AlertTypePropType", "resolved": "\"default\" | \"error\" | \"info\" | \"success\" | \"warning\" | undefined", "references": { "AlertTypePropType": { "location": "import", "path": "../../schema", "id": "src/schema/index.ts::AlertTypePropType" } } }, "required": false, "optional": true, "docs": { "tags": [], "text": "Defines either the type of the component or of the components interactive element." }, "getter": false, "setter": false, "reflect": false, "attribute": "_type", "defaultValue": "'default'" }, "_variant": { "type": "string", "mutable": false, "complexType": { "original": "AlertVariantPropType", "resolved": "\"card\" | \"msg\" | undefined", "references": { "AlertVariantPropType": { "location": "import", "path": "../../schema", "id": "src/schema/index.ts::AlertVariantPropType" } } }, "required": false, "optional": true, "docs": { "tags": [], "text": "Defines which variant should be used for presentation." }, "getter": false, "setter": false, "reflect": false, "attribute": "_variant", "defaultValue": "'msg'" } }; } static get states() { return { "state": {} }; } } //# sourceMappingURL=shadow.js.map