@ticketboothapp/booking 1.2.64 → 1.2.66

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.
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import { createPortal } from 'react-dom';
4
3
  import { formatCurrencyAmount } from '../../lib/currency';
5
4
  import type { Currency } from './CurrencySwitcher';
6
5
 
@@ -17,8 +16,8 @@ interface AdminPaymentChoiceModalProps {
17
16
 
18
17
  /**
19
18
  * Provider / staff: pay now vs confirm without payment.
20
- * Uses the same overlay + card + Tailwind button pattern as {@link CheckoutModal}
21
- * so `.booking-flow-preflight button { background: transparent }` does not strip primary styles.
19
+ * Render inline (not portaled) so it remains interactive when embedded inside modal hosts
20
+ * that lock pointer events/inert siblings on `document.body`.
22
21
  */
23
22
  export function AdminPaymentChoiceModal({
24
23
  open,
@@ -34,10 +33,15 @@ export function AdminPaymentChoiceModal({
34
33
 
35
34
  const modal = (
36
35
  <div
37
- className="booking-flow-root booking-flow-preflight fixed inset-0 z-[10050] flex items-center justify-center p-4 bg-black/50"
36
+ className="booking-flow-root booking-flow-preflight fixed inset-0 z-[10050] flex items-center justify-center p-4 bg-black/50 pointer-events-auto"
38
37
  style={{ zIndex: 100_000 }}
38
+ role="dialog"
39
+ aria-modal="true"
39
40
  >
40
- <div className="bg-white rounded-xl shadow-xl max-w-lg w-full max-h-[90vh] overflow-hidden flex flex-col">
41
+ <div
42
+ className="bg-white rounded-xl shadow-xl max-w-lg w-full max-h-[90vh] overflow-hidden flex flex-col pointer-events-auto"
43
+ onClick={(e) => e.stopPropagation()}
44
+ >
41
45
  <div className="p-6 border-b border-stone-200 flex-shrink-0">
42
46
  <div className="flex justify-between items-start gap-3">
43
47
  <h3 className="text-lg font-semibold text-stone-900 pr-2">
@@ -94,5 +98,5 @@ export function AdminPaymentChoiceModal({
94
98
  </div>
95
99
  </div>
96
100
  );
97
- return typeof document !== 'undefined' ? createPortal(modal, document.body) : null;
101
+ return modal;
98
102
  }
@@ -15,7 +15,7 @@ export type {
15
15
 
16
16
  /**
17
17
  * Routes to {@link NewBookingFlow}, {@link ChangeBookingFlow}, or {@link AdminChangeBookingFlow}
18
- * — duplicated implementations so each flow can be refactored without coupling (no shared runtime core).
18
+ * — duplicated implementations so each flow can evolve independently.
19
19
  */
20
20
  export function BookingFlow(props: BookingFlowProps) {
21
21
  if (props.mode === 'change') {