@ticketboothapp/booking 1.2.37 → 1.2.38

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": "@ticketboothapp/booking",
3
- "version": "1.2.37",
3
+ "version": "1.2.38",
4
4
  "private": false,
5
5
  "sideEffects": [
6
6
  "**/*.css",
@@ -1423,11 +1423,17 @@ export function BookingFlow({
1423
1423
  return null;
1424
1424
  };
1425
1425
 
1426
- const scrollParent = findScrollParent(el);
1427
- const scrollTarget =
1428
- useWindowScroll || !scrollParent
1429
- ? (typeof window !== 'undefined' ? window : null)
1430
- : scrollParent;
1426
+ // Host integrations (e.g. provider dashboard) may scroll inside an explicit content container
1427
+ // that isn't reliably discoverable from computed overflow on itinerary ancestors.
1428
+ const explicitScrollContainer = !useWindowScroll ? contentRef?.current ?? null : null;
1429
+ const detectedScrollParent = explicitScrollContainer ?? findScrollParent(el);
1430
+ const scrollTargets: EventTarget[] = [];
1431
+ if (!useWindowScroll && detectedScrollParent) {
1432
+ scrollTargets.push(detectedScrollParent);
1433
+ }
1434
+ if (typeof window !== 'undefined') {
1435
+ scrollTargets.push(window);
1436
+ }
1431
1437
 
1432
1438
  let ticking = false;
1433
1439
  const COOLDOWN_MS = 600; // After a state change, ignore reverse changes for this long (covers 0.25s collapse animation + layout settle)
@@ -1441,7 +1447,7 @@ export function BookingFlow({
1441
1447
  const wasSticky = isItineraryStickyRef.current;
1442
1448
 
1443
1449
  const containerTop =
1444
- scrollParent && !useWindowScroll ? scrollParent.getBoundingClientRect().top : 0;
1450
+ detectedScrollParent && !useWindowScroll ? detectedScrollParent.getBoundingClientRect().top : 0;
1445
1451
  const topInset = Math.max(0, flowUi?.itineraryStickyTopOffsetPx ?? 0);
1446
1452
  const stickLine = containerTop + topInset;
1447
1453
  const enterStickyThreshold = stickLine + 1;
@@ -1469,13 +1475,16 @@ export function BookingFlow({
1469
1475
  }
1470
1476
  };
1471
1477
 
1472
- if (scrollTarget) {
1473
- scrollTarget.addEventListener('scroll', handleScroll, { passive: true });
1474
- updateStickyState();
1475
- return () => scrollTarget.removeEventListener('scroll', handleScroll);
1476
- }
1477
- return undefined;
1478
- }, [selectedDate, selectedAvailability, useWindowScroll, flowUi?.itineraryStickyTopOffsetPx]); // Re-check when itinerary / scroll mode / host chrome changes
1478
+ scrollTargets.forEach((target) => {
1479
+ target.addEventListener('scroll', handleScroll, { passive: true });
1480
+ });
1481
+ updateStickyState();
1482
+ return () => {
1483
+ scrollTargets.forEach((target) => {
1484
+ target.removeEventListener('scroll', handleScroll);
1485
+ });
1486
+ };
1487
+ }, [selectedDate, selectedAvailability, useWindowScroll, flowUi?.itineraryStickyTopOffsetPx, contentRef]); // Re-check when itinerary / scroll mode / host chrome changes
1479
1488
 
1480
1489
  // Find the earliest availability date - memoize with a stable reference
1481
1490
  // Only recalculate if we don't have a cached value or if the new earliest is actually earlier
@@ -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-stone-400, #a8a29e);
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-stone-600, #57534e);
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="text-stone-400 hover:text-stone-600 underline cursor-pointer"
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="text-stone-400 hover:text-stone-600 underline cursor-pointer"
315
+ className={styles.placeLink}
316
316
  >
317
317
  {getDisplayLabel(locationOnlyDisplay)}
318
318
  </button>