@public-ui/hydrate 2.2.20-3e68a967427d721cf5890286bc87047a988f4113.0 → 2.2.20-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -26428,40 +26428,17 @@ class KolTooltipWc {
26428
26428
  this.hideTooltip();
26429
26429
  }
26430
26430
  };
26431
- this.isInsideTriggerOrTooltip = (node) => {
26432
- var _a, _b;
26433
- return Boolean(node && (((_a = this.previousSibling) === null || _a === void 0 ? void 0 : _a.contains(node)) || ((_b = this.tooltipElement) === null || _b === void 0 ? void 0 : _b.contains(node))));
26434
- };
26435
- this.handleMouseOver = (event) => {
26436
- if (this.isInsideTriggerOrTooltip(event.relatedTarget)) {
26437
- return;
26438
- }
26439
- this.hasMouseIn = true;
26440
- this.showOrHideTooltip();
26441
- };
26442
- this.handleMouseOut = (event) => {
26443
- this.hasMouseIn = this.isInsideTriggerOrTooltip(event.relatedTarget);
26444
- this.showOrHideTooltip();
26445
- };
26446
- this.handleFocusIn = () => {
26447
- this.hasFocusIn = true;
26448
- this.showOrHideTooltip();
26449
- };
26450
- this.handleFocusout = () => {
26451
- this.hasFocusIn = false;
26452
- this.showOrHideTooltip();
26453
- };
26454
26431
  this.addListeners = (el) => {
26455
- el.addEventListener('mouseover', this.handleMouseOver);
26456
- el.addEventListener('mouseout', this.handleMouseOut);
26457
- el.addEventListener('focusin', this.handleFocusIn);
26458
- el.addEventListener('focusout', this.handleFocusout);
26432
+ el.addEventListener('mouseenter', this.handleMouseEnter.bind(this));
26433
+ el.addEventListener('mouseleave', this.handleMouseLeave.bind(this));
26434
+ el.addEventListener('focusin', this.handleFocusIn.bind(this));
26435
+ el.addEventListener('focusout', this.handleFocusOut.bind(this));
26459
26436
  };
26460
26437
  this.removeListeners = (el) => {
26461
- el.removeEventListener('mouseover', this.handleMouseOver);
26462
- el.removeEventListener('mouseout', this.handleMouseOut);
26463
- el.removeEventListener('focusin', this.handleFocusIn);
26464
- el.removeEventListener('focusout', this.handleFocusout);
26438
+ el.removeEventListener('mouseenter', this.handleMouseEnter.bind(this));
26439
+ el.removeEventListener('mouseleave', this.handleMouseLeave.bind(this));
26440
+ el.removeEventListener('focusin', this.handleFocusIn.bind(this));
26441
+ el.removeEventListener('focusout', this.handleFocusOut.bind(this));
26465
26442
  };
26466
26443
  this.resyncListeners = (last, next, replacePreviousSibling = false) => {
26467
26444
  if (last) {
@@ -26510,8 +26487,24 @@ class KolTooltipWc {
26510
26487
  });
26511
26488
  }
26512
26489
  }
26490
+ handleMouseEnter() {
26491
+ this.hasMouseIn = true;
26492
+ this.showOrHideTooltip();
26493
+ }
26494
+ handleMouseLeave() {
26495
+ this.hasMouseIn = false;
26496
+ this.showOrHideTooltip();
26497
+ }
26498
+ handleFocusIn() {
26499
+ this.hasFocusIn = true;
26500
+ this.showOrHideTooltip();
26501
+ }
26502
+ handleFocusOut() {
26503
+ this.hasFocusIn = false;
26504
+ this.showOrHideTooltip();
26505
+ }
26513
26506
  render() {
26514
- return (hAsync(Host, { key: 'd4278e8c9307b1093a6f8e4d109c5b2b6cb1c769', class: "kol-tooltip-wc" }, this.state._label !== '' && (hAsync("div", { key: 'dc5aaea839ff71909abd425d128c87579d9c0c0d', class: "tooltip-floating", ref: this.catchTooltipElement }, hAsync("div", { key: '67317c8f02cd38102546f81ba057d6bf2d3e950e', class: "tooltip-area tooltip-arrow", ref: this.catchArrowElement }), hAsync(KolSpanWcTag, { key: 'db9627e640effd99584da3943c786ba0039f481f', class: "tooltip-area tooltip-content", id: this.state._id, _badgeText: this._badgeText, _label: this.state._label })))));
26507
+ return (hAsync(Host, { key: '2835bd993b3e9237c0552e69c688f782a3d38ad8', class: "kol-tooltip-wc" }, hAsync("div", { key: 'd155ebf8e5b057df516b3878fcbc7631d62ce0e4', class: "tooltip-floating", hidden: this.state._label.length === 0, ref: this.catchTooltipElement }, hAsync("div", { key: 'eadf9d9d29b5e0d6748b86db1d0019315d43bef6', class: "tooltip-area tooltip-arrow", ref: this.catchArrowElement }), hAsync(KolSpanWcTag, { key: 'd217f7c393c63b9f323cec887051001d322912ff', class: "tooltip-area tooltip-content", id: this.state._id, _badgeText: this._badgeText, _label: this.state._label }))));
26515
26508
  }
26516
26509
  validateBadgeText(value) {
26517
26510
  validateBadgeText(this, value);
@@ -26534,14 +26527,13 @@ class KolTooltipWc {
26534
26527
  this.validateLabel(this._label);
26535
26528
  }
26536
26529
  handleEventListeners() {
26537
- var _a, _b;
26538
- const nextSibling = (_b = (_a = this.host) === null || _a === void 0 ? void 0 : _a.previousElementSibling) !== null && _b !== void 0 ? _b : null;
26539
- this.resyncListeners(this.previousSibling, nextSibling, true);
26530
+ var _a;
26531
+ this.resyncListeners(this.previousSibling, (_a = this.host) === null || _a === void 0 ? void 0 : _a.previousElementSibling, true);
26540
26532
  this.resyncListeners(this.tooltipElement, this.tooltipElement);
26541
26533
  }
26542
26534
  connectedCallback() {
26543
- var _a, _b;
26544
- this.previousSibling = (_b = (_a = this.host) === null || _a === void 0 ? void 0 : _a.previousElementSibling) !== null && _b !== void 0 ? _b : null;
26535
+ var _a;
26536
+ this.previousSibling = (_a = this.host) === null || _a === void 0 ? void 0 : _a.previousElementSibling;
26545
26537
  }
26546
26538
  componentDidRender() {
26547
26539
  this.handleEventListeners();
package/dist/index.mjs CHANGED
@@ -26424,40 +26424,17 @@ class KolTooltipWc {
26424
26424
  this.hideTooltip();
26425
26425
  }
26426
26426
  };
26427
- this.isInsideTriggerOrTooltip = (node) => {
26428
- var _a, _b;
26429
- return Boolean(node && (((_a = this.previousSibling) === null || _a === void 0 ? void 0 : _a.contains(node)) || ((_b = this.tooltipElement) === null || _b === void 0 ? void 0 : _b.contains(node))));
26430
- };
26431
- this.handleMouseOver = (event) => {
26432
- if (this.isInsideTriggerOrTooltip(event.relatedTarget)) {
26433
- return;
26434
- }
26435
- this.hasMouseIn = true;
26436
- this.showOrHideTooltip();
26437
- };
26438
- this.handleMouseOut = (event) => {
26439
- this.hasMouseIn = this.isInsideTriggerOrTooltip(event.relatedTarget);
26440
- this.showOrHideTooltip();
26441
- };
26442
- this.handleFocusIn = () => {
26443
- this.hasFocusIn = true;
26444
- this.showOrHideTooltip();
26445
- };
26446
- this.handleFocusout = () => {
26447
- this.hasFocusIn = false;
26448
- this.showOrHideTooltip();
26449
- };
26450
26427
  this.addListeners = (el) => {
26451
- el.addEventListener('mouseover', this.handleMouseOver);
26452
- el.addEventListener('mouseout', this.handleMouseOut);
26453
- el.addEventListener('focusin', this.handleFocusIn);
26454
- el.addEventListener('focusout', this.handleFocusout);
26428
+ el.addEventListener('mouseenter', this.handleMouseEnter.bind(this));
26429
+ el.addEventListener('mouseleave', this.handleMouseLeave.bind(this));
26430
+ el.addEventListener('focusin', this.handleFocusIn.bind(this));
26431
+ el.addEventListener('focusout', this.handleFocusOut.bind(this));
26455
26432
  };
26456
26433
  this.removeListeners = (el) => {
26457
- el.removeEventListener('mouseover', this.handleMouseOver);
26458
- el.removeEventListener('mouseout', this.handleMouseOut);
26459
- el.removeEventListener('focusin', this.handleFocusIn);
26460
- el.removeEventListener('focusout', this.handleFocusout);
26434
+ el.removeEventListener('mouseenter', this.handleMouseEnter.bind(this));
26435
+ el.removeEventListener('mouseleave', this.handleMouseLeave.bind(this));
26436
+ el.removeEventListener('focusin', this.handleFocusIn.bind(this));
26437
+ el.removeEventListener('focusout', this.handleFocusOut.bind(this));
26461
26438
  };
26462
26439
  this.resyncListeners = (last, next, replacePreviousSibling = false) => {
26463
26440
  if (last) {
@@ -26506,8 +26483,24 @@ class KolTooltipWc {
26506
26483
  });
26507
26484
  }
26508
26485
  }
26486
+ handleMouseEnter() {
26487
+ this.hasMouseIn = true;
26488
+ this.showOrHideTooltip();
26489
+ }
26490
+ handleMouseLeave() {
26491
+ this.hasMouseIn = false;
26492
+ this.showOrHideTooltip();
26493
+ }
26494
+ handleFocusIn() {
26495
+ this.hasFocusIn = true;
26496
+ this.showOrHideTooltip();
26497
+ }
26498
+ handleFocusOut() {
26499
+ this.hasFocusIn = false;
26500
+ this.showOrHideTooltip();
26501
+ }
26509
26502
  render() {
26510
- return (hAsync(Host, { key: 'd4278e8c9307b1093a6f8e4d109c5b2b6cb1c769', class: "kol-tooltip-wc" }, this.state._label !== '' && (hAsync("div", { key: 'dc5aaea839ff71909abd425d128c87579d9c0c0d', class: "tooltip-floating", ref: this.catchTooltipElement }, hAsync("div", { key: '67317c8f02cd38102546f81ba057d6bf2d3e950e', class: "tooltip-area tooltip-arrow", ref: this.catchArrowElement }), hAsync(KolSpanWcTag, { key: 'db9627e640effd99584da3943c786ba0039f481f', class: "tooltip-area tooltip-content", id: this.state._id, _badgeText: this._badgeText, _label: this.state._label })))));
26503
+ return (hAsync(Host, { key: '2835bd993b3e9237c0552e69c688f782a3d38ad8', class: "kol-tooltip-wc" }, hAsync("div", { key: 'd155ebf8e5b057df516b3878fcbc7631d62ce0e4', class: "tooltip-floating", hidden: this.state._label.length === 0, ref: this.catchTooltipElement }, hAsync("div", { key: 'eadf9d9d29b5e0d6748b86db1d0019315d43bef6', class: "tooltip-area tooltip-arrow", ref: this.catchArrowElement }), hAsync(KolSpanWcTag, { key: 'd217f7c393c63b9f323cec887051001d322912ff', class: "tooltip-area tooltip-content", id: this.state._id, _badgeText: this._badgeText, _label: this.state._label }))));
26511
26504
  }
26512
26505
  validateBadgeText(value) {
26513
26506
  validateBadgeText(this, value);
@@ -26530,14 +26523,13 @@ class KolTooltipWc {
26530
26523
  this.validateLabel(this._label);
26531
26524
  }
26532
26525
  handleEventListeners() {
26533
- var _a, _b;
26534
- const nextSibling = (_b = (_a = this.host) === null || _a === void 0 ? void 0 : _a.previousElementSibling) !== null && _b !== void 0 ? _b : null;
26535
- this.resyncListeners(this.previousSibling, nextSibling, true);
26526
+ var _a;
26527
+ this.resyncListeners(this.previousSibling, (_a = this.host) === null || _a === void 0 ? void 0 : _a.previousElementSibling, true);
26536
26528
  this.resyncListeners(this.tooltipElement, this.tooltipElement);
26537
26529
  }
26538
26530
  connectedCallback() {
26539
- var _a, _b;
26540
- this.previousSibling = (_b = (_a = this.host) === null || _a === void 0 ? void 0 : _a.previousElementSibling) !== null && _b !== void 0 ? _b : null;
26531
+ var _a;
26532
+ this.previousSibling = (_a = this.host) === null || _a === void 0 ? void 0 : _a.previousElementSibling;
26541
26533
  }
26542
26534
  componentDidRender() {
26543
26535
  this.handleEventListeners();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@public-ui/hydrate",
3
- "version": "2.2.20-3e68a967427d721cf5890286bc87047a988f4113.0",
3
+ "version": "2.2.20-rc.0",
4
4
  "license": "EUPL-1.2",
5
5
  "homepage": "https://public-ui.github.io",
6
6
  "repository": {
@@ -46,10 +46,10 @@
46
46
  ],
47
47
  "devDependencies": {
48
48
  "rimraf": "6.1.2",
49
- "@public-ui/components": "2.2.20-3e68a967427d721cf5890286bc87047a988f4113.0"
49
+ "@public-ui/components": "2.2.20-rc.0"
50
50
  },
51
51
  "peerDependencies": {
52
- "@public-ui/components": "2.2.20-3e68a967427d721cf5890286bc87047a988f4113.0"
52
+ "@public-ui/components": "2.2.20-rc.0"
53
53
  },
54
54
  "sideEffects": false,
55
55
  "type": "commonjs",