@descope-ui/descope-tooltip 3.9.0 → 3.9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope-ui/descope-tooltip",
3
- "version": "3.9.0",
3
+ "version": "3.9.1",
4
4
  "files": [
5
5
  "src",
6
6
  "stories"
@@ -18,14 +18,14 @@
18
18
  },
19
19
  "devDependencies": {
20
20
  "@playwright/test": "1.58.2",
21
- "e2e-utils": "3.9.0"
21
+ "e2e-utils": "3.9.1"
22
22
  },
23
23
  "dependencies": {
24
24
  "@vaadin/tooltip": "24.3.4",
25
- "@descope-ui/common": "3.9.0",
26
- "@descope-ui/theme-globals": "3.9.0",
27
- "@descope-ui/descope-enriched-text": "3.9.0",
28
- "@descope-ui/descope-anchored": "3.9.0"
25
+ "@descope-ui/common": "3.9.1",
26
+ "@descope-ui/descope-enriched-text": "3.9.1",
27
+ "@descope-ui/theme-globals": "3.9.1",
28
+ "@descope-ui/descope-anchored": "3.9.1"
29
29
  },
30
30
  "publishConfig": {
31
31
  "link-workspace-packages": false
@@ -37,6 +37,15 @@ class RawTooltip extends createBaseClass({
37
37
 
38
38
  this.defaultSlot = this.shadowRoot.querySelector('slot:not([name])');
39
39
  this.tooltip = this.shadowRoot.querySelector('vaadin-tooltip');
40
+
41
+ this.anchored = this.shadowRoot.querySelector('descope-anchored');
42
+ }
43
+
44
+ // To support conditional components in flow, we need to sync the 'hidden' className to the root of the component.
45
+ // Ideally, this would happen in the SDK, but we resolved to this patch to fix the issue without forcing users to update SDKs.
46
+ #syncComponentState() {
47
+ const hasHidden = this.anchored?.classList?.contains('hidden');
48
+ this.classList.toggle('hidden', hasHidden);
40
49
  }
41
50
 
42
51
  static get observedAttributes() {
@@ -131,6 +140,8 @@ class RawTooltip extends createBaseClass({
131
140
  );
132
141
  this.#setTooltipTarget();
133
142
 
143
+ this.#syncComponentState();
144
+
134
145
  setTimeout(() => this.#onOverlayReady());
135
146
  }
136
147