@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
601 lines (600 loc) • 23.9 kB
JavaScript
/*!
* KoliBri - The accessible HTML-Standard
*/
import { __decorate } from "tslib";
import { h, Host } from "@stencil/core";
import { KolSelectWcTag } from "../../core/component-names";
import { createCtaRef, delegateFocus } from "../../utils/element-interaction";
export class KolSelect {
constructor() {
this.ctaRef = createCtaRef();
this._disabled = false;
this._hideMsg = false;
this._hideLabel = false;
this._hint = '';
this._multiple = false;
this._required = false;
this._tooltipAlign = 'top';
this._touched = false;
}
async getValue() {
var _a;
return (_a = this.ctaRef.el) === null || _a === void 0 ? void 0 : _a.getValue();
}
async focus() { }
render() {
return (h(Host, { key: '43a977b957f285fca31f70f808622ba8b239bf56', class: "kol-select" }, h(KolSelectWcTag, { key: '22c6b0f1ca9b7ad14559c507b3de48fb22b098c3', ref: this.ctaRef, _accessKey: this._accessKey, _disabled: this._disabled, _hideLabel: this._hideLabel, _hideMsg: this._hideMsg, _hint: this._hint, _icons: this._icons, _label: this._label, _msg: this._msg, _multiple: this._multiple, _name: this._name, _on: this._on, _options: this._options, _required: this._required, _rows: this._rows, _shortKey: this._shortKey, _syncValueBySelector: this._syncValueBySelector, _tabIndex: this._tabIndex, _tooltipAlign: this._tooltipAlign, _touched: this._touched, _value: this._value, _variant: this._variant }, h("slot", { key: 'd52a4fa1d901660ff7e02e729e35fa380b99bb1d', name: "expert", slot: "expert" }))));
}
static get is() { return "kol-select"; }
static get encapsulation() { return "shadow"; }
static get originalStyleUrls() {
return {
"default": ["./style.scss"]
};
}
static get styleUrls() {
return {
"default": ["style.css"]
};
}
static get properties() {
return {
"_accessKey": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string | undefined",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "Defines the key combination that can be used to trigger or focus the component's interactive element."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "_access-key"
},
"_disabled": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean | undefined",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [{
"name": "TODO",
"text": ": Change type back to `DisabledPropType` after Stencil#4663 has been resolved."
}],
"text": "Makes the element not focusable and ignore all events."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "_disabled",
"defaultValue": "false"
},
"_hideMsg": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean | undefined",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [{
"name": "TODO",
"text": ": Change type back to `HideMsgPropType` after Stencil#4663 has been resolved."
}],
"text": "Hides the error message but leaves it in the DOM for the input's aria-describedby."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "_hide-msg",
"defaultValue": "false"
},
"_hideLabel": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean | undefined",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [{
"name": "TODO",
"text": ": Change type back to `HideLabelPropType` after Stencil#4663 has been resolved."
}],
"text": "Hides the caption by default and displays the caption text with a tooltip when the\ninteractive element is focused or the mouse is over it."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "_hide-label",
"defaultValue": "false"
},
"_hint": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string | undefined",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "Defines the hint text."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "_hint",
"defaultValue": "''"
},
"_icons": {
"type": "string",
"mutable": false,
"complexType": {
"original": "IconsHorizontalPropType",
"resolved": "string | undefined | { right?: IconOrIconClass | undefined; left?: IconOrIconClass | undefined; }",
"references": {
"IconsHorizontalPropType": {
"location": "import",
"path": "../../schema",
"id": "src/schema/index.ts::IconsHorizontalPropType"
}
}
},
"required": false,
"optional": true,
"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": "LabelWithExpertSlotPropType",
"resolved": "string",
"references": {
"LabelWithExpertSlotPropType": {
"location": "import",
"path": "../../schema",
"id": "src/schema/index.ts::LabelWithExpertSlotPropType"
}
}
},
"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.). Set to `false` to enable the expert slot."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "_label"
},
"_msg": {
"type": "string",
"mutable": false,
"complexType": {
"original": "Stringified<MsgPropType>",
"resolved": "Omit<AlertProps, \"_on\" | \"_label\" | \"_level\" | \"_variant\" | \"_hasCloser\"> & { _description: string; } | string | undefined",
"references": {
"Stringified": {
"location": "import",
"path": "../../schema",
"id": "src/schema/index.ts::Stringified"
},
"MsgPropType": {
"location": "import",
"path": "../../schema",
"id": "src/schema/index.ts::MsgPropType"
}
}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "Defines the properties for a message rendered as Alert component."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "_msg"
},
"_multiple": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean | undefined",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [{
"name": "TODO",
"text": ": Change type back to `MultiplePropType` after Stencil#4663 has been resolved."
}],
"text": "Makes the input accept multiple inputs."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "_multiple",
"defaultValue": "false"
},
"_name": {
"type": "string",
"mutable": false,
"complexType": {
"original": "NamePropType",
"resolved": "string | undefined",
"references": {
"NamePropType": {
"location": "import",
"path": "../../schema",
"id": "src/schema/index.ts::NamePropType"
}
}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "Defines the technical name of an input field."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "_name"
},
"_on": {
"type": "unknown",
"mutable": false,
"complexType": {
"original": "InputTypeOnDefault",
"resolved": "InputTypeOnBlur & InputTypeOnClick & InputTypeOnChange & InputTypeOnFocus & InputTypeOnInput & InputTypeOnKeyDown | undefined",
"references": {
"InputTypeOnDefault": {
"location": "import",
"path": "../../schema",
"id": "src/schema/index.ts::InputTypeOnDefault"
}
}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "Gibt die EventCallback-Funktionen f\u00FCr das Input-Event an."
},
"getter": false,
"setter": false
},
"_options": {
"type": "string",
"mutable": false,
"complexType": {
"original": "OptionsWithOptgroupPropType",
"resolved": "(Option<StencilUnknown> | Optgroup<StencilUnknown>)[] | string",
"references": {
"OptionsWithOptgroupPropType": {
"location": "import",
"path": "../../schema",
"id": "src/schema/index.ts::OptionsWithOptgroupPropType"
}
}
},
"required": true,
"optional": false,
"docs": {
"tags": [],
"text": "Options the user can choose from."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "_options"
},
"_required": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean | undefined",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [{
"name": "TODO",
"text": ": Change type back to `RequiredPropType` after Stencil#4663 has been resolved."
}],
"text": "Makes the input element required."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "_required",
"defaultValue": "false"
},
"_shortKey": {
"type": "string",
"mutable": false,
"complexType": {
"original": "ShortKeyPropType",
"resolved": "string | undefined",
"references": {
"ShortKeyPropType": {
"location": "import",
"path": "../../schema",
"id": "src/schema/index.ts::ShortKeyPropType"
}
}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "Adds a visual shortcut hint after the label and instructs the screen reader to read the shortcut aloud."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "_short-key"
},
"_rows": {
"type": "number",
"mutable": false,
"complexType": {
"original": "RowsPropType",
"resolved": "number | undefined",
"references": {
"RowsPropType": {
"location": "import",
"path": "../../schema",
"id": "src/schema/index.ts::RowsPropType"
}
}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "Maximum number of visible rows of the element."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "_rows"
},
"_syncValueBySelector": {
"type": "string",
"mutable": false,
"complexType": {
"original": "SyncValueBySelectorPropType",
"resolved": "string | undefined",
"references": {
"SyncValueBySelectorPropType": {
"location": "import",
"path": "../../schema",
"id": "src/schema/index.ts::SyncValueBySelectorPropType"
}
}
},
"required": false,
"optional": true,
"docs": {
"tags": [{
"name": "internal",
"text": undefined
}],
"text": "Selector for synchronizing the value with another input element."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "_sync-value-by-selector"
},
"_tabIndex": {
"type": "number",
"mutable": false,
"complexType": {
"original": "number",
"resolved": "number | undefined",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "Defines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)"
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "_tab-index"
},
"_tooltipAlign": {
"type": "string",
"mutable": false,
"complexType": {
"original": "TooltipAlignPropType",
"resolved": "\"bottom\" | \"left\" | \"right\" | \"top\" | undefined",
"references": {
"TooltipAlignPropType": {
"location": "import",
"path": "../../schema",
"id": "src/schema/index.ts::TooltipAlignPropType"
}
}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "Defines where to show the Tooltip preferably: top, right, bottom or left."
},
"getter": false,
"setter": false,
"reflect": false,
"attribute": "_tooltip-align",
"defaultValue": "'top'"
},
"_touched": {
"type": "boolean",
"mutable": true,
"complexType": {
"original": "boolean",
"resolved": "boolean | undefined",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [{
"name": "TODO",
"text": ": Change type back to `TouchedPropType` after Stencil#4663 has been resolved."
}],
"text": "Shows if the input was touched by a user."
},
"getter": false,
"setter": false,
"reflect": true,
"attribute": "_touched",
"defaultValue": "false"
},
"_value": {
"type": "any",
"mutable": true,
"complexType": {
"original": "Stringified<StencilUnknown[]> | Stringified<StencilUnknown>",
"resolved": "StencilUnknown[] | boolean | null | number | object | string | undefined",
"references": {
"Stringified": {
"location": "import",
"path": "../../schema",
"id": "src/schema/index.ts::Stringified"
},
"StencilUnknown": {
"location": "import",
"path": "../../schema",
"id": "src/schema/index.ts::StencilUnknown"
}
}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "Defines the value of the element."
},
"getter": false,
"setter": false,
"reflect": true,
"attribute": "_value"
},
"_variant": {
"type": "string",
"mutable": false,
"complexType": {
"original": "VariantClassNamePropType",
"resolved": "string | undefined",
"references": {
"VariantClassNamePropType": {
"location": "import",
"path": "../../schema",
"id": "src/schema/index.ts::VariantClassNamePropType"
}
}
},
"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 methods() {
return {
"getValue": {
"complexType": {
"signature": "() => Promise<StencilUnknown[] | StencilUnknown | undefined>",
"parameters": [],
"references": {
"Promise": {
"location": "global",
"id": "global::Promise"
},
"StencilUnknown": {
"location": "import",
"path": "../../schema",
"id": "src/schema/index.ts::StencilUnknown"
}
},
"return": "Promise<StencilUnknown | StencilUnknown[]>"
},
"docs": {
"text": "Returns the selected values.",
"tags": []
}
},
"focus": {
"complexType": {
"signature": "() => Promise<void>",
"parameters": [],
"references": {
"Promise": {
"location": "global",
"id": "global::Promise"
}
},
"return": "Promise<void>"
},
"docs": {
"text": "Sets focus on the internal element.",
"tags": []
}
}
};
}
static get elementRef() { return "host"; }
}
__decorate([
delegateFocus('ctaRef')
], KolSelect.prototype, "focus", null);
//# sourceMappingURL=shadow.js.map