@sebgroup/green-core 2.21.0 → 2.22.0-rc.20260113120917392
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/coachmark/coachmark.component.d.ts +1 -1
- package/components/coachmark/coachmark.component.js +7 -5
- package/custom-elements.json +8685 -8685
- package/gds-element.js +1 -1
- package/generated/react/coachmark/index.d.ts +1 -1
- package/generated/react/index.d.ts +3 -3
- package/generated/react/index.js +3 -3
- package/package.json +1 -1
- package/utils/helpers/custom-element-scoping.js +1 -1
|
@@ -8,7 +8,7 @@ import { GdsElement } from '../../gds-element';
|
|
|
8
8
|
*
|
|
9
9
|
* @slot - placeholder for the content of the tooltip.
|
|
10
10
|
*
|
|
11
|
-
* @event gds-ui-state - dispatched when the tooltip is closed
|
|
11
|
+
* @event gds-ui-state - dispatched when the tooltip is about to be closed. Can be cancelled to prevent closing.
|
|
12
12
|
*
|
|
13
13
|
* @status beta
|
|
14
14
|
*/
|
|
@@ -98,14 +98,16 @@ _GdsCoachmark_instances = new WeakSet();
|
|
|
98
98
|
closeCoachMark_fn = function() {
|
|
99
99
|
var _a;
|
|
100
100
|
if (!this._isVisible) return;
|
|
101
|
-
this.
|
|
102
|
-
__privateGet(this, _cardRef).value?.remove();
|
|
103
|
-
(_a = __privateGet(this, _autoUpdateCleanupFn)) == null ? void 0 : _a.call(this);
|
|
104
|
-
this.dispatchCustomEvent("gds-ui-state", {
|
|
101
|
+
const shouldClose = this.dispatchCustomEvent("gds-ui-state", {
|
|
105
102
|
detail: { open: this._isVisible, reason: "closed" },
|
|
106
103
|
bubbles: false,
|
|
107
|
-
composed: false
|
|
104
|
+
composed: false,
|
|
105
|
+
cancelable: true
|
|
108
106
|
});
|
|
107
|
+
if (!shouldClose) return;
|
|
108
|
+
this._isVisible = false;
|
|
109
|
+
__privateGet(this, _cardRef).value?.remove();
|
|
110
|
+
(_a = __privateGet(this, _autoUpdateCleanupFn)) == null ? void 0 : _a.call(this);
|
|
109
111
|
};
|
|
110
112
|
findTarget_fn = function(selectors) {
|
|
111
113
|
let shadow = false;
|