@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
80 lines (77 loc) • 3.15 kB
JavaScript
/*!
* KoliBri - The accessible HTML-Standard
*/
import { r as registerInstance, h, H as Host, g as getElement } from './index-BQlHOxik.js';
import { B as BaseWebComponent } from './variant-quote-y0Z1TRdz.js';
import { T as TooltipFC } from './component-Dh0cPCxF.js';
import { T as TooltipController } from './controller-Bdve6A-Q.js';
import './common-Cx_AGO_M.js';
import './normalizers-m3s9sgmq.js';
import './_Uint8Array-kJHDjtoP.js';
import './isArray-CcrBs4JM.js';
import './component-DvjvBJeK.js';
import './tslib.es6-QNbPBOk5.js';
import './bem-registry-CWvl2xho.js';
import './clsx-COFh-Vc8.js';
import './component-DzaT2WlJ.js';
import './align-floating-elements-D5XJiLiU.js';
import './tooltip-open-tracking-D3tCiiGP.js';
import './align-DxZmRFcp.js';
import './label-KTv-zMW0.js';
import './base-controller-CXhqh4cR.js';
const KolTooltipWc = class {
constructor(hostRef) {
registerInstance(this, hostRef);
this.controller = new TooltipController(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 (h(Host, { key: 'f677d58b886cdb9f1aab620608155ee412e0ef7d', class: "kol-tooltip" }, h(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 getElement(this); }
static get watchers() { return {
"_align": ["validateAlign"],
"_id": ["validateId"],
"_label": ["validateLabel"]
}; }
};
export { KolTooltipWc as kol_tooltip_wc };
//# sourceMappingURL=kol-tooltip-wc.entry.js.map