@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
82 lines (78 loc) • 3.18 kB
JavaScript
/*!
* KoliBri - The accessible HTML-Standard
*/
;
var index = require('./index-BrhW8s5h.js');
var variantQuote = require('./variant-quote-DpNzmCtr.js');
var component = require('./component-kXVnT0Wy.js');
var controller = require('./controller-DiB9pVnb.js');
require('./common-DPb6NWR4.js');
require('./normalizers-BCLslVaT.js');
require('./_Uint8Array-BAQUGozM.js');
require('./isArray-BOIOdEQh.js');
require('./component-BUJSMbIY.js');
require('./tslib.es6-Cm0ytgPY.js');
require('./bem-registry-DevvgGUu.js');
require('./clsx-Bm_HQUnh.js');
require('./component-CuHGwo27.js');
require('./align-floating-elements-BkrTeMF3.js');
require('./tooltip-open-tracking-Ba0udJRU.js');
require('./align-B8NMKvjk.js');
require('./label-DRrPbj-j.js');
require('./base-controller-DAzsTqX9.js');
const KolTooltipWc = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.controller = new controller.TooltipController(variantQuote.BaseWebComponent.stateLess);
this._align = 'top';
}
validateAlign(value) {
var _a;
(_a = this.controller) === null || _a === void 0 ? void 0 : _a.watchAlign(value);
}
validateId(value) {
var _a;
(_a = this.controller) === null || _a === void 0 ? void 0 : _a.watchId(value);
}
validateLabel(value) {
var _a;
(_a = this.controller) === null || _a === void 0 ? void 0 : _a.watchLabel(value);
}
hideTooltip() {
var _a;
return Promise.resolve((_a = this.controller) === null || _a === void 0 ? void 0 : _a.hideTooltip());
}
componentWillLoad() {
this.controller.componentWillLoad({
label: this._label,
align: this._align,
badgeText: this._badgeText,
id: this._id,
});
}
connectedCallback() {
var _a, _b, _c;
(_a = this.controller) === null || _a === void 0 ? void 0 : _a.initContext(((_c = (_b = this.host) === null || _b === void 0 ? void 0 : _b.previousElementSibling) !== null && _c !== void 0 ? _c : undefined));
}
componentDidRender() {
var _a;
if (this.host) {
(_a = this.controller) === null || _a === void 0 ? void 0 : _a.handleEventListeners(this.host);
}
}
disconnectedCallback() {
var _a;
(_a = this.controller) === null || _a === void 0 ? void 0 : _a.destroy();
}
render() {
return (index.h(index.Host, { key: 'f677d58b886cdb9f1aab620608155ee412e0ef7d', class: "kol-tooltip" }, index.h(component.TooltipFC, { key: 'd86d1adc81a94fbb1116532e9f2529d96362834d', label: this.controller.getRenderProp('label'), badgeText: this._badgeText, id: this.controller.getRenderProp('id'), refFloating: (el) => { var _a; return (_a = this.controller) === null || _a === void 0 ? void 0 : _a.setTooltipElementRef(el); } })));
}
get host() { return index.getElement(this); }
static get watchers() { return {
"_align": ["validateAlign"],
"_id": ["validateId"],
"_label": ["validateLabel"]
}; }
};
exports.kol_tooltip_wc = KolTooltipWc;
//# sourceMappingURL=kol-tooltip-wc.entry.cjs.js.map