@hub-kit/core 0.3.2 → 0.3.4
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.
|
@@ -6,6 +6,7 @@ import { TourCard } from "./tour-card.js";
|
|
|
6
6
|
import { useTour } from "./use-tour.js";
|
|
7
7
|
const SPOTLIGHT_PADDING = 6;
|
|
8
8
|
const MOVE_DURATION = "220ms";
|
|
9
|
+
const CARD_LAYER = "60";
|
|
9
10
|
const TALL_TARGET_GAP = 0.45;
|
|
10
11
|
const MAX_CARD_WIDTH = 352;
|
|
11
12
|
const SCREEN_MARGIN = 32;
|
|
@@ -78,6 +79,7 @@ export function TourOverlay() {
|
|
|
78
79
|
const wrapper = cardRef.current?.closest("[data-radix-popper-content-wrapper]");
|
|
79
80
|
if (wrapper) {
|
|
80
81
|
wrapper.style.transition = `transform ${MOVE_DURATION} ease`;
|
|
82
|
+
wrapper.style.zIndex = CARD_LAYER;
|
|
81
83
|
}
|
|
82
84
|
}, [target]);
|
|
83
85
|
useEffect(() => {
|
|
@@ -118,7 +120,7 @@ export function TourOverlay() {
|
|
|
118
120
|
if (!tour || !tour.isOpen || !step || !rect) {
|
|
119
121
|
return null;
|
|
120
122
|
}
|
|
121
|
-
return (_jsxs("div", { className: "fixed inset-0 z-50", role: "presentation",
|
|
123
|
+
return (_jsxs("div", { className: "fixed inset-0 z-50", role: "presentation", children: [_jsx("div", { className: "absolute inset-0", style: { background: "var(--tour-backdrop, rgb(0 0 0 / 0.5))" }, onClick: tour.skip }), _jsx("div", { className: "absolute", onClick: tour.skip, style: {
|
|
122
124
|
top: rect.top - SPOTLIGHT_PADDING,
|
|
123
125
|
left: rect.left - SPOTLIGHT_PADDING,
|
|
124
126
|
width: rect.width + SPOTLIGHT_PADDING * 2,
|