@ticketboothapp/booking 1.2.37 → 1.2.39
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
|
@@ -1423,11 +1423,26 @@ export function BookingFlow({
|
|
|
1423
1423
|
return null;
|
|
1424
1424
|
};
|
|
1425
1425
|
|
|
1426
|
-
const
|
|
1427
|
-
const
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1426
|
+
const detectedScrollParent = findScrollParent(el);
|
|
1427
|
+
const explicitScrollContainer = contentRef?.current ?? null;
|
|
1428
|
+
const isElementScrollable = (node: HTMLElement | null): node is HTMLElement => {
|
|
1429
|
+
if (!node) return false;
|
|
1430
|
+
const style = getComputedStyle(node);
|
|
1431
|
+
const allowsScroll = style.overflowY === 'auto' || style.overflowY === 'scroll' || style.overflowY === 'overlay';
|
|
1432
|
+
return allowsScroll && node.scrollHeight > node.clientHeight + 1;
|
|
1433
|
+
};
|
|
1434
|
+
|
|
1435
|
+
// Deterministic host-aware choice:
|
|
1436
|
+
// 1) explicit contentRef when it is truly scrollable
|
|
1437
|
+
// 2) nearest detected scroll parent when it is truly scrollable
|
|
1438
|
+
// 3) window scroll
|
|
1439
|
+
const scrollParent =
|
|
1440
|
+
!useWindowScroll && isElementScrollable(explicitScrollContainer)
|
|
1441
|
+
? explicitScrollContainer
|
|
1442
|
+
: !useWindowScroll && isElementScrollable(detectedScrollParent)
|
|
1443
|
+
? detectedScrollParent
|
|
1444
|
+
: null;
|
|
1445
|
+
const scrollTarget = scrollParent ?? (typeof window !== 'undefined' ? window : null);
|
|
1431
1446
|
|
|
1432
1447
|
let ticking = false;
|
|
1433
1448
|
const COOLDOWN_MS = 600; // After a state change, ignore reverse changes for this long (covers 0.25s collapse animation + layout settle)
|
|
@@ -101,6 +101,7 @@
|
|
|
101
101
|
transition: all 0.3s;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
+
|
|
104
105
|
.titleSticky {
|
|
105
106
|
font-size: 1rem;
|
|
106
107
|
margin-bottom: 0.25rem;
|
|
@@ -215,13 +216,13 @@
|
|
|
215
216
|
}
|
|
216
217
|
|
|
217
218
|
.placeLink {
|
|
218
|
-
color: var(--booking-
|
|
219
|
+
color: var(--booking-emerald-600, #059669);
|
|
219
220
|
text-decoration: underline;
|
|
220
221
|
cursor: pointer;
|
|
221
222
|
}
|
|
222
223
|
|
|
223
224
|
.placeLink:hover {
|
|
224
|
-
color: var(--booking-
|
|
225
|
+
color: var(--booking-emerald-700, #047857);
|
|
225
226
|
}
|
|
226
227
|
|
|
227
228
|
.tooltip {
|
|
@@ -280,7 +280,7 @@ export function ItineraryBox({
|
|
|
280
280
|
<button
|
|
281
281
|
type="button"
|
|
282
282
|
onClick={handlePickupLocationClick}
|
|
283
|
-
className=
|
|
283
|
+
className={styles.placeLink}
|
|
284
284
|
>
|
|
285
285
|
{getDisplayLabel(locationOnlyDisplay)}
|
|
286
286
|
</button>
|
|
@@ -312,7 +312,7 @@ export function ItineraryBox({
|
|
|
312
312
|
<button
|
|
313
313
|
type="button"
|
|
314
314
|
onClick={handlePickupLocationClick}
|
|
315
|
-
className=
|
|
315
|
+
className={styles.placeLink}
|
|
316
316
|
>
|
|
317
317
|
{getDisplayLabel(locationOnlyDisplay)}
|
|
318
318
|
</button>
|