@ticketboothapp/booking 0.1.10 → 0.1.12

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.
Files changed (252) hide show
  1. package/package.json +1 -1
  2. package/src/colours.css +23 -0
  3. package/src/components/BookingDetails.module.css +1591 -0
  4. package/src/components/BookingDetails.tsx +2072 -354
  5. package/src/components/BookingWidget.tsx +28 -248
  6. package/src/components/JobApplicationDialog.module.css +440 -0
  7. package/src/components/JobApplicationDialog.tsx +620 -0
  8. package/src/components/ManageBookingView.tsx +344 -34
  9. package/src/components/PhoneInputWithCountry.module.css +131 -0
  10. package/src/components/PhoneInputWithCountry.tsx +44 -0
  11. package/src/components/PickupLocationDialog.module.css +360 -0
  12. package/src/components/PickupLocationDialog.tsx +357 -0
  13. package/src/components/PickupLocationMap.tsx +110 -0
  14. package/src/components/PostBookingDependentAddOnUpsell.module.css +174 -0
  15. package/src/components/PostBookingDependentAddOnUpsell.tsx +407 -0
  16. package/src/components/accordion.css +27 -0
  17. package/src/components/accordion.tsx +29 -0
  18. package/src/components/analytics/AnalyticsConsentRestore.tsx +19 -0
  19. package/src/components/analytics/AnalyticsScripts.tsx +106 -0
  20. package/src/components/analytics/CookieConsentBanner.css +86 -0
  21. package/src/components/analytics/CookieConsentBanner.tsx +102 -0
  22. package/src/components/booking/AddOnsSection.module.css +10 -0
  23. package/src/components/booking/AddOnsSection.tsx +184 -0
  24. package/src/components/booking/AdminPaymentChoiceModal.tsx +98 -0
  25. package/src/components/booking/BookingDialog.module.css +643 -0
  26. package/src/components/booking/BookingDialog.tsx +356 -0
  27. package/src/components/booking/BookingFlow.tsx +4385 -0
  28. package/src/components/booking/BookingFlowCollage.module.css +148 -0
  29. package/src/components/booking/BookingFlowCollage.tsx +184 -0
  30. package/src/components/booking/BookingFlowPlaceholder.module.css +27 -0
  31. package/src/components/booking/BookingFlowPlaceholder.tsx +25 -0
  32. package/src/components/booking/BookingFlowPreview.tsx +51 -0
  33. package/src/components/booking/BookingProductGrid.module.css +359 -0
  34. package/src/components/booking/BookingProductGrid.tsx +497 -0
  35. package/src/components/booking/Calendar.module.css +616 -0
  36. package/src/components/{Calendar.tsx → booking/Calendar.tsx} +464 -247
  37. package/src/components/booking/CancellationPolicySelector.module.css +124 -0
  38. package/src/components/booking/CancellationPolicySelector.tsx +142 -0
  39. package/src/components/booking/ChangeBookingDialog.tsx +562 -0
  40. package/src/components/booking/CheckoutForm.module.css +244 -0
  41. package/src/components/booking/CheckoutForm.tsx +364 -0
  42. package/src/components/{CheckoutModal.tsx → booking/CheckoutModal.tsx} +176 -19
  43. package/src/components/booking/DapFlowCollage.tsx +88 -0
  44. package/src/components/booking/DapTourDescription.tsx +35 -0
  45. package/src/components/booking/DependentAddOnBookingDialog.tsx +1350 -0
  46. package/src/components/booking/DependentAddOnPaymentForm.tsx +124 -0
  47. package/src/components/booking/InfoTooltip.tsx +108 -0
  48. package/src/components/booking/ItineraryBox.module.css +258 -0
  49. package/src/components/booking/ItineraryBox.tsx +550 -0
  50. package/src/components/{ItineraryBuilder.tsx → booking/ItineraryBuilder.tsx} +1 -2
  51. package/src/components/booking/ItineraryPlaceholder.module.css +45 -0
  52. package/src/components/booking/ItineraryPlaceholder.tsx +26 -0
  53. package/src/components/{MealDrinkAddOnSelector.tsx → booking/MealDrinkAddOnSelector.tsx} +21 -13
  54. package/src/components/booking/PickupLocationSelector.module.css +124 -0
  55. package/src/components/{PickupLocationSelector.tsx → booking/PickupLocationSelector.tsx} +315 -290
  56. package/src/components/booking/PickupTimeSelector.module.css +134 -0
  57. package/src/components/booking/PickupTimeSelector.tsx +112 -0
  58. package/src/components/{PriceBreakdown.tsx → booking/PriceBreakdown.tsx} +3 -3
  59. package/src/components/{PriceSummary.tsx → booking/PriceSummary.tsx} +51 -28
  60. package/src/components/booking/PrivateShuttleBookingFlow.module.css +357 -0
  61. package/src/components/booking/PrivateShuttleBookingFlow.tsx +2662 -0
  62. package/src/components/booking/PromoCodeInput.module.css +166 -0
  63. package/src/components/booking/PromoCodeInput.tsx +99 -0
  64. package/src/components/booking/ReturnTimeSelector.module.css +173 -0
  65. package/src/components/booking/ReturnTimeSelector.tsx +145 -0
  66. package/src/components/{TermsAcceptance.tsx → booking/TermsAcceptance.tsx} +9 -8
  67. package/src/components/booking/TicketSelector.module.css +164 -0
  68. package/src/components/booking/TicketSelector.tsx +199 -0
  69. package/src/components/booking/TourDescription.module.css +304 -0
  70. package/src/components/booking/TourDescription.tsx +273 -0
  71. package/src/components/booking/booking-flow-ui.ts +15 -1
  72. package/src/components/booking/booking-flow.css +944 -0
  73. package/src/components/bottom-sheet.module.css +78 -0
  74. package/src/components/bottom-sheet.tsx +60 -0
  75. package/src/components/breadcrumb.module.css +40 -0
  76. package/src/components/breadcrumb.tsx +36 -0
  77. package/src/components/button.css +245 -0
  78. package/src/components/button.tsx +152 -0
  79. package/src/components/client-bottom-sheet.tsx +14 -0
  80. package/src/components/colorable-svg.tsx +29 -0
  81. package/src/components/conditional-footer.tsx +27 -0
  82. package/src/components/contact-us.module.css +147 -0
  83. package/src/components/contact-us.tsx +49 -0
  84. package/src/components/email-signup.css +151 -0
  85. package/src/components/email-signup.tsx +63 -0
  86. package/src/components/faq-wrapper.module.css +47 -0
  87. package/src/components/faq-wrapper.tsx +15 -0
  88. package/src/components/footer.css +187 -0
  89. package/src/components/footer.tsx +143 -0
  90. package/src/components/global-simple-modal.tsx +33 -0
  91. package/src/components/google-review-summary.module.css +77 -0
  92. package/src/components/google-review-summary.tsx +50 -0
  93. package/src/components/hero-image.css +13 -0
  94. package/src/components/hero-image.tsx +44 -0
  95. package/src/components/image.css +29 -0
  96. package/src/components/image.tsx +113 -0
  97. package/src/components/language-aware-link.tsx +72 -0
  98. package/src/components/language-switcher.module.css +124 -0
  99. package/src/components/language-switcher.tsx +75 -0
  100. package/src/components/map-section.css +59 -0
  101. package/src/components/map-section.tsx +63 -0
  102. package/src/components/navbar.module.css +152 -0
  103. package/src/components/navbar.tsx +125 -0
  104. package/src/components/parallax-provider.tsx +11 -0
  105. package/src/components/partner/PartnerBookingPage.module.css +130 -0
  106. package/src/components/partner/PartnerBookingPage.tsx +390 -0
  107. package/src/components/partner/PartnerBookingPageWithBrowserMetadata.tsx +19 -35
  108. package/src/components/product-tag.module.css +30 -0
  109. package/src/components/product-tag.tsx +34 -0
  110. package/src/components/product-theme-pages/best-option.module.css +70 -0
  111. package/src/components/product-theme-pages/best-option.tsx +35 -0
  112. package/src/components/product-theme-pages/extended-tour-options.module.css +22 -0
  113. package/src/components/product-theme-pages/extended-tour-options.tsx +11 -0
  114. package/src/components/product-theme-pages/image-modal.tsx +248 -0
  115. package/src/components/product-theme-pages/photo-gallery.module.css +200 -0
  116. package/src/components/product-theme-pages/photo-gallery.tsx +90 -0
  117. package/src/components/product-theme-pages/product-theme-page-layout.module.css +13 -0
  118. package/src/components/product-theme-pages/product-theme-page-layout.tsx +67 -0
  119. package/src/components/product-theme-pages/top-of-fold.module.css +179 -0
  120. package/src/components/product-theme-pages/top-of-fold.tsx +80 -0
  121. package/src/components/product-tile/image-only-product-tile-desktop.module.css +106 -0
  122. package/src/components/product-tile/image-only-product-tile-desktop.tsx +56 -0
  123. package/src/components/product-tile/image-only-product-tile-mobile.module.css +122 -0
  124. package/src/components/product-tile/image-only-product-tile-mobile.tsx +89 -0
  125. package/src/components/product-tile/image-only-product-tile.tsx +44 -0
  126. package/src/components/product-tile/product-tile-card.module.css +84 -0
  127. package/src/components/product-tile/product-tile-card.tsx +61 -0
  128. package/src/components/review-highlights-section.css +85 -0
  129. package/src/components/review-highlights-section.tsx +127 -0
  130. package/src/components/season-closure-overlay.module.css +99 -0
  131. package/src/components/season-closure-overlay.tsx +98 -0
  132. package/src/components/simple-modal.tsx +69 -0
  133. package/src/components/simple-top-of-fold.module.css +76 -0
  134. package/src/components/simple-top-of-fold.tsx +34 -0
  135. package/src/components/spacer.css +41 -0
  136. package/src/components/spacer.tsx +23 -0
  137. package/src/components/star-rating.module.css +74 -0
  138. package/src/components/star-rating.tsx +48 -0
  139. package/src/components/terms/TermsContent.tsx +178 -0
  140. package/src/components/title-subtitle.module.css +10 -0
  141. package/src/components/title-subtitle.tsx +30 -0
  142. package/src/components/translatable-reviews.tsx +75 -0
  143. package/src/components/value-pill.module.css +59 -0
  144. package/src/components/value-pill.tsx +46 -0
  145. package/src/components/value-props.css +185 -0
  146. package/src/components/value-props.tsx +88 -0
  147. package/src/constants/booking-guide-quiz.ts +64 -0
  148. package/src/constants/contact-info.ts +2 -0
  149. package/src/constants/faq.ts +44 -0
  150. package/src/constants/images.ts +556 -0
  151. package/src/constants/json-ld/faq-json-ld.tsx +170 -0
  152. package/src/constants/json-ld/homepage-json-ld.tsx +138 -0
  153. package/src/constants/json-ld/job-posting-json-ld.tsx +92 -0
  154. package/src/constants/json-ld/organization-json-ld.tsx +62 -0
  155. package/src/constants/json-ld/page-json-ld.tsx +6 -0
  156. package/src/constants/json-ld/product-json-ld.tsx +154 -0
  157. package/src/constants/json-ld/review-json-ld.tsx +377 -0
  158. package/src/constants/navigation-links/footer-links.ts +48 -0
  159. package/src/constants/navigation-links/nav-bar-links.ts +41 -0
  160. package/src/constants/navigation-links/navigation-link.ts +6 -0
  161. package/src/constants/pill-values.ts +210 -0
  162. package/src/constants/products.ts +155 -0
  163. package/src/constants/quiz-recommendations.ts +506 -0
  164. package/src/constants/reviews.ts +75 -0
  165. package/src/constants/staff.ts +197 -0
  166. package/src/constants/value-props.ts +58 -0
  167. package/src/data/dap-descriptions/session-couples-families-friends.en.json +61 -0
  168. package/src/data/dap-descriptions/session-elopements.en.json +60 -0
  169. package/src/data/dap-descriptions/session-proposals.en.json +60 -0
  170. package/src/data/product-descriptions/afternoon-delight.en.json +35 -0
  171. package/src/data/product-descriptions/emerald-lake-escape.en.json +68 -0
  172. package/src/data/product-descriptions/lake-louise-adventure.en.json +74 -0
  173. package/src/data/product-descriptions/moraine-lake-adventure.en.json +78 -0
  174. package/src/data/product-descriptions/moraine-lake-sunrise-lake-louise-golden-hour.en.json +65 -0
  175. package/src/data/product-descriptions/moraine-lake-sunrise.en.json +64 -0
  176. package/src/data/product-descriptions/private-tour.en.json +80 -0
  177. package/src/data/product-descriptions/two-lakes-combo.en.json +65 -0
  178. package/src/data/products-config.json +101 -0
  179. package/src/hooks/use-bottom-sheet.tsx +15 -0
  180. package/src/hooks/use-simple-modal.tsx +27 -0
  181. package/src/hooks/useBookingSourceMetadataFromLocation.ts +21 -0
  182. package/src/hooks/useEmailSubscription.tsx +103 -0
  183. package/src/hooks/useEmbeddedInIframe.ts +16 -0
  184. package/src/hooks/useIsBookingLaunchLive.ts +49 -0
  185. package/src/hooks/useQuiz.tsx +210 -0
  186. package/src/index.ts +27 -2
  187. package/src/lib/analytics.ts +197 -0
  188. package/src/lib/booking/booking-source.ts +20 -2
  189. package/src/lib/{checkout-breakdown.ts → booking/checkout-breakdown.ts} +1 -1
  190. package/src/lib/booking/correlation-id.ts +46 -0
  191. package/src/lib/{i18n → booking/i18n}/messages/en.json +48 -4
  192. package/src/lib/{i18n → booking/i18n}/messages/fr.json +48 -4
  193. package/src/lib/booking/itinerary-display.ts +36 -0
  194. package/src/lib/{itinerary-labels.ts → booking/itinerary-labels.ts} +1 -1
  195. package/src/lib/{location-calculations.ts → booking/location-calculations.ts} +4 -4
  196. package/src/lib/{location-utils.ts → booking/location-utils.ts} +26 -0
  197. package/src/lib/{map-utils.ts → booking/map-utils.ts} +3 -3
  198. package/src/lib/booking/normalize-booking-product-id.ts +7 -0
  199. package/src/lib/{pickup-location-types.ts → booking/pickup-location-types.ts} +2 -2
  200. package/src/lib/{pricing.ts → booking/pricing.ts} +2 -2
  201. package/src/lib/booking/product-option-id.ts +35 -0
  202. package/src/lib/booking/source-metadata.ts +72 -7
  203. package/src/lib/booking/sunday-week.ts +14 -0
  204. package/src/lib/booking/trace-context.ts +62 -0
  205. package/src/lib/booking-api.ts +1793 -0
  206. package/src/lib/{constants.ts → booking-constants.ts} +11 -5
  207. package/src/lib/booking-types.ts +36 -0
  208. package/src/lib/currency.ts +38 -45
  209. package/src/lib/dap-descriptions.ts +50 -0
  210. package/src/lib/dap-itinerary-preview.ts +315 -0
  211. package/src/lib/dependent-add-on-api.ts +434 -0
  212. package/src/lib/env.ts +89 -5
  213. package/src/lib/firebase.ts +20 -0
  214. package/src/lib/job-application-api.ts +83 -0
  215. package/src/lib/manage-booking-embed-print.ts +16 -0
  216. package/src/lib/manage-booking-post-checkout.ts +68 -0
  217. package/src/lib/photo-dap-config.ts +228 -0
  218. package/src/lib/pickup/map-utils.ts +56 -0
  219. package/src/lib/pickup/marker-icons.ts +19 -0
  220. package/src/lib/product-descriptions.ts +66 -0
  221. package/src/lib/products-config.ts +73 -0
  222. package/src/providers/booking-dialog-provider.tsx +107 -38
  223. package/src/providers/bottom-sheet-provider.tsx +40 -0
  224. package/src/providers/dependent-add-on-dialog-provider.tsx +105 -0
  225. package/src/radius.css +5 -0
  226. package/src/spacing.css +7 -0
  227. package/src/strings/en.json +1774 -0
  228. package/src/strings/es.json +1573 -0
  229. package/src/strings/fr.json +1573 -0
  230. package/src/strings/index.js +23 -0
  231. package/src/text-style.css +97 -0
  232. package/src/types/fareharbor.d.ts +12 -0
  233. package/src/types/quiz.ts +59 -0
  234. package/src/utils/currency-converter.ts +101 -0
  235. package/src/components/BookingFlow.tsx +0 -2952
  236. package/src/components/LanguageSwitcher.tsx +0 -30
  237. package/src/components/PrivateShuttleBookingFlow.tsx +0 -2290
  238. package/src/components/ProductList.tsx +0 -78
  239. package/src/components/WhatsAppPhoneInput.tsx +0 -224
  240. package/src/components/index.ts +0 -31
  241. package/src/lib/api.ts +0 -801
  242. package/src/lib/booking-api-auth.ts +0 -9
  243. package/src/lib/checkout-breakdown.test.ts +0 -70
  244. package/src/types/google-maps.d.ts +0 -2
  245. /package/src/components/{CurrencySwitcher.tsx → booking/CurrencySwitcher.tsx} +0 -0
  246. /package/src/components/{ErrorBoundary.tsx → booking/ErrorBoundary.tsx} +0 -0
  247. /package/src/lib/{i18n → booking/i18n}/config.ts +0 -0
  248. /package/src/lib/{i18n → booking/i18n}/index.tsx +0 -0
  249. /package/src/lib/{marker-icons.ts → booking/marker-icons.ts} +0 -0
  250. /package/src/lib/{places-api.ts → booking/places-api.ts} +0 -0
  251. /package/src/lib/{theme.ts → booking/theme.ts} +0 -0
  252. /package/src/lib/{utils.ts → booking/utils.ts} +0 -0
@@ -0,0 +1,78 @@
1
+ .container {
2
+ position: fixed;
3
+ top: 0;
4
+ left: 0;
5
+ right: 0;
6
+ bottom: 0;
7
+ z-index: 9999;
8
+ display: flex;
9
+ flex-direction: column;
10
+ pointer-events: none;
11
+ }
12
+
13
+ .overlay {
14
+ position: absolute;
15
+ top: 0;
16
+ left: 0;
17
+ right: 0;
18
+ bottom: 0;
19
+ background: var(--accent-orange-70);
20
+ pointer-events: auto;
21
+ backdrop-filter: blur(4px);
22
+ }
23
+
24
+ .overlayVisible {
25
+ opacity: 1;
26
+ }
27
+
28
+ .sheet {
29
+ position: absolute;
30
+ left: 0;
31
+ right: 0;
32
+ bottom: 0;
33
+ border-radius: 24px 24px 0 0;
34
+ pointer-events: auto;
35
+ height: 100vh;
36
+ display: flex;
37
+ flex-direction: column;
38
+ overflow: hidden;
39
+ margin: 0;
40
+ padding: 0;
41
+ }
42
+
43
+ .sheetOpen {
44
+ transform: translateY(0);
45
+ }
46
+
47
+ .header {
48
+ position: sticky;
49
+ top: 0;
50
+ background: transparent;
51
+ backdrop-filter: blur(8px);
52
+ display: flex;
53
+ justify-content: center;
54
+ z-index: 1;
55
+ padding: 1rem 0;
56
+ }
57
+
58
+ .closeButton {
59
+ width: 40px;
60
+ height: 40px;
61
+ border-radius: 50%;
62
+ border: none;
63
+ background: var(--accent-orange);
64
+ color: white;
65
+ font-size: 24px;
66
+ cursor: pointer;
67
+ display: flex;
68
+ align-items: center;
69
+ justify-content: center;
70
+ }
71
+
72
+ .content {
73
+ flex: 1;
74
+ padding: 1rem 1rem 0 1rem;
75
+ background: var(--light-orange-background);
76
+ border-radius: 24px 24px 0 0;
77
+ overflow-y: auto;
78
+ }
@@ -0,0 +1,60 @@
1
+ 'use client';
2
+
3
+ import { useEffect, useState } from 'react';
4
+ import styles from './bottom-sheet.module.css';
5
+ import { motion, animate } from "motion/react";
6
+
7
+ interface BottomSheetProps {
8
+ isOpen: boolean;
9
+ onClose: () => void;
10
+ children: React.ReactNode;
11
+ }
12
+
13
+ export default function BottomSheet({ isOpen, onClose, children }: BottomSheetProps) {
14
+ const [isAnimating, setIsAnimating] = useState(isOpen);
15
+
16
+ useEffect(() => {
17
+ if (!isOpen) return;
18
+
19
+ setIsAnimating(true);
20
+ document.body.style.overflow = 'hidden';
21
+ animate(".bottom-sheet", { y: ["100%", "0%"] }, { duration: 0.5 });
22
+ animate(".overlay", { opacity: [0, 1] }, { duration: 0.3 });
23
+
24
+ return () => {
25
+ document.body.style.overflow = 'unset';
26
+ };
27
+ }, [isOpen]);
28
+
29
+ useEffect(() => {
30
+ if (!isOpen && isAnimating) {
31
+ animate(".bottom-sheet", { y: ["0%", "100%"] }, { duration: 0.5 });
32
+ animate(".overlay", { opacity: [1, 0] }, { duration: 0.3 });
33
+ const timer = setTimeout(() => setIsAnimating(false), 500);
34
+ return () => clearTimeout(timer);
35
+ }
36
+ }, [isOpen, isAnimating]);
37
+
38
+ if (!isOpen && !isAnimating) return null;
39
+
40
+ return (
41
+ <div className={styles.container}>
42
+ <motion.div
43
+ className={`${styles.overlay} overlay`}
44
+ onClick={onClose}
45
+ />
46
+ <motion.div
47
+ className={`${styles.sheet} bottom-sheet`}
48
+ >
49
+ <div className={styles.header}>
50
+ <button className={styles.closeButton} onClick={onClose}>
51
+ <span>×</span>
52
+ </button>
53
+ </div>
54
+ <div className={styles.content}>
55
+ {children}
56
+ </div>
57
+ </motion.div>
58
+ </div>
59
+ );
60
+ }
@@ -0,0 +1,40 @@
1
+ .breadcrumb {
2
+ padding: 1rem 0;
3
+ margin: 0 auto;
4
+ max-width: var(--max-content-width);
5
+ }
6
+
7
+ .breadcrumb ol {
8
+ list-style: none;
9
+ margin: 0;
10
+ padding: 0;
11
+ display: flex;
12
+ flex-wrap: wrap;
13
+ gap: 0.25rem;
14
+ }
15
+
16
+ .breadcrumb li {
17
+ display: flex;
18
+ align-items: center;
19
+ color: var(--primary-text);
20
+ }
21
+
22
+ .breadcrumb li:not(:last-child)::after {
23
+ content: '/';
24
+ margin: 0 0.25rem;
25
+ color: var(--secondary-text);
26
+ }
27
+
28
+ .breadcrumb a {
29
+ color: var(--primary-text);
30
+ text-decoration: none;
31
+ transition: color 0.2s ease;
32
+ }
33
+
34
+ .breadcrumb a:hover {
35
+ color: var(--accent-turquoise);
36
+ }
37
+
38
+ .breadcrumb span {
39
+ color: var(--grey-text);
40
+ }
@@ -0,0 +1,36 @@
1
+ 'use client';
2
+
3
+ import Link from 'next/link';
4
+ import { usePathname } from 'next/navigation';
5
+ import styles from './breadcrumb.module.css';
6
+
7
+ export default function Breadcrumb() {
8
+ const pathname = usePathname();
9
+ const paths = pathname.split('/').filter(Boolean);
10
+
11
+ return (
12
+ <nav className={styles.breadcrumb} aria-label="Breadcrumb">
13
+ <ol>
14
+ <li>
15
+ <Link href="/">Home</Link>
16
+ </li>
17
+ {paths.map((path, index) => {
18
+ const href = `/${paths.slice(0, index + 1).join('/')}`;
19
+ const isLast = index === paths.length - 1;
20
+
21
+ return (
22
+ <li key={href}>
23
+ {isLast ? (
24
+ <span>{path.replace(/-/g, ' ').replace(/\b\w/g, l => l.toUpperCase())}</span>
25
+ ) : (
26
+ <Link href={href}>
27
+ {path.replace(/-/g, ' ').replace(/\b\w/g, l => l.toUpperCase())}
28
+ </Link>
29
+ )}
30
+ </li>
31
+ );
32
+ })}
33
+ </ol>
34
+ </nav>
35
+ );
36
+ }
@@ -0,0 +1,245 @@
1
+ .button {
2
+ padding: 8px 16px;
3
+ border-radius: 24px;
4
+ border: none;
5
+ font-size: 1rem;
6
+ cursor: pointer;
7
+ transition: all 0.2s ease-in-out;
8
+ font-weight: 500;
9
+ position: relative;
10
+ overflow: hidden;
11
+ z-index: 1;
12
+ font-family: 'Poppins', sans-serif;
13
+ font-weight: 700;
14
+ text-transform: lowercase;
15
+ display: inline-block;
16
+ }
17
+
18
+ .button-primary {
19
+ background-color: var(--accent-orange);
20
+ color: var(--accent-white);
21
+ }
22
+
23
+ .button-secondary {
24
+ background-color: var(--accent-white);
25
+ color: var(--accent-orange);
26
+ }
27
+
28
+ .button-disabled {
29
+ background-color: var(--grey-text);
30
+ color: var(--accent-white);
31
+ cursor: not-allowed;
32
+ }
33
+
34
+ .button-disabled:hover {
35
+ background-color: var(--grey-text);
36
+ color: var(--accent-white) !important;
37
+ }
38
+
39
+ .button-outline {
40
+ background-color: transparent;
41
+ color: var(--accent-white);
42
+ border: 2px solid var(--accent-white);
43
+ box-sizing: border-box;
44
+ padding: 6px 14px;
45
+ }
46
+
47
+ .button-large {
48
+ font-size: 1.2rem;
49
+ padding: 1rem 2rem;
50
+ border-radius: 40px;
51
+ }
52
+
53
+ /* Desktop hover */
54
+ @media (min-width: 1024px) {
55
+ .button::before {
56
+ content: '';
57
+ position: absolute;
58
+ top: 0;
59
+ left: -100%;
60
+ width: 100%;
61
+ height: 100%;
62
+ border-radius: 24px;
63
+ transition: all 0.3s ease-in-out;
64
+ z-index: -1;
65
+ }
66
+
67
+ .button-primary:hover::before {
68
+ left: 0;
69
+ }
70
+
71
+ .button-primary.hover-white::before {
72
+ background-color: var(--accent-white);
73
+ }
74
+
75
+ .button-primary.hover-turquoise::before {
76
+ background-color: var(--accent-turquoise);
77
+ }
78
+
79
+ .button-primary.hover-orange::before {
80
+ background-color: var(--accent-orange);
81
+ }
82
+
83
+ .button-primary.hover-orange:hover {
84
+ color: var(--accent-white);
85
+ }
86
+
87
+ .button-primary.hover-turquoise:hover {
88
+ color: var(--accent-white);
89
+ }
90
+
91
+ .button-secondary:hover::before {
92
+ left: 0;
93
+ }
94
+
95
+ .button-secondary::before {
96
+ background-color: var(--accent-turquoise);
97
+ }
98
+
99
+ .button-secondary.hover-orange::before {
100
+ background-color: var(--accent-orange);
101
+ }
102
+
103
+ .button-secondary.hover-orange:hover {
104
+ color: var(--accent-white) !important;
105
+ }
106
+
107
+ .button-secondary:hover {
108
+ color: var(--accent-white) !important;
109
+ }
110
+
111
+ .button-outline::before {
112
+ background-color: var(--accent-white);
113
+ }
114
+
115
+ .button-outline:hover::before {
116
+ left: 0;
117
+ }
118
+
119
+ .button:hover {
120
+ color: var(--accent-orange);
121
+ }
122
+ }
123
+
124
+ /* Focus state for accessibility */
125
+ .button:focus {
126
+ outline: 2px solid var(--accent-orange);
127
+ outline-offset: 2px;
128
+ }
129
+
130
+ .button-menu {
131
+ background-color: var(--accent-orange);
132
+ border-radius: 50px;
133
+ padding: 8px 20px;
134
+ display: flex;
135
+ align-items: center;
136
+ gap: 8px;
137
+ }
138
+
139
+ .button-menu .menu-text {
140
+ color: white;
141
+ font-weight: 400;
142
+ text-transform: lowercase;
143
+ font-size: 0.8rem;
144
+ padding: 0.2rem;
145
+ }
146
+
147
+ .button-menu .menu-icon {
148
+ display: flex;
149
+ flex-direction: column;
150
+ gap: 3px;
151
+ position: relative;
152
+ width: 12px;
153
+ height: 12px;
154
+ transition: transform 0.3s ease;
155
+ }
156
+
157
+ .button-menu .menu-icon span {
158
+ display: block;
159
+ width: 12px;
160
+ height: 1.5px;
161
+ background-color: white;
162
+ border-radius: 2px;
163
+ position: absolute;
164
+ transition: transform 0.3s ease, opacity 0.3s ease;
165
+ }
166
+
167
+ /* Position the lines */
168
+ .button-menu .menu-icon span:nth-child(1) {
169
+ top: 0;
170
+ }
171
+
172
+ .button-menu .menu-icon span:nth-child(2) {
173
+ top: 50%;
174
+ transform: translateY(-50%);
175
+ }
176
+
177
+ .button-menu .menu-icon span:nth-child(3) {
178
+ bottom: 0;
179
+ }
180
+
181
+ /* X animation when open with full rotation */
182
+ .button-menu.open .menu-icon {
183
+ transform: rotate(360deg);
184
+ }
185
+
186
+ .button-menu.open .menu-icon span:nth-child(1) {
187
+ top: 50%;
188
+ transform: translateY(-50%) rotate(45deg);
189
+ }
190
+
191
+ .button-menu.open .menu-icon span:nth-child(2) {
192
+ opacity: 0;
193
+ }
194
+
195
+ .button-menu.open .menu-icon span:nth-child(3) {
196
+ top: 50%;
197
+ transform: translateY(-50%) rotate(-45deg);
198
+ }
199
+
200
+ /* Override booking-flow-preflight so Button component styles apply inside the booking flow */
201
+ .booking-flow-preflight button.button {
202
+ padding: 8px 16px;
203
+ border-radius: 24px;
204
+ border: none;
205
+ font-size: 1rem;
206
+ cursor: pointer;
207
+ transition: all 0.2s ease-in-out;
208
+ font-weight: 700;
209
+ position: relative;
210
+ overflow: hidden;
211
+ z-index: 1;
212
+ font-family: 'Poppins', sans-serif;
213
+ text-transform: lowercase;
214
+ display: inline-block;
215
+ }
216
+
217
+ .booking-flow-preflight button.button-primary {
218
+ background-color: var(--accent-orange);
219
+ color: var(--accent-white);
220
+ }
221
+
222
+ .booking-flow-preflight button.button-secondary {
223
+ background-color: var(--accent-white);
224
+ color: var(--accent-orange);
225
+ }
226
+
227
+ .booking-flow-preflight button.button-disabled {
228
+ background-color: var(--grey-text);
229
+ color: var(--accent-white);
230
+ cursor: not-allowed;
231
+ }
232
+
233
+ .booking-flow-preflight button.button-outline {
234
+ background-color: transparent;
235
+ color: var(--accent-white);
236
+ border: 2px solid var(--accent-white);
237
+ box-sizing: border-box;
238
+ padding: 6px 14px;
239
+ }
240
+
241
+ .booking-flow-preflight button.button-large {
242
+ font-size: 1.2rem;
243
+ padding: 1rem 2rem;
244
+ border-radius: 40px;
245
+ }
@@ -0,0 +1,152 @@
1
+ "use client";
2
+
3
+ import './button.css';
4
+ import Link from 'next/link';
5
+ import { OPEN_BOOKING_FOR_PRODUCT } from '@/providers/booking-dialog-provider';
6
+
7
+ enum ButtonHoverColor {
8
+ White = 'white',
9
+ Turquoise = 'turquoise',
10
+ Orange = 'orange'
11
+ }
12
+
13
+ enum PresetButtonActions {
14
+ BOOK_ALL = 'BOOK_ALL',
15
+ BOOK_MORAINE_LAKE_SUNRISE = 'BOOK_MORAINE_LAKE_SUNRISE',
16
+ BOOK_MORAINE_LAKE_SUNRISE_LAKE_LOUISE_GOLDEN_HOUR = 'BOOK_MORAINE_LAKE_SUNRISE_LAKE_LOUISE_GOLDEN_HOUR',
17
+ BOOK_TWO_LAKES_COMBO = 'BOOK_TWO_LAKES_COMBO',
18
+ BOOK_MORAINE_LAKE_ADVENTURE = 'BOOK_MORAINE_LAKE_ADVENTURE',
19
+ BOOK_LAKE_LOUISE_ADVENTURE = 'BOOK_LAKE_LOUISE_ADVENTURE',
20
+ BOOK_EMERALD_LAKE_ESCAPE = 'BOOK_EMERALD_LAKE_ESCAPE',
21
+ BOOK_PRIVATE_TOUR = 'BOOK_PRIVATE_TOUR',
22
+ BOOK_THEME_SUNRISE = 'BOOK_THEME_SUNRISE',
23
+ BOOK_THEME_MORAINE_LAKE = 'BOOK_THEME_MORAINE_LAKE',
24
+ BOOK_THEME_LAKE_LOUISE = 'BOOK_THEME_LAKE_LOUISE',
25
+ }
26
+
27
+ /** Maps preset booking actions to product slugs. null = open product grid. */
28
+ const PRESET_ACTION_TO_PRODUCT_SLUG: Partial<Record<PresetButtonActions, string | null>> = {
29
+ [PresetButtonActions.BOOK_ALL]: null,
30
+ [PresetButtonActions.BOOK_MORAINE_LAKE_SUNRISE]: 'moraine-lake-sunrise',
31
+ [PresetButtonActions.BOOK_MORAINE_LAKE_SUNRISE_LAKE_LOUISE_GOLDEN_HOUR]: 'moraine-lake-sunrise-lake-louise-golden-hour',
32
+ [PresetButtonActions.BOOK_TWO_LAKES_COMBO]: 'two-lakes-combo',
33
+ [PresetButtonActions.BOOK_MORAINE_LAKE_ADVENTURE]: 'moraine-lake-adventure',
34
+ [PresetButtonActions.BOOK_LAKE_LOUISE_ADVENTURE]: 'lake-louise-adventure',
35
+ [PresetButtonActions.BOOK_EMERALD_LAKE_ESCAPE]: 'emerald-lake-escape',
36
+ [PresetButtonActions.BOOK_PRIVATE_TOUR]: 'private-tour',
37
+ [PresetButtonActions.BOOK_THEME_SUNRISE]: 'moraine-lake-sunrise-lake-louise-golden-hour',
38
+ [PresetButtonActions.BOOK_THEME_MORAINE_LAKE]: 'moraine-lake-sunrise-lake-louise-golden-hour',
39
+ [PresetButtonActions.BOOK_THEME_LAKE_LOUISE]: 'lake-louise-adventure',
40
+ };
41
+
42
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
43
+ children: React.ReactNode;
44
+ variant?: 'primary' | 'secondary' | 'outline' | 'disabled';
45
+ hoverColor?: ButtonHoverColor;
46
+ isLarge?: boolean;
47
+ action?: ButtonAction;
48
+ shouldOpenInNewTab?: boolean;
49
+ }
50
+
51
+ type ButtonAction = PresetButtonActions | string;
52
+
53
+ export default function Button({
54
+ children,
55
+ variant = 'primary',
56
+ className,
57
+ hoverColor = ButtonHoverColor.White,
58
+ isLarge = false,
59
+ action = '',
60
+ shouldOpenInNewTab = false,
61
+ ...props
62
+ }: ButtonProps) {
63
+ const finalAction = getFinalAction(action);
64
+ const productSlug = getProductSlugForAction(action);
65
+ const isBookingAction = isModalActionType(action);
66
+
67
+ const handleClick = () => {
68
+ if (isBookingAction) {
69
+ if (productSlug) {
70
+ window.dispatchEvent(new CustomEvent(OPEN_BOOKING_FOR_PRODUCT, { detail: { productId: productSlug } }));
71
+ } else {
72
+ window.dispatchEvent(new CustomEvent('openSimpleModal'));
73
+ }
74
+ }
75
+ };
76
+
77
+ return (
78
+ <>
79
+ {isBookingAction ? (
80
+ <button
81
+ onClick={handleClick}
82
+ className={`button button-${variant} hover-${hoverColor} ${isLarge ? 'button-large' : ''} ${className}`}
83
+ {...props}
84
+ >
85
+ {children}
86
+ </button>
87
+ ) : finalAction ? (
88
+ <Link href={finalAction} target={shouldOpenInNewTab ? '_blank' : '_self'}>
89
+ <button
90
+ className={`button button-${variant} hover-${hoverColor} ${isLarge ? 'button-large' : ''} ${className}`}
91
+ {...props}
92
+ >
93
+ {children}
94
+ </button>
95
+ </Link>
96
+ ) : (
97
+ <button
98
+ className={`button button-${variant} hover-${hoverColor} ${isLarge ? 'button-large' : ''} ${className}`}
99
+ {...props}
100
+ >
101
+ {children}
102
+ </button>
103
+ )}
104
+ </>
105
+ )
106
+ }
107
+
108
+ function isModalActionType(action: ButtonAction): boolean {
109
+ return Object.values(PresetButtonActions).includes(action as PresetButtonActions);
110
+ }
111
+
112
+ function getProductSlugForAction(action: ButtonAction): string | null | undefined {
113
+ if (Object.values(PresetButtonActions).includes(action as PresetButtonActions)) {
114
+ return PRESET_ACTION_TO_PRODUCT_SLUG[action as PresetButtonActions] ?? null;
115
+ }
116
+ return undefined;
117
+ }
118
+
119
+ function getFinalAction(action: ButtonAction) {
120
+ // Preset booking actions open the dialog (handled by handleClick)
121
+ if (Object.values(PresetButtonActions).includes(action as PresetButtonActions)) {
122
+ return null;
123
+ }
124
+
125
+ // Handle regular URLs (http or relative paths)
126
+ if (typeof action === 'string' && (action.startsWith('http') || action.startsWith('/'))) {
127
+ return action;
128
+ }
129
+
130
+ return null;
131
+ }
132
+
133
+ export { ButtonHoverColor, PresetButtonActions };
134
+
135
+ interface MenuButtonProps {
136
+ onClick?: () => void;
137
+ isOpen?: boolean;
138
+ strings?: any;
139
+ }
140
+
141
+ export function MenuButton({ onClick, isOpen = false, strings }: MenuButtonProps) {
142
+ return (
143
+ <button className={`button button-menu ${isOpen ? 'open' : ''}`} onClick={onClick}>
144
+ <span className="menu-text">{strings.common.menu}</span>
145
+ <div className="menu-icon">
146
+ <span></span>
147
+ <span></span>
148
+ <span></span>
149
+ </div>
150
+ </button>
151
+ );
152
+ }
@@ -0,0 +1,14 @@
1
+ 'use client';
2
+
3
+ import BottomSheet from './bottom-sheet';
4
+ import { useBottomSheet } from '@/hooks/use-bottom-sheet';
5
+
6
+ export default function ClientBottomSheet() {
7
+ const { isOpen, content, closeSheet } = useBottomSheet();
8
+
9
+ return (
10
+ <BottomSheet isOpen={isOpen} onClose={closeSheet}>
11
+ {content}
12
+ </BottomSheet>
13
+ );
14
+ }
@@ -0,0 +1,29 @@
1
+ import React from 'react';
2
+
3
+ interface ColorableSvgProps {
4
+ src: string;
5
+ className?: string;
6
+ width?: number;
7
+ height?: number;
8
+ }
9
+
10
+ export default function ColorableSvg({ src, className, width = 24, height = 24 }: ColorableSvgProps) {
11
+ const [svgContent, setSvgContent] = React.useState<string>('');
12
+
13
+ React.useEffect(() => {
14
+ fetch(src)
15
+ .then(res => res.text())
16
+ .then(text => {
17
+ // Replace both the style attribute and width/height attributes
18
+ const colorableSvg = text
19
+ .replace(/style="[^"]*"/, 'style="fill: currentColor"')
20
+ .replace(/width="[^"]*"/, `width="${width}"`)
21
+ .replace(/height="[^"]*"/, `height="${height}"`);
22
+ setSvgContent(colorableSvg);
23
+ });
24
+ }, [src, width, height]);
25
+
26
+ return (
27
+ <div className={className} dangerouslySetInnerHTML={{ __html: svgContent }} />
28
+ );
29
+ }
@@ -0,0 +1,27 @@
1
+ 'use client';
2
+
3
+ import { usePathname } from 'next/navigation';
4
+ import { useEmbeddedInIframe } from '@/hooks/useEmbeddedInIframe';
5
+ import Footer from './footer';
6
+
7
+ export default function ConditionalFooter() {
8
+ const pathname = usePathname();
9
+ const embeddedInIframe = useEmbeddedInIframe();
10
+
11
+ if (embeddedInIframe) {
12
+ return null;
13
+ }
14
+
15
+ // Hide footer on subscribe/unsubscribe and partner pages
16
+ if (
17
+ pathname === '/subscribe' ||
18
+ pathname === '/unsubscribe' ||
19
+ pathname === '/live-pickups' ||
20
+ pathname?.startsWith('/partner/') ||
21
+ pathname?.startsWith('/partners/')
22
+ ) {
23
+ return null;
24
+ }
25
+
26
+ return <Footer />;
27
+ }