@getflip/swirl-components 0.241.0 → 0.241.1

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/components.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2024-09-23T11:25:15",
2
+ "timestamp": "2024-09-23T13:07:34",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.18.1",
@@ -35,6 +35,9 @@ const SwirlTooltip = class {
35
35
  };
36
36
  };
37
37
  this.show = () => {
38
+ if (!this.active) {
39
+ return;
40
+ }
38
41
  this.visible = true;
39
42
  requestAnimationFrame(() => {
40
43
  const referenceElement = this.el.children[0];
@@ -46,6 +49,9 @@ const SwirlTooltip = class {
46
49
  });
47
50
  };
48
51
  this.showWithDelay = () => {
52
+ if (!this.active) {
53
+ return;
54
+ }
49
55
  if (Boolean(this.showTimeout)) {
50
56
  clearTimeout(this.showTimeout);
51
57
  this.showTimeout = undefined;
@@ -91,9 +97,15 @@ const SwirlTooltip = class {
91
97
  this.hide();
92
98
  }
93
99
  onWindowResize() {
100
+ if (!this.active) {
101
+ return;
102
+ }
94
103
  this.reposition();
95
104
  }
96
105
  onWindowScroll() {
106
+ if (!this.active || !this.visible) {
107
+ return;
108
+ }
97
109
  this.reposition();
98
110
  }
99
111
  componentWillLoad() {
@@ -107,7 +119,7 @@ const SwirlTooltip = class {
107
119
  "tooltip--active": this.active,
108
120
  "tooltip--visible": this.visible,
109
121
  });
110
- return (index.h(index.Host, { key: '8f56d251588bf2ba5357f02030530b8529edb714', onKeydown: this.onKeydown }, index.h("span", { key: '61a2da29f6754906d2aa33eda9fd35332d34605c', class: className }, index.h("span", { key: '634ccb7169aeddc870cee955fb91116a7523430e', class: "tooltip__reference", "aria-describedby": "tooltip", onFocusout: this.hide, onClick: this.hide, onFocusin: this.show }, index.h("slot", { key: '6128cdddd6ccde561c09e9a262515b7d2ef8d197' })), index.h("span", { key: '4f1b5ad00978ffbd9569d78a73ee7360fe73b0c1', class: "tooltip__popper", ref: (el) => (this.popperEl = el), style: {
122
+ return (index.h(index.Host, { key: '6b4349568aeda21be1c86dc8ba47d32fd69fcf6c', onKeydown: this.onKeydown }, index.h("span", { key: '23920a993ad647905f7d9aa72cf4815c762e0239', class: className }, index.h("span", { key: '3bc99d469fe2fb3fbe459778b3a5138e2e10d14b', class: "tooltip__reference", "aria-describedby": "tooltip", onFocusout: this.hide, onClick: this.hide, onFocusin: this.show }, index.h("slot", { key: '7cb1ae022a8a668fdc43baff33ec00c23721cbf7' })), index.h("span", { key: 'd6afed9fe735ec487bf360673f233d57ca00a550', class: "tooltip__popper", ref: (el) => (this.popperEl = el), style: {
111
123
  top: Boolean(this.actualPosition)
112
124
  ? `${this.actualPosition?.y}px`
113
125
  : "",
@@ -115,7 +127,7 @@ const SwirlTooltip = class {
115
127
  ? `${this.actualPosition?.x}px`
116
128
  : "",
117
129
  position: this.positioning,
118
- } }, this.visible && (index.h("span", { key: '4e008a825910accf5025b376cd31a4f318341a60', class: "tooltip__bubble", id: "tooltip", part: "tooltip__bubble", role: "tooltip" }, index.h("span", { key: '31a7fcb6aeafc3a16d573ca93657d3179d0fc043', class: "tooltip__content", innerHTML: this.content }))), index.h("span", { key: '67143598c3ce86017ef52f38fdf655aed68805e8', class: "tooltip__arrow", ref: (el) => (this.arrowElement = el), style: {
130
+ } }, this.visible && (index.h("span", { key: '05ab2e80cae9ef200520044028fd97aef05f36a5', class: "tooltip__bubble", id: "tooltip", part: "tooltip__bubble", role: "tooltip" }, index.h("span", { key: '7c8260e768c51475675090049e8f4acdb6915861', class: "tooltip__content", innerHTML: this.content }))), index.h("span", { key: '3b2642690f347c433c98e36de14b04cb99f8d9aa', class: "tooltip__arrow", ref: (el) => (this.arrowElement = el), style: {
119
131
  ...this.arrowStyles,
120
132
  visibility: this.visible ? "visible" : "hidden",
121
133
  } })))));