@bigz-app/booking-widget 0.3.9 → 0.3.10

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.
@@ -2,6 +2,6 @@ interface PromoDialogProps {
2
2
  onClose: () => void;
3
3
  onCtaClick: () => void;
4
4
  }
5
- export declare function PromoDialog({ onClose, onCtaClick }: PromoDialogProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare function PromoDialog({ onClose, onCtaClick }: PromoDialogProps): import("react").ReactPortal | null;
6
6
  export {};
7
7
  //# sourceMappingURL=PromoDialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PromoDialog.d.ts","sourceRoot":"","sources":["../../src/components/PromoDialog.tsx"],"names":[],"mappings":"AAIA,UAAU,gBAAgB;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,gBAAgB,2CA6apE"}
1
+ {"version":3,"file":"PromoDialog.d.ts","sourceRoot":"","sources":["../../src/components/PromoDialog.tsx"],"names":[],"mappings":"AAKA,UAAU,gBAAgB;IACzB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,gBAAgB,sCAocpE"}
package/dist/index.cjs CHANGED
@@ -12248,8 +12248,21 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
12248
12248
  function PromoDialog({ onClose, onCtaClick }) {
12249
12249
  const [copied, setCopied] = React__default.useState(false);
12250
12250
  const [isVisible, setIsVisible] = React__default.useState(false);
12251
+ const [portalContainer, setPortalContainer] = React__default.useState(null);
12251
12252
  // Hardcoded Xmas surf school content
12252
12253
  const discountCode = "X-MAS";
12254
+ // Create portal container on mount to escape stacking context issues
12255
+ React__default.useEffect(() => {
12256
+ const container = document.createElement("div");
12257
+ container.id = "bigz-promo-dialog-portal";
12258
+ container.style.position = "relative";
12259
+ container.style.zIndex = "2147483647"; // Maximum z-index value
12260
+ document.body.appendChild(container);
12261
+ setPortalContainer(container);
12262
+ return () => {
12263
+ document.body.removeChild(container);
12264
+ };
12265
+ }, []);
12253
12266
  // Animate in on mount
12254
12267
  React__default.useEffect(() => {
12255
12268
  const timer = setTimeout(() => setIsVisible(true), 50);
@@ -12281,7 +12294,11 @@ function PromoDialog({ onClose, onCtaClick }) {
12281
12294
  setIsVisible(false);
12282
12295
  setTimeout(onCtaClick, 200);
12283
12296
  };
12284
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("style", { children: `
12297
+ // Don't render until portal container is ready
12298
+ if (!portalContainer) {
12299
+ return null;
12300
+ }
12301
+ const dialogContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("style", { children: `
12285
12302
  @keyframes promo-wave {
12286
12303
  0%, 100% { transform: translateX(0) translateY(0); }
12287
12304
  25% { transform: translateX(5px) translateY(-3px); }
@@ -12311,7 +12328,7 @@ function PromoDialog({ onClose, onCtaClick }) {
12311
12328
  inset: 0,
12312
12329
  backgroundColor: "rgba(0, 20, 40, 0.85)",
12313
12330
  backdropFilter: "blur(8px)",
12314
- zIndex: 9998,
12331
+ zIndex: 60,
12315
12332
  opacity: isVisible ? 1 : 0,
12316
12333
  transition: "opacity 300ms ease-out",
12317
12334
  } }), jsxRuntime.jsx("div", { style: {
@@ -12319,7 +12336,7 @@ function PromoDialog({ onClose, onCtaClick }) {
12319
12336
  top: "50%",
12320
12337
  left: "50%",
12321
12338
  transform: `translate(-50%, -50%) scale(${isVisible ? 1 : 0.9})`,
12322
- zIndex: 9999,
12339
+ zIndex: 61,
12323
12340
  width: "92%",
12324
12341
  maxWidth: "440px",
12325
12342
  opacity: isVisible ? 1 : 0,
@@ -12500,6 +12517,8 @@ function PromoDialog({ onClose, onCtaClick }) {
12500
12517
  fontSize: "12px",
12501
12518
  color: "rgba(255,255,255,0.6)",
12502
12519
  }, children: "G\u00FCltig f\u00FCr alle Buchungen bis 31. Dezember 2025" })] })] }) })] }));
12520
+ // Use portal to render at document body level, escaping any stacking context
12521
+ return ReactDOM.createPortal(dialogContent, portalContainer);
12503
12522
  }
12504
12523
 
12505
12524
  // Predefined themes & Style Provider have been moved to ../styles/StyleProvider.tsx