spoko-design-system 1.35.0 → 1.35.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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/scripts/tooltips.ts +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [1.35.1](https://github.com/polo-blue/sds/compare/v1.35.0...v1.35.1) (2026-03-24)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* tooltip listeners lost after Astro View Transitions ([#409](https://github.com/polo-blue/sds/issues/409)) ([4fe9dd4](https://github.com/polo-blue/sds/commit/4fe9dd4d80a15edad47c277c233fb153072a2619))
|
|
6
|
+
|
|
1
7
|
## [1.35.0](https://github.com/polo-blue/sds/compare/v1.34.26...v1.35.0) (2026-03-24)
|
|
2
8
|
|
|
3
9
|
### ⚠ BREAKING CHANGES
|
package/package.json
CHANGED
package/src/scripts/tooltips.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* SDS Tooltip Engine
|
|
3
3
|
* Powered by Floating UI — replaces tippy.js
|
|
4
4
|
*
|
|
5
|
-
* Uses event delegation on document
|
|
5
|
+
* Uses event delegation on document (capture phase) for performance.
|
|
6
6
|
* Handles tooltips for any element with [data-sds-tooltip] attribute.
|
|
7
7
|
*
|
|
8
8
|
* Supported attributes:
|
|
@@ -203,10 +203,13 @@ export function initTooltips() {
|
|
|
203
203
|
if (initialized) return;
|
|
204
204
|
initialized = true;
|
|
205
205
|
|
|
206
|
-
document.body
|
|
207
|
-
|
|
208
|
-
document
|
|
209
|
-
document.
|
|
206
|
+
// Use `document` instead of `document.body` — Astro View Transitions
|
|
207
|
+
// replace the <body> element during swap, which would lose listeners.
|
|
208
|
+
// `document` persists across navigations.
|
|
209
|
+
document.addEventListener('mouseenter', handleMouseEnter, true);
|
|
210
|
+
document.addEventListener('mouseleave', handleMouseLeave, true);
|
|
211
|
+
document.addEventListener('focusin', handleFocusIn, true);
|
|
212
|
+
document.addEventListener('focusout', handleFocusOut, true);
|
|
210
213
|
}
|
|
211
214
|
|
|
212
215
|
function cleanup() {
|