@riverbankcms/sdk 0.96.0 → 0.99.0

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 (208) hide show
  1. package/README.md +20 -1
  2. package/dist/{PreviewEditorSidebar-46VT4QVU.mjs → PreviewEditorSidebar-TPOKCCKY.mjs} +3 -3
  3. package/dist/{PreviewEditorUI-JD75GE5F.mjs → PreviewEditorUI-Y347GLC2.mjs} +3 -3
  4. package/dist/SdkPreviewModeRuntime-OGTXRQ4M.mjs +8 -0
  5. package/dist/_dts/ai/src/contracts/proposals.d.ts +36 -36
  6. package/dist/_dts/api/src/billing.d.ts +2 -0
  7. package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +35 -1
  8. package/dist/_dts/api/src/bookingOperations.d.ts +246 -0
  9. package/dist/_dts/api/src/commercePortalEndpoints.d.ts +5 -1
  10. package/dist/_dts/api/src/contentRuntime.d.ts +109 -40
  11. package/dist/_dts/api/src/endpoints.d.ts +88 -0
  12. package/dist/_dts/api/src/index.d.ts +3 -2
  13. package/dist/_dts/api/src/public/endpoints.d.ts +1 -1
  14. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +10 -0
  15. package/dist/_dts/api/src/sdkContracts.d.ts +2 -0
  16. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +2 -1
  17. package/dist/_dts/api/src/siteOperations.d.ts +65 -1
  18. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +7 -1
  19. package/dist/_dts/billing/src/site-arrangements.d.ts +151 -0
  20. package/dist/_dts/billing/src/subscriptions/store.d.ts +2 -0
  21. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/resolveThumbnail.d.ts +2 -1
  22. package/dist/_dts/blocks/src/PageRenderer.d.ts +8 -1
  23. package/dist/_dts/blocks/src/bindings/types.d.ts +0 -4
  24. package/dist/_dts/blocks/src/client/site-chrome.d.ts +7 -0
  25. package/dist/_dts/blocks/src/contracts/index.d.ts +1 -0
  26. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +12 -12
  27. package/dist/_dts/blocks/src/primitives/content/primitives.d.ts +4 -0
  28. package/dist/_dts/blocks/src/system/blocks/events/shared/index.d.ts +1 -0
  29. package/dist/_dts/blocks/src/system/blocks/events/shared/layout.d.ts +2 -0
  30. package/dist/_dts/blocks/src/system/blocks/index.d.ts +1 -0
  31. package/dist/_dts/blocks/src/system/blocks/weekly-slot-availability.d.ts +34 -0
  32. package/dist/_dts/blocks/src/system/componentFactory.d.ts +1 -0
  33. package/dist/_dts/blocks/src/system/constants/blockKinds.d.ts +1 -1
  34. package/dist/_dts/blocks/src/system/customize/facets.d.ts +2 -2
  35. package/dist/_dts/blocks/src/system/data/loaderEndpoints.d.ts +1 -1
  36. package/dist/_dts/blocks/src/system/data/prefetchBlockData.d.ts +4 -1
  37. package/dist/_dts/blocks/src/system/node/builder.d.ts +2 -0
  38. package/dist/_dts/blocks/src/system/node/schema.d.ts +13 -0
  39. package/dist/_dts/blocks/src/system/node/validation-constants.d.ts +1 -1
  40. package/dist/_dts/blocks/src/system/registry.d.ts +1 -0
  41. package/dist/_dts/blocks/src/system/runtime/api/client.d.ts +2 -1
  42. package/dist/_dts/blocks/src/system/runtime/api/endpoints.d.ts +8 -0
  43. package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +24 -0
  44. package/dist/_dts/blocks/src/system/runtime/components/booking/DatePicker.d.ts +6 -2
  45. package/dist/_dts/blocks/src/system/runtime/components/booking/SuccessMessage.d.ts +3 -1
  46. package/dist/_dts/blocks/src/system/runtime/components/booking/TimeSlotSelector.d.ts +10 -4
  47. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +6 -0
  48. package/dist/_dts/blocks/src/system/runtime/hooks/useAppointmentCheckoutVerification.d.ts +7 -0
  49. package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableSlots.d.ts +2 -2
  50. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +2 -2
  51. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.d.ts +4 -0
  52. package/dist/_dts/blocks/src/system/runtime/hooks/usePaymentVerification.d.ts +5 -0
  53. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +11 -0
  54. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/StepIndicator.d.ts +3 -1
  55. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/hooks.d.ts +14 -0
  56. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.d.ts +8 -2
  57. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +133 -2
  58. package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.client.controller.d.ts +3 -0
  59. package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.client.d.ts +9 -0
  60. package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.client.state.d.ts +14 -0
  61. package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.server.d.ts +10 -0
  62. package/dist/_dts/blocks/src/system/runtime/nodes/weekly-slot-availability.view.d.ts +11 -0
  63. package/dist/_dts/blocks/src/system/runtime/resolver.d.ts +31 -1
  64. package/dist/_dts/blocks/src/system/runtime/shared/components/FeedbackMessage.d.ts +2 -1
  65. package/dist/_dts/blocks/src/system/runtime/{nodes/event-registration → shared/components}/SelectableOptionCard.d.ts +11 -2
  66. package/dist/_dts/blocks/src/system/runtime/shared/components/StepIndicator.d.ts +16 -5
  67. package/dist/_dts/blocks/src/system/runtime/shared/components/index.d.ts +2 -0
  68. package/dist/_dts/blocks/src/system/runtime/shared/index.d.ts +2 -2
  69. package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.d.ts +5 -0
  70. package/dist/_dts/blocks/src/utils/date-formatting.d.ts +18 -2
  71. package/dist/_dts/content-editor/src/primitives/PreviewInlineTextEditor.d.ts +1 -1
  72. package/dist/_dts/content-editor/src/primitives/PreviewRichTextEditor.d.ts +1 -1
  73. package/dist/_dts/content-model/src/templates/defaults.d.ts +5 -5
  74. package/dist/_dts/content-model/src/templates/types.d.ts +2 -6
  75. package/dist/_dts/core/src/branded.d.ts +8 -0
  76. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +767 -20
  77. package/dist/_dts/field-primitives/src/bindings/index.d.ts +8 -0
  78. package/dist/_dts/sdk/src/__mocks__/next-cache.d.ts +1 -1
  79. package/dist/_dts/sdk/src/cli/commands/push/publishGuidance.d.ts +15 -0
  80. package/dist/_dts/sdk/src/cli/commands/push/scopes/commandBackedDatedOfferingScope.d.ts +2 -1
  81. package/dist/_dts/sdk/src/cli/commands/push/scopes/types.d.ts +3 -1
  82. package/dist/_dts/sdk/src/cli/commands/push/stale-resolution.d.ts +9 -3
  83. package/dist/_dts/sdk/src/cli/commands/push/workflowPlan.d.ts +34 -0
  84. package/dist/_dts/sdk/src/cli/commands/push.d.ts +13 -0
  85. package/dist/_dts/sdk/src/cli/commands/setup.d.ts +2 -0
  86. package/dist/_dts/sdk/src/cli/config-loader.d.ts +2 -0
  87. package/dist/_dts/sdk/src/cli/content/metadataStore.d.ts +29 -0
  88. package/dist/_dts/sdk/src/cli/content/reader.d.ts +16 -14
  89. package/dist/_dts/sdk/src/cli/content/writer.d.ts +6 -4
  90. package/dist/_dts/sdk/src/cli/env-scope.d.ts +2 -0
  91. package/dist/_dts/sdk/src/cli/helpers.d.ts +6 -7
  92. package/dist/_dts/sdk/src/cli/merge-remote/entryMergePush.d.ts +2 -0
  93. package/dist/_dts/sdk/src/cli/merge-remote/entryMergeReport.d.ts +6 -18
  94. package/dist/_dts/sdk/src/cli/merge-remote/entrySnapshots.d.ts +2 -4
  95. package/dist/_dts/sdk/src/cli/merge-remote/pageMergePush.d.ts +2 -0
  96. package/dist/_dts/sdk/src/cli/merge-remote/pageMergeReport.d.ts +6 -18
  97. package/dist/_dts/sdk/src/cli/merge-remote/pageSnapshots.d.ts +2 -4
  98. package/dist/_dts/sdk/src/cli/merge-remote/sharedBaseSnapshots.d.ts +32 -0
  99. package/dist/_dts/sdk/src/cli/merge-remote/sharedMergePlan.d.ts +27 -0
  100. package/dist/_dts/sdk/src/cli/merge-remote/sharedMergeReport.d.ts +63 -0
  101. package/dist/_dts/sdk/src/cli/push-config.d.ts +13 -2
  102. package/dist/_dts/sdk/src/cli/setup/setupPlan.d.ts +51 -0
  103. package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +21 -0
  104. package/dist/_dts/sdk/src/client/index.d.ts +6 -0
  105. package/dist/_dts/sdk/src/client/runtimeCachePolicy.d.ts +1 -1
  106. package/dist/_dts/sdk/src/client/types.d.ts +18 -2
  107. package/dist/_dts/sdk/src/config/types.d.ts +1 -1
  108. package/dist/_dts/sdk/src/config/validation.d.ts +3 -0
  109. package/dist/_dts/sdk/src/contracts/bindings.d.ts +3 -7
  110. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +13 -0
  111. package/dist/_dts/sdk/src/data/prefetchBlockData.d.ts +6 -1
  112. package/dist/_dts/sdk/src/next/route-outcome-proxy.d.ts +3 -3
  113. package/dist/_dts/sdk/src/next/types.d.ts +19 -0
  114. package/dist/_dts/sdk/src/prebuild/loader.d.ts +8 -1
  115. package/dist/_dts/sdk/src/public-api/contracts.d.ts +174 -78
  116. package/dist/_dts/sdk/src/public-api/runtime.d.ts +1 -1
  117. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
  118. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +4 -0
  119. package/dist/_dts/sdk/src/rendering/helpers/bindings.d.ts +4 -4
  120. package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +58 -1
  121. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +8 -0
  122. package/dist/_dts/sdk/src/rendering/hooks/usePage.d.ts +2 -2
  123. package/dist/_dts/sdk/src/rendering/index.d.ts +7 -7
  124. package/dist/_dts/sdk/src/rendering/islands/types.d.ts +18 -66
  125. package/dist/_dts/sdk/src/rendering/overrides.d.ts +2 -0
  126. package/dist/_dts/sdk/src/routing/resolveRoute.d.ts +18 -0
  127. package/dist/_dts/sdk/src/test/apiClient.d.ts +17 -0
  128. package/dist/_dts/sdk/src/test/bunDom.setup.d.ts +1 -0
  129. package/dist/_dts/sdk/src/test/env.d.ts +4 -0
  130. package/dist/_dts/sdk/src/types/block-kinds.d.ts +1 -1
  131. package/dist/_dts/sdk/src/version.d.ts +1 -1
  132. package/dist/_dts/site-commands/src/commands.d.ts +3 -3
  133. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  134. package/dist/_dts/theme-core/src/interactive/generateBaseCSS.d.ts +6 -0
  135. package/dist/_dts/theme-core/src/status/contextualColors.d.ts +6 -0
  136. package/dist/_dts/theme-core/src/status/index.d.ts +1 -0
  137. package/dist/{chunk-VHIMXQ7Z.mjs → chunk-4HXF2QLH.mjs} +2 -2
  138. package/dist/{chunk-VTPPVAOL.mjs → chunk-EMJIT3ZJ.mjs} +1 -1
  139. package/dist/{chunk-4TLTV7OB.mjs → chunk-PM7HGDHM.mjs} +2 -2
  140. package/dist/{chunk-XMATDBXO.mjs → chunk-XO34WBBP.mjs} +2139 -1348
  141. package/dist/{chunk-EL55VV6Q.mjs → chunk-YGTTEVUM.mjs} +31 -10
  142. package/dist/{chunk-7ED5UNHL.mjs → chunk-YWTCCOSF.mjs} +117 -0
  143. package/dist/cli/index.mjs +2690 -1503
  144. package/dist/cli/init-docs/content/cli-reference.md +29 -1
  145. package/dist/cli/init-docs/content/getting-started.md +8 -0
  146. package/dist/cli/init-docs/content/workflow-agent-safe-sync.md +3 -1
  147. package/dist/cli/init-docs/content/workflow-preview-mode.md +6 -0
  148. package/dist/cli/init-docs/content/workflow-remote-setup.md +51 -0
  149. package/dist/client/{accordion-GUNXIIZR.mjs → accordion-QSUEYL4L.mjs} +2 -2
  150. package/dist/client/{bookingForm-AOU4VHP5.mjs → bookingForm-QYGAHPDP.mjs} +376 -302
  151. package/dist/client/bookings.mjs +795 -429
  152. package/dist/client/{carousel-4QSX2JPC.mjs → carousel-SM2LEWAU.mjs} +3 -3
  153. package/dist/client/{cart-JKN6C4ZB.mjs → cart-3N3SFKNQ.mjs} +7 -7
  154. package/dist/client/{checkout-YY6YMITW.mjs → checkout-YFAYPKPZ.mjs} +7 -7
  155. package/dist/client/{chunk-SY543WZ3.mjs → chunk-5DLGREUB.mjs} +1 -1
  156. package/dist/client/{chunk-A3YN7M3G.mjs → chunk-CLZ7NBSP.mjs} +147 -75
  157. package/dist/client/{chunk-GWCRCJLB.mjs → chunk-CYJ3MUFP.mjs} +18 -6
  158. package/dist/client/{chunk-JNE6UI6U.mjs → chunk-H3H3ODO7.mjs} +1 -1
  159. package/dist/client/{chunk-CPKMJVBD.mjs → chunk-HPEQ4YWW.mjs} +83 -109
  160. package/dist/client/{chunk-PCHACQEB.mjs → chunk-IIUIKJ4K.mjs} +15 -7
  161. package/dist/client/{chunk-TNGL2WJF.mjs → chunk-IOAHWAQG.mjs} +18 -0
  162. package/dist/client/{chunk-6H27K6AA.mjs → chunk-JTKBF3W2.mjs} +10 -4
  163. package/dist/client/{chunk-OLAOAZEO.mjs → chunk-K7KTSACR.mjs} +1 -1
  164. package/dist/client/{chunk-BFCJZODD.mjs → chunk-R32M5HFS.mjs} +6 -6
  165. package/dist/client/{chunk-VJROUYOQ.mjs → chunk-WEVT46PX.mjs} +3 -3
  166. package/dist/client/{chunk-H7A6PUGM.mjs → chunk-ZU65LTI3.mjs} +1 -1
  167. package/dist/client/client.mjs +5052 -4083
  168. package/dist/client/{courseRegistration-UU2KMPSQ.mjs → courseRegistration-LYBE7VVK.mjs} +7 -7
  169. package/dist/client/{eventCalendar-WIVNS2TM.mjs → eventCalendar-FMTB75X6.mjs} +9 -9
  170. package/dist/client/{eventCombined-P3G5MW4J.mjs → eventCombined-E4LUCJXT.mjs} +9 -9
  171. package/dist/client/{eventDetails-2VHJ2RDG.mjs → eventDetails-GELSRR4Z.mjs} +9 -9
  172. package/dist/client/{eventListing-TGO6JI3R.mjs → eventListing-TB623B6R.mjs} +9 -9
  173. package/dist/client/{eventRegistration-B46HEJES.mjs → eventRegistration-NRIKHXTI.mjs} +9 -9
  174. package/dist/client/{form-VKRTFUNQ.mjs → form-Y4U4IAXE.mjs} +3 -3
  175. package/dist/client/{headerSection-XUX4ZJLO.mjs → headerSection-QSOVV5P7.mjs} +3 -3
  176. package/dist/client/hooks.mjs +1776 -1355
  177. package/dist/client/{locationMap-NQFI5MJO.mjs → locationMap-QYCAHH7H.mjs} +3 -3
  178. package/dist/client/{newsletterForm-P2GETCQK.mjs → newsletterForm-NWHY5TBY.mjs} +3 -3
  179. package/dist/client/{productDetail-7NQ7O5IF.mjs → productDetail-FYDMU2CE.mjs} +7 -7
  180. package/dist/client/{productList-RX6ZJ7BL.mjs → productList-D76CGACQ.mjs} +7 -7
  181. package/dist/client/rendering/client.mjs +2990 -2470
  182. package/dist/client/rendering/islands.mjs +19 -19
  183. package/dist/client/rendering.mjs +3236 -2236
  184. package/dist/client/{shop-BHN5AKY6.mjs → shop-SOUACT5N.mjs} +7 -7
  185. package/dist/preview-next/before-render.mjs +117 -0
  186. package/dist/preview-next/client/runtime.mjs +5 -5
  187. package/dist/preview-next/middleware.mjs +117 -0
  188. package/dist/{sdk-runtime-X2LXQ5IC.mjs → sdk-runtime-XPVE3LBA.mjs} +6 -6
  189. package/dist/server/components.mjs +3115 -2484
  190. package/dist/server/config-template-validation.mjs +6 -2
  191. package/dist/server/config-validation.mjs +1961 -1580
  192. package/dist/server/config.mjs +1961 -1580
  193. package/dist/server/data.mjs +1762 -1352
  194. package/dist/server/index.mjs +266 -33
  195. package/dist/server/next/middleware.mjs +2 -2
  196. package/dist/server/next.mjs +3399 -2504
  197. package/dist/server/page-converter.mjs +1553 -1295
  198. package/dist/server/prebuild-loader.mjs +42 -23
  199. package/dist/server/prebuild.mjs +1 -1
  200. package/dist/server/rendering/server.mjs +3151 -2489
  201. package/dist/server/rendering.mjs +3363 -2555
  202. package/dist/server/routing.mjs +1877 -1388
  203. package/dist/server/server.mjs +2057 -1402
  204. package/dist/server/theme-bridge.mjs +597 -505
  205. package/dist/server/theme.mjs +5 -4
  206. package/dist/styles/index.css +499 -490
  207. package/package.json +6 -4
  208. package/dist/SdkPreviewModeRuntime-MJUSYUFB.mjs +0 -8
@@ -2765,7 +2765,7 @@ var init_altcha = __esm({
2765
2765
  });
2766
2766
 
2767
2767
  // src/bookings/index.ts
2768
- import * as React5 from "react";
2768
+ import * as React8 from "react";
2769
2769
 
2770
2770
  // ../blocks/src/system/runtime/api/deduplication.ts
2771
2771
  function createDeduplicationCache(options = {}) {
@@ -2882,6 +2882,10 @@ var BOOKINGS = {
2882
2882
  path: "/public/bookings/availability/slots",
2883
2883
  method: "GET"
2884
2884
  },
2885
+ getWeeklySlotAvailability: {
2886
+ path: "/public/bookings/weekly-slot-availability",
2887
+ method: "GET"
2888
+ },
2885
2889
  getAvailableDates: {
2886
2890
  path: "/public/bookings/availability/dates",
2887
2891
  method: "GET"
@@ -3428,6 +3432,18 @@ function createBlockApi(config) {
3428
3432
  }
3429
3433
  });
3430
3434
  },
3435
+ async getWeeklySlotAvailability(params) {
3436
+ const sid = requireSiteId();
3437
+ return request(BOOKINGS.getWeeklySlotAvailability, {
3438
+ query: {
3439
+ siteId: sid,
3440
+ serviceId: params.serviceId,
3441
+ resourceId: params.resourceId,
3442
+ horizonWeeks: params.horizonWeeks,
3443
+ timezone: params.timezone
3444
+ }
3445
+ });
3446
+ },
3431
3447
  async getAvailableDates(params) {
3432
3448
  const sid = requireSiteId();
3433
3449
  return request(BOOKINGS.getAvailableDates, {
@@ -4797,15 +4813,16 @@ var joyStamp = defineButtonPersonality({
4797
4813
  // 700, matching the mockup's chunky button labels.
4798
4814
  typography: "heading",
4799
4815
  fontWeight: 700,
4816
+ fontSize: "text-lg",
4800
4817
  borderWidth: 2,
4801
4818
  hoverTransform: "none",
4802
4819
  hoverColor: "none"
4803
4820
  },
4804
4821
  sizes: {
4805
- sm: { padding: "0.625rem 1.25rem", fontSize: "text-sm" },
4806
- md: { padding: "0.875rem 1.75rem", fontSize: "text-base" },
4807
- lg: { padding: "1.125rem 2.25rem", fontSize: "text-lg" },
4808
- xl: { padding: "1.25rem 2.75rem", fontSize: "text-xl" }
4822
+ sm: { padding: "0.625rem 1.25rem", fontSize: "text-base" },
4823
+ md: { padding: "0.875rem 1.75rem", fontSize: "text-lg" },
4824
+ lg: { padding: "1.125rem 2.25rem", fontSize: "text-xl" },
4825
+ xl: { padding: "1.25rem 2.75rem", fontSize: "text-2xl" }
4809
4826
  },
4810
4827
  variants: [
4811
4828
  {
@@ -12482,6 +12499,7 @@ function FeedbackMessage({
12482
12499
  tone,
12483
12500
  children,
12484
12501
  className,
12502
+ id,
12485
12503
  title,
12486
12504
  titleClassName,
12487
12505
  bodyClassName,
@@ -12493,6 +12511,7 @@ function FeedbackMessage({
12493
12511
  return /* @__PURE__ */ jsxs2(
12494
12512
  "div",
12495
12513
  {
12514
+ id,
12496
12515
  className,
12497
12516
  "data-feedback-tone": tone,
12498
12517
  role,
@@ -12506,7 +12525,7 @@ function FeedbackMessage({
12506
12525
  }
12507
12526
 
12508
12527
  // ../blocks/src/system/runtime/nodes/booking-form.client.tsx
12509
- import React3, { useRef as useRef8, useState as useState2 } from "react";
12528
+ import React6, { useRef as useRef8, useState as useState2 } from "react";
12510
12529
 
12511
12530
  // ../altcha/src/AltchaWidget.tsx
12512
12531
  import { createElement, useEffect, useRef } from "react";
@@ -12561,27 +12580,98 @@ function isSpamProtectionEnabled() {
12561
12580
  return process.env.NEXT_PUBLIC_SPAM_PROTECTION_ENABLED === "true";
12562
12581
  }
12563
12582
 
12583
+ // ../blocks/src/system/runtime/shared/components/CheckIcon.tsx
12584
+ import { jsx as jsx4 } from "react/jsx-runtime";
12585
+ function CheckIcon({ className, strokeWidth = 2 }) {
12586
+ return /* @__PURE__ */ jsx4(
12587
+ "svg",
12588
+ {
12589
+ fill: "none",
12590
+ strokeLinecap: "round",
12591
+ strokeLinejoin: "round",
12592
+ strokeWidth,
12593
+ viewBox: "0 0 24 24",
12594
+ stroke: "currentColor",
12595
+ className,
12596
+ width: "1em",
12597
+ height: "1em",
12598
+ "aria-hidden": "true",
12599
+ children: /* @__PURE__ */ jsx4("path", { d: "M5 13l4 4L19 7" })
12600
+ }
12601
+ );
12602
+ }
12603
+
12604
+ // ../blocks/src/system/runtime/shared/components/StateIcon.tsx
12605
+ import { jsx as jsx5 } from "react/jsx-runtime";
12606
+ function StateIcon({ variant, children }) {
12607
+ return /* @__PURE__ */ jsx5("div", { className: `rb-state-icon rb-state-icon--${variant}`, "aria-hidden": "true", children });
12608
+ }
12609
+
12610
+ // ../blocks/src/system/runtime/shared/components/TerminalPanel.tsx
12611
+ import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
12612
+ function joinClasses2(...parts) {
12613
+ return parts.filter((part) => typeof part === "string" && part.length > 0).join(" ");
12614
+ }
12615
+ function TerminalPanel({
12616
+ tone,
12617
+ title,
12618
+ titleAs: Title = "h3",
12619
+ body,
12620
+ secondaryBody,
12621
+ icon,
12622
+ actions,
12623
+ className,
12624
+ titleClassName,
12625
+ bodyClassName,
12626
+ secondaryBodyClassName,
12627
+ iconClassName,
12628
+ actionsClassName,
12629
+ role,
12630
+ live
12631
+ }) {
12632
+ const resolvedRole = role ?? (tone === "error" ? "alert" : "status");
12633
+ const resolvedLive = live ?? (resolvedRole === "alert" ? "assertive" : "polite");
12634
+ return /* @__PURE__ */ jsxs3(
12635
+ "div",
12636
+ {
12637
+ className,
12638
+ "data-terminal-panel": true,
12639
+ "data-terminal-tone": tone,
12640
+ role: resolvedRole,
12641
+ "aria-live": resolvedLive === "off" ? void 0 : resolvedLive,
12642
+ children: [
12643
+ icon ? /* @__PURE__ */ jsx6("div", { className: joinClasses2(iconClassName), "data-terminal-icon": true, children: icon }) : null,
12644
+ /* @__PURE__ */ jsx6(Title, { className: joinClasses2(titleClassName), "data-terminal-title": true, children: title }),
12645
+ body ? /* @__PURE__ */ jsx6("div", { className: joinClasses2(bodyClassName), "data-terminal-body": true, children: body }) : null,
12646
+ actions ? /* @__PURE__ */ jsx6("div", { className: joinClasses2(actionsClassName), "data-terminal-actions": true, children: actions }) : null,
12647
+ secondaryBody ? /* @__PURE__ */ jsx6("div", { className: joinClasses2(secondaryBodyClassName), "data-terminal-secondary-body": true, children: secondaryBody }) : null
12648
+ ]
12649
+ }
12650
+ );
12651
+ }
12652
+
12564
12653
  // ../blocks/src/system/runtime/components/booking/SuccessMessage.tsx
12565
- import { Fragment, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
12654
+ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
12566
12655
  var SuccessMessage = ({
12567
12656
  message,
12568
12657
  resourceName,
12569
12658
  className
12570
12659
  }) => {
12571
- return /* @__PURE__ */ jsx4(
12572
- FeedbackMessage,
12660
+ return /* @__PURE__ */ jsx7(
12661
+ TerminalPanel,
12573
12662
  {
12574
12663
  tone: "success",
12575
- className: `ab-alert ab-alert--success ${className ?? ""}`,
12664
+ title: "Booking confirmed",
12665
+ icon: /* @__PURE__ */ jsx7(StateIcon, { variant: "success", children: /* @__PURE__ */ jsx7(CheckIcon, { strokeWidth: 3 }) }),
12666
+ body: /* @__PURE__ */ jsx7("p", { className: "ab-text", children: message }),
12667
+ secondaryBody: resourceName ? /* @__PURE__ */ jsxs4("p", { className: "ab-text rb-on-surface--muted", children: [
12668
+ "Practitioner: ",
12669
+ resourceName
12670
+ ] }) : null,
12671
+ className: ["ab-center", className ?? ""].join(" ").trim(),
12672
+ titleClassName: "ab-terminal-title",
12576
12673
  role: "alert",
12577
- live: "polite",
12578
- children: /* @__PURE__ */ jsxs3(Fragment, { children: [
12579
- /* @__PURE__ */ jsx4("p", { className: "ab-text", children: message }),
12580
- resourceName ? /* @__PURE__ */ jsxs3("p", { className: "ab-text ab-text--muted", children: [
12581
- "Practitioner: ",
12582
- resourceName
12583
- ] }) : null
12584
- ] })
12674
+ live: "polite"
12585
12675
  }
12586
12676
  );
12587
12677
  };
@@ -12659,9 +12749,30 @@ function formatDate(dateStr) {
12659
12749
  }
12660
12750
  });
12661
12751
  }
12662
- function formatTime(isoString) {
12663
- return formatBookingInstant(isoString, {
12752
+ function formatDatePillParts(dateStr) {
12753
+ const instant = `${dateStr}T00:00:00.000Z`;
12754
+ const partFormat = (format) => formatBookingInstant(instant, {
12664
12755
  timeZone: DEFAULT_BOOKING_TIME_ZONE,
12756
+ format
12757
+ });
12758
+ return {
12759
+ weekday: partFormat({ weekday: "short" }),
12760
+ day: partFormat({ day: "numeric" }),
12761
+ month: partFormat({ month: "short" })
12762
+ };
12763
+ }
12764
+ function formatTimeShort(isoString, timeZone = DEFAULT_BOOKING_TIME_ZONE) {
12765
+ return formatBookingInstant(isoString, {
12766
+ timeZone,
12767
+ format: {
12768
+ hour: "numeric",
12769
+ minute: "2-digit"
12770
+ }
12771
+ });
12772
+ }
12773
+ function formatTime(isoString, timeZone = DEFAULT_BOOKING_TIME_ZONE) {
12774
+ return formatBookingInstant(isoString, {
12775
+ timeZone,
12665
12776
  format: {
12666
12777
  hour: "numeric",
12667
12778
  minute: "2-digit",
@@ -13807,6 +13918,24 @@ function toBookingSlotView(slot) {
13807
13918
  function toBookingSlotViews(slots) {
13808
13919
  return slots.map(toBookingSlotView);
13809
13920
  }
13921
+ function deriveBookingSlotDisplayOptions(input) {
13922
+ const seenStartTimes = /* @__PURE__ */ new Set();
13923
+ const options = [];
13924
+ for (const slot of input.slots) {
13925
+ if (!input.hasSelectedResource) {
13926
+ if (seenStartTimes.has(slot.startAt)) continue;
13927
+ seenStartTimes.add(slot.startAt);
13928
+ }
13929
+ options.push({
13930
+ key: slot.key,
13931
+ startAt: slot.startAt,
13932
+ endAt: slot.endAt,
13933
+ resourceId: slot.resourceId,
13934
+ slot
13935
+ });
13936
+ }
13937
+ return options;
13938
+ }
13810
13939
  function toBookingFormData(state) {
13811
13940
  return {
13812
13941
  ...state.fieldValues,
@@ -15167,8 +15296,18 @@ function usePolling(config) {
15167
15296
  }
15168
15297
 
15169
15298
  // ../blocks/src/system/runtime/hooks/useAppointmentCheckoutVerification.ts
15299
+ var appointmentCheckoutVerificationDeps = {
15300
+ useBlockApi,
15301
+ usePolling
15302
+ };
15170
15303
  function useAppointmentCheckoutVerification(config) {
15171
- const api = useBlockApi();
15304
+ return useAppointmentCheckoutVerificationWithDeps(
15305
+ config,
15306
+ appointmentCheckoutVerificationDeps
15307
+ );
15308
+ }
15309
+ function useAppointmentCheckoutVerificationWithDeps(config, deps) {
15310
+ const api = deps.useBlockApi();
15172
15311
  const pollingConfig = useMemo3(() => {
15173
15312
  if (!config) return null;
15174
15313
  return {
@@ -15179,7 +15318,7 @@ function useAppointmentCheckoutVerification(config) {
15179
15318
  interval: config.pollInterval
15180
15319
  };
15181
15320
  }, [api, config]);
15182
- const polling = usePolling(pollingConfig);
15321
+ const polling = deps.usePolling(pollingConfig);
15183
15322
  const state = resolveAppointmentCheckoutVerificationState({
15184
15323
  config,
15185
15324
  pollingStatus: polling.status,
@@ -15192,113 +15331,250 @@ function useAppointmentCheckoutVerification(config) {
15192
15331
  };
15193
15332
  }
15194
15333
 
15334
+ // ../blocks/src/system/runtime/nodes/booking-form.default-ui.tsx
15335
+ import React5 from "react";
15336
+
15195
15337
  // ../blocks/src/system/runtime/components/booking/DatePicker.tsx
15196
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
15338
+ import React3 from "react";
15339
+ import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
15340
+ function DateFieldLabel({
15341
+ labelId,
15342
+ required
15343
+ }) {
15344
+ return /* @__PURE__ */ jsxs5("span", { className: "form-label", id: labelId, children: [
15345
+ "Select Date",
15346
+ required && /* @__PURE__ */ jsx8("span", { className: "required-marker", children: "*" })
15347
+ ] });
15348
+ }
15197
15349
  var DatePicker = ({
15198
15350
  value,
15199
15351
  onChange,
15200
15352
  dateOptions,
15201
15353
  required = true,
15354
+ ariaDescribedBy,
15355
+ ariaInvalid,
15202
15356
  isLoading = false,
15203
15357
  isEmpty = false,
15204
15358
  hasMore = false,
15205
15359
  onLoadMore
15206
15360
  }) => {
15361
+ const generatedId = React3.useId();
15362
+ const labelId = `${generatedId}-date-label`;
15363
+ const gridRef = React3.useRef(null);
15364
+ const previousCountRef = React3.useRef(dateOptions.length);
15365
+ React3.useEffect(() => {
15366
+ const previousCount = previousCountRef.current;
15367
+ previousCountRef.current = dateOptions.length;
15368
+ if (previousCount === 0 || dateOptions.length <= previousCount) return;
15369
+ const pills = gridRef.current?.querySelectorAll(
15370
+ "button[aria-pressed]"
15371
+ );
15372
+ pills?.[previousCount]?.focus();
15373
+ }, [dateOptions.length]);
15207
15374
  if (isLoading) {
15208
- return /* @__PURE__ */ jsxs4("div", { className: "ab-stack--sm", children: [
15209
- /* @__PURE__ */ jsxs4("label", { className: "ab-label", children: [
15210
- "Select Date",
15211
- required && /* @__PURE__ */ jsx5("span", { className: "ab-required", children: "*" })
15212
- ] }),
15213
- /* @__PURE__ */ jsx5("div", { className: "ab-skeleton" }),
15214
- /* @__PURE__ */ jsx5("p", { className: "ab-text ab-text--muted ab-text--sm", children: "Loading available dates..." })
15375
+ return /* @__PURE__ */ jsxs5("div", { className: "rb-reg-stack rb-reg-stack--sm", children: [
15376
+ /* @__PURE__ */ jsx8(DateFieldLabel, { labelId, required }),
15377
+ /* @__PURE__ */ jsx8("div", { className: "rb-shell-block" }),
15378
+ /* @__PURE__ */ jsx8("p", { className: "ab-text ab-text--sm rb-on-surface--muted", children: "Loading available dates..." })
15215
15379
  ] });
15216
15380
  }
15217
15381
  if (isEmpty) {
15218
- return /* @__PURE__ */ jsxs4("div", { className: "ab-stack--sm", children: [
15219
- /* @__PURE__ */ jsxs4("label", { className: "ab-label", children: [
15220
- "Select Date",
15221
- required && /* @__PURE__ */ jsx5("span", { className: "ab-required", children: "*" })
15222
- ] }),
15223
- /* @__PURE__ */ jsx5(FeedbackMessage, { tone: "warning", className: "ab-alert ab-alert--warning", role: "status", children: /* @__PURE__ */ jsxs4("p", { className: "ab-text", children: [
15382
+ return /* @__PURE__ */ jsxs5("div", { className: "rb-reg-stack rb-reg-stack--sm", children: [
15383
+ /* @__PURE__ */ jsx8(DateFieldLabel, { labelId, required }),
15384
+ /* @__PURE__ */ jsx8(FeedbackMessage, { tone: "warning", className: "alert alert-warning", role: "status", children: /* @__PURE__ */ jsxs5("p", { className: "ab-text", children: [
15224
15385
  "No available dates in this period.",
15225
- hasMore && onLoadMore && /* @__PURE__ */ jsx5(
15386
+ hasMore && onLoadMore && /* @__PURE__ */ jsx8(
15226
15387
  "button",
15227
15388
  {
15228
15389
  type: "button",
15229
15390
  onClick: onLoadMore,
15230
- className: "ab-link",
15391
+ className: "ab-link rb-ml-2",
15231
15392
  children: "Check later dates"
15232
15393
  }
15233
15394
  )
15234
15395
  ] }) })
15235
15396
  ] });
15236
15397
  }
15237
- return /* @__PURE__ */ jsxs4("div", { className: "ab-stack--sm", children: [
15238
- /* @__PURE__ */ jsxs4("label", { htmlFor: "booking-date", className: "ab-label", children: [
15239
- "Select Date",
15240
- required && /* @__PURE__ */ jsx5("span", { className: "ab-required", children: "*" })
15241
- ] }),
15242
- /* @__PURE__ */ jsxs4(
15243
- "select",
15398
+ return /* @__PURE__ */ jsxs5("div", { className: "rb-reg-stack rb-reg-stack--sm", children: [
15399
+ /* @__PURE__ */ jsx8(DateFieldLabel, { labelId, required }),
15400
+ /* @__PURE__ */ jsx8(
15401
+ "div",
15244
15402
  {
15245
- id: "booking-date",
15246
- value,
15247
- onChange: (e) => onChange(e.target.value),
15248
- required,
15249
- className: "ab-select",
15250
- children: [
15251
- /* @__PURE__ */ jsx5("option", { value: "", children: "Choose a date..." }),
15252
- dateOptions.map((date) => /* @__PURE__ */ jsx5("option", { value: date, children: formatDate(date) }, date))
15253
- ]
15403
+ ref: gridRef,
15404
+ role: "group",
15405
+ "aria-labelledby": labelId,
15406
+ "aria-describedby": ariaDescribedBy,
15407
+ "aria-invalid": ariaInvalid || void 0,
15408
+ "aria-required": required || void 0,
15409
+ className: "ab-pill-grid",
15410
+ children: dateOptions.map((date) => {
15411
+ const isSelected = value === date;
15412
+ const parts = formatDatePillParts(date);
15413
+ return /* @__PURE__ */ jsxs5(
15414
+ "button",
15415
+ {
15416
+ type: "button",
15417
+ onClick: () => onChange(isSelected ? "" : date),
15418
+ "aria-pressed": isSelected,
15419
+ "aria-label": formatDate(date),
15420
+ className: `rb-option-card ab-date-pill${isSelected ? " rb-option-card--selected" : ""}`,
15421
+ children: [
15422
+ /* @__PURE__ */ jsx8("span", { className: "ab-pill-caption", "aria-hidden": "true", children: parts.weekday }),
15423
+ /* @__PURE__ */ jsx8("span", { className: "ab-pill-value", "aria-hidden": "true", children: parts.day }),
15424
+ /* @__PURE__ */ jsx8("span", { className: "ab-pill-caption", "aria-hidden": "true", children: parts.month })
15425
+ ]
15426
+ },
15427
+ date
15428
+ );
15429
+ })
15254
15430
  }
15255
15431
  ),
15256
- hasMore && onLoadMore && /* @__PURE__ */ jsx5(
15432
+ hasMore && onLoadMore && /* @__PURE__ */ jsx8(
15257
15433
  "button",
15258
15434
  {
15259
15435
  type: "button",
15260
15436
  onClick: onLoadMore,
15261
15437
  className: "ab-link",
15262
- children: "Load more dates \u2192"
15438
+ children: "More dates \u2192"
15263
15439
  }
15264
15440
  )
15265
15441
  ] });
15266
15442
  };
15267
15443
 
15268
15444
  // ../blocks/src/system/runtime/components/booking/TimeSlotSelector.tsx
15269
- import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
15445
+ import React4 from "react";
15446
+ import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
15270
15447
  var TimeSlotSelector = ({
15271
15448
  value,
15272
15449
  onChange,
15273
15450
  slots,
15274
15451
  isLoading,
15275
- required = true
15452
+ timezone,
15453
+ required = true,
15454
+ ariaDescribedBy,
15455
+ ariaInvalid
15276
15456
  }) => {
15277
- return /* @__PURE__ */ jsxs5("div", { className: "ab-stack--sm", children: [
15278
- /* @__PURE__ */ jsxs5("label", { htmlFor: "booking-slot", className: "ab-label", children: [
15457
+ const generatedId = React4.useId();
15458
+ const labelId = `${generatedId}-time-label`;
15459
+ const groupRef = React4.useRef(null);
15460
+ const hadSlotsRef = React4.useRef(false);
15461
+ React4.useEffect(() => {
15462
+ const hasSlots = !isLoading && slots.length > 0;
15463
+ if (hasSlots && !hadSlotsRef.current) {
15464
+ groupRef.current?.scrollIntoView({ block: "nearest", behavior: "smooth" });
15465
+ }
15466
+ hadSlotsRef.current = hasSlots;
15467
+ }, [isLoading, slots.length]);
15468
+ return /* @__PURE__ */ jsxs6("div", { className: "rb-reg-stack rb-reg-stack--sm", children: [
15469
+ /* @__PURE__ */ jsxs6("span", { className: "form-label", id: labelId, children: [
15279
15470
  "Select Time",
15280
- required && /* @__PURE__ */ jsx6("span", { className: "ab-required", children: "*" })
15471
+ required && /* @__PURE__ */ jsx9("span", { className: "required-marker", children: "*" })
15281
15472
  ] }),
15282
- isLoading ? /* @__PURE__ */ jsx6(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info ab-center", role: "status", children: "Loading available times..." }) : slots.length === 0 ? /* @__PURE__ */ jsx6(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info ab-center", role: "status", children: "No available times for this date" }) : /* @__PURE__ */ jsxs5(
15283
- "select",
15473
+ isLoading ? /* @__PURE__ */ jsx9("div", { className: "rb-shell-block" }) : slots.length === 0 ? /* @__PURE__ */ jsx9(FeedbackMessage, { tone: "info", className: "alert alert-info", role: "status", children: "No available times for this date" }) : /* @__PURE__ */ jsx9(
15474
+ "div",
15284
15475
  {
15285
- id: "booking-slot",
15286
- value,
15287
- onChange: (e) => onChange(e.target.value),
15288
- required,
15289
- className: "ab-select",
15290
- children: [
15291
- /* @__PURE__ */ jsx6("option", { value: "", children: "Choose a time..." }),
15292
- slots.map((slot) => /* @__PURE__ */ jsx6("option", { value: slot.startAt, children: formatTime(slot.startAt) }, slot.startAt))
15293
- ]
15476
+ ref: groupRef,
15477
+ role: "group",
15478
+ "aria-labelledby": labelId,
15479
+ "aria-describedby": ariaDescribedBy,
15480
+ "aria-invalid": ariaInvalid || void 0,
15481
+ "aria-required": required || void 0,
15482
+ className: "ab-pill-grid",
15483
+ children: slots.map((slot) => {
15484
+ const isSelected = value === slot.key;
15485
+ return /* @__PURE__ */ jsx9(
15486
+ "button",
15487
+ {
15488
+ type: "button",
15489
+ onClick: () => onChange(isSelected ? "" : slot.key),
15490
+ "aria-pressed": isSelected,
15491
+ "aria-label": formatTime(slot.startAt, timezone),
15492
+ className: `rb-option-card ab-time-pill${isSelected ? " rb-option-card--selected" : ""}`,
15493
+ children: formatTimeShort(slot.startAt, timezone)
15494
+ },
15495
+ slot.key
15496
+ );
15497
+ })
15294
15498
  }
15295
15499
  )
15296
15500
  ] });
15297
15501
  };
15298
15502
 
15503
+ // ../blocks/src/system/runtime/shared/components/StepIndicator.tsx
15504
+ import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
15505
+ function buildClassChannels(slot, classPrefix, emitSharedClasses) {
15506
+ const classes = [];
15507
+ if (emitSharedClasses) classes.push(`rb-${slot}`);
15508
+ if (classPrefix) classes.push(`${classPrefix}-${slot}`);
15509
+ return classes;
15510
+ }
15511
+ function StepIndicator({
15512
+ currentStep,
15513
+ totalSteps,
15514
+ stepLabels,
15515
+ classPrefix,
15516
+ emitSharedClasses
15517
+ }) {
15518
+ const slotClass = (slot, modifier) => {
15519
+ const base = buildClassChannels(slot, classPrefix, emitSharedClasses);
15520
+ if (!modifier) return base.join(" ");
15521
+ const modified = buildClassChannels(
15522
+ `${slot}--${modifier}`,
15523
+ classPrefix,
15524
+ emitSharedClasses
15525
+ );
15526
+ return [...base, ...modified].join(" ");
15527
+ };
15528
+ return /* @__PURE__ */ jsx10("nav", { "aria-label": "Registration progress", className: slotClass("steps-nav"), children: /* @__PURE__ */ jsx10("ol", { className: slotClass("steps"), children: Array.from({ length: totalSteps }, (_, i) => {
15529
+ const stepNum = i + 1;
15530
+ const isActive = stepNum === currentStep;
15531
+ const isComplete = stepNum < currentStep;
15532
+ return /* @__PURE__ */ jsxs7(
15533
+ "li",
15534
+ {
15535
+ className: slotClass("step"),
15536
+ "aria-current": isActive ? "step" : void 0,
15537
+ children: [
15538
+ /* @__PURE__ */ jsx10(
15539
+ "div",
15540
+ {
15541
+ className: slotClass(
15542
+ "step-circle",
15543
+ isActive ? "active" : isComplete ? "completed" : void 0
15544
+ ),
15545
+ children: isComplete ? /* @__PURE__ */ jsx10(CheckIcon, { className: slotClass("step-check"), strokeWidth: 3 }) : stepNum
15546
+ }
15547
+ ),
15548
+ stepLabels?.[i] && /* @__PURE__ */ jsx10(
15549
+ "span",
15550
+ {
15551
+ className: slotClass(
15552
+ "step-label",
15553
+ isActive ? "active" : void 0
15554
+ ),
15555
+ children: stepLabels[i]
15556
+ }
15557
+ ),
15558
+ stepNum < totalSteps && /* @__PURE__ */ jsx10(
15559
+ "div",
15560
+ {
15561
+ className: slotClass(
15562
+ "step-connector",
15563
+ isComplete ? "completed" : void 0
15564
+ ),
15565
+ "aria-hidden": "true"
15566
+ }
15567
+ )
15568
+ ]
15569
+ },
15570
+ i
15571
+ );
15572
+ }) }) });
15573
+ }
15574
+
15299
15575
  // ../blocks/src/system/runtime/shared/components/DiscountCodeDisclosure.tsx
15300
15576
  import { useId } from "react";
15301
- import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
15577
+ import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
15302
15578
  var BLOCK_DISCOUNT_CODE_DISCLOSURE_CLASSES = {
15303
15579
  "course-registration": {
15304
15580
  root: "cr-discount",
@@ -15374,10 +15650,10 @@ function DiscountCodeDisclosure({
15374
15650
  onApply();
15375
15651
  };
15376
15652
  const feedbackClassName = feedback ? `${classes.feedback} status-${feedback.tone}` : classes.feedback;
15377
- return /* @__PURE__ */ jsx7("div", { className: classes.root, children: !isOpen ? /* @__PURE__ */ jsx7("button", { type: "button", className: classes.toggle, onClick: onOpen, children: toggleLabel }) : /* @__PURE__ */ jsxs6("div", { className: classes.form, children: [
15378
- /* @__PURE__ */ jsx7("label", { htmlFor: inputId, className: classes.label, children: label }),
15379
- /* @__PURE__ */ jsxs6("div", { className: classes.row, children: [
15380
- /* @__PURE__ */ jsx7(
15653
+ return /* @__PURE__ */ jsx11("div", { className: classes.root, children: !isOpen ? /* @__PURE__ */ jsx11("button", { type: "button", className: classes.toggle, onClick: onOpen, children: toggleLabel }) : /* @__PURE__ */ jsxs8("div", { className: classes.form, children: [
15654
+ /* @__PURE__ */ jsx11("label", { htmlFor: inputId, className: classes.label, children: label }),
15655
+ /* @__PURE__ */ jsxs8("div", { className: classes.row, children: [
15656
+ /* @__PURE__ */ jsx11(
15381
15657
  "input",
15382
15658
  {
15383
15659
  id: inputId,
@@ -15390,7 +15666,7 @@ function DiscountCodeDisclosure({
15390
15666
  disabled: disabled || isApplying
15391
15667
  }
15392
15668
  ),
15393
- onApply ? /* @__PURE__ */ jsx7(
15669
+ onApply ? /* @__PURE__ */ jsx11(
15394
15670
  "button",
15395
15671
  {
15396
15672
  type: "button",
@@ -15400,7 +15676,7 @@ function DiscountCodeDisclosure({
15400
15676
  children: isApplying ? "Applying..." : applyLabel
15401
15677
  }
15402
15678
  ) : null,
15403
- /* @__PURE__ */ jsx7(
15679
+ /* @__PURE__ */ jsx11(
15404
15680
  "button",
15405
15681
  {
15406
15682
  type: "button",
@@ -15411,8 +15687,8 @@ function DiscountCodeDisclosure({
15411
15687
  }
15412
15688
  )
15413
15689
  ] }),
15414
- /* @__PURE__ */ jsx7("p", { className: classes.hint, children: hint }),
15415
- feedback ? /* @__PURE__ */ jsx7(
15690
+ /* @__PURE__ */ jsx11("p", { className: classes.hint, children: hint }),
15691
+ feedback ? /* @__PURE__ */ jsx11(
15416
15692
  "p",
15417
15693
  {
15418
15694
  className: feedbackClassName,
@@ -15424,7 +15700,7 @@ function DiscountCodeDisclosure({
15424
15700
  }
15425
15701
 
15426
15702
  // ../blocks/src/system/runtime/shared/components/FieldValidationMessage.tsx
15427
- import { jsx as jsx8 } from "react/jsx-runtime";
15703
+ import { jsx as jsx12 } from "react/jsx-runtime";
15428
15704
  function getFieldValidationControlProps({
15429
15705
  message,
15430
15706
  messageId,
@@ -15443,7 +15719,7 @@ function FieldValidationMessage({
15443
15719
  className,
15444
15720
  live = "assertive"
15445
15721
  }) {
15446
- return /* @__PURE__ */ jsx8(
15722
+ return /* @__PURE__ */ jsx12(
15447
15723
  "p",
15448
15724
  {
15449
15725
  id,
@@ -15458,18 +15734,10 @@ function FieldValidationMessage({
15458
15734
  }
15459
15735
 
15460
15736
  // ../blocks/src/system/runtime/nodes/booking-form.default-ui.tsx
15461
- import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
15462
- var paymentOptionLayoutStyle = {
15463
- alignItems: "flex-start",
15464
- display: "flex",
15465
- flexDirection: "column",
15466
- gap: "0.25rem",
15467
- justifyContent: "flex-start",
15468
- width: "100%"
15469
- };
15470
- var summaryStackStyle = {
15471
- gap: "0.125rem"
15472
- };
15737
+ import { Fragment, jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
15738
+ function optionCardClassName(isSelected) {
15739
+ return `rb-option-card${isSelected ? " rb-option-card--selected" : ""}`;
15740
+ }
15473
15741
  function formatBookingAmount(amount, currency) {
15474
15742
  return formatCurrencyAmount(amount, currency, { decimals: "auto" });
15475
15743
  }
@@ -15478,6 +15746,7 @@ function HeadlessBookingDefaultForm({
15478
15746
  onSubmit
15479
15747
  }) {
15480
15748
  const currentStep = booking.currentStep;
15749
+ const errorSummaryId = React5.useId();
15481
15750
  const currentStepIndex = currentStep?.visibleIndex ?? 0;
15482
15751
  const isFirstStep = currentStepIndex === 0;
15483
15752
  const isLastStep = currentStepIndex === booking.steps.length - 1;
@@ -15490,20 +15759,34 @@ function HeadlessBookingDefaultForm({
15490
15759
  }
15491
15760
  };
15492
15761
  if (!currentStep) {
15493
- return /* @__PURE__ */ jsx9("div", { className: "rb-text-center rb-py-12", children: /* @__PURE__ */ jsx9("p", { className: "status-muted", children: "No steps available" }) });
15762
+ return /* @__PURE__ */ jsx13("div", { className: "rb-text-center rb-py-12", children: /* @__PURE__ */ jsx13("p", { className: "status-muted", children: "No steps available" }) });
15494
15763
  }
15495
- return /* @__PURE__ */ jsxs7("div", { className: "multi-step-form", children: [
15496
- /* @__PURE__ */ jsx9("div", { className: "rb-mb-8", children: /* @__PURE__ */ jsx9(
15497
- DefaultBookingProgress,
15764
+ return /* @__PURE__ */ jsxs9("div", { className: "multi-step-form", children: [
15765
+ booking.steps.length > 1 ? /* @__PURE__ */ jsx13(
15766
+ StepIndicator,
15498
15767
  {
15499
- steps: booking.steps,
15500
- currentIndex: currentStepIndex
15768
+ currentStep: currentStepIndex + 1,
15769
+ totalSteps: booking.steps.length,
15770
+ stepLabels: booking.steps.map((step) => step.label),
15771
+ emitSharedClasses: true
15772
+ }
15773
+ ) : null,
15774
+ /* @__PURE__ */ jsx13("div", { className: "step-content", children: /* @__PURE__ */ jsx13(
15775
+ DefaultBookingStepContent,
15776
+ {
15777
+ booking,
15778
+ errorSummaryId
15501
15779
  }
15502
15780
  ) }),
15503
- /* @__PURE__ */ jsx9("div", { className: "step-content", children: /* @__PURE__ */ jsx9(DefaultBookingStepContent, { booking }) }),
15504
- /* @__PURE__ */ jsx9(DefaultBookingErrorSummary, { errors: currentStep.errors }),
15505
- /* @__PURE__ */ jsxs7("div", { className: "rb-flex rb-gap-3 rb-mt-8", children: [
15506
- !isFirstStep ? /* @__PURE__ */ jsx9(
15781
+ /* @__PURE__ */ jsx13(
15782
+ DefaultBookingErrorSummary,
15783
+ {
15784
+ errors: currentStep.errors,
15785
+ id: errorSummaryId
15786
+ }
15787
+ ),
15788
+ /* @__PURE__ */ jsxs9("div", { className: "rb-wizard-actions", children: [
15789
+ !isFirstStep ? /* @__PURE__ */ jsx13(
15507
15790
  "button",
15508
15791
  {
15509
15792
  type: "button",
@@ -15512,7 +15795,7 @@ function HeadlessBookingDefaultForm({
15512
15795
  children: "Back"
15513
15796
  }
15514
15797
  ) : null,
15515
- /* @__PURE__ */ jsx9(
15798
+ /* @__PURE__ */ jsx13(
15516
15799
  "button",
15517
15800
  {
15518
15801
  type: "button",
@@ -15520,13 +15803,9 @@ function HeadlessBookingDefaultForm({
15520
15803
  void handlePrimaryAction();
15521
15804
  },
15522
15805
  disabled: isSubmitting,
15523
- className: themeButtonClassName({
15524
- variant: "primary",
15525
- size: "md",
15526
- extraClassName: "rb-flex-1"
15527
- }),
15528
- children: isSubmitting ? /* @__PURE__ */ jsxs7(Fragment2, { children: [
15529
- /* @__PURE__ */ jsx9(
15806
+ className: themeButtonClassName({ variant: "primary", size: "md" }),
15807
+ children: isSubmitting ? /* @__PURE__ */ jsxs9(Fragment, { children: [
15808
+ /* @__PURE__ */ jsx13(
15530
15809
  SpinnerNode,
15531
15810
  {
15532
15811
  size: "sm",
@@ -15540,61 +15819,32 @@ function HeadlessBookingDefaultForm({
15540
15819
  }
15541
15820
  )
15542
15821
  ] }),
15543
- /* @__PURE__ */ jsx9(DefaultBookingDiscount, { booking }),
15544
- /* @__PURE__ */ jsx9(DefaultBookingFeedback, { booking }),
15545
- /* @__PURE__ */ jsx9(DefaultBookingAltcha, { booking })
15822
+ /* @__PURE__ */ jsx13(DefaultBookingDiscount, { booking }),
15823
+ /* @__PURE__ */ jsx13(DefaultBookingFeedback, { booking }),
15824
+ /* @__PURE__ */ jsx13(DefaultBookingAltcha, { booking })
15546
15825
  ] });
15547
15826
  }
15548
- function DefaultBookingProgress({
15549
- steps,
15550
- currentIndex
15551
- }) {
15552
- return /* @__PURE__ */ jsx9("div", { className: "rb-flex rb-items-center rb-justify-between", children: steps.map((step, index) => {
15553
- const isActive = index === currentIndex;
15554
- const isCompleted = index < currentIndex;
15555
- const isLast = index === steps.length - 1;
15556
- return /* @__PURE__ */ jsxs7("div", { className: "rb-flex rb-items-center rb-flex-1", children: [
15557
- /* @__PURE__ */ jsxs7("div", { className: "rb-flex rb-items-center rb-gap-2 rb-cursor-default", children: [
15558
- /* @__PURE__ */ jsx9(
15559
- "div",
15560
- {
15561
- className: `
15562
- step-circle transition-theme-standard
15563
- ${isActive ? "step-circle-active" : ""}
15564
- ${isCompleted ? "step-circle-complete" : ""}
15565
- `,
15566
- children: isCompleted ? "\u2713" : index + 1
15567
- }
15568
- ),
15569
- /* @__PURE__ */ jsx9(
15570
- "span",
15571
- {
15572
- className: `
15573
- rb-caption rb-hidden rb-sm-inline
15574
- ${isCompleted || !isActive ? "status-muted" : ""}
15575
- `,
15576
- children: step.label
15577
- }
15578
- )
15579
- ] }),
15580
- !isLast ? /* @__PURE__ */ jsx9("div", { className: "step-connector rb-ml-2 rb-mr-2 rb-hidden rb-sm-block" }) : null
15581
- ] }, step.id);
15582
- }) });
15583
- }
15584
15827
  function DefaultBookingStepContent({
15585
- booking
15828
+ booking,
15829
+ errorSummaryId
15586
15830
  }) {
15587
15831
  const stepId = booking.currentStep?.id;
15588
15832
  if (!stepId) return null;
15589
15833
  switch (stepId) {
15590
15834
  case "service-selection":
15591
- return /* @__PURE__ */ jsx9(DefaultServiceSelectionStep, { booking });
15835
+ return /* @__PURE__ */ jsx13(DefaultServiceSelectionStep, { booking });
15592
15836
  case "datetime-selection":
15593
- return /* @__PURE__ */ jsx9(DefaultDateTimeSelectionStep, { booking });
15837
+ return /* @__PURE__ */ jsx13(
15838
+ DefaultDateTimeSelectionStep,
15839
+ {
15840
+ booking,
15841
+ errorSummaryId
15842
+ }
15843
+ );
15594
15844
  case "payment-selection":
15595
- return /* @__PURE__ */ jsx9(HeadlessBookingPaymentSelectionStep, { booking });
15845
+ return /* @__PURE__ */ jsx13(HeadlessBookingPaymentSelectionStep, { booking });
15596
15846
  case "custom-fields":
15597
- return /* @__PURE__ */ jsx9(DefaultDynamicFields, { fields: booking.fields.items, booking });
15847
+ return /* @__PURE__ */ jsx13(DefaultDynamicFields, { fields: booking.fields.items, booking });
15598
15848
  default:
15599
15849
  return assertNever4(stepId);
15600
15850
  }
@@ -15609,74 +15859,77 @@ function DefaultServiceSelectionStep({
15609
15859
  const showServiceSelect = booking.services.requiresSelection || services.length > 1;
15610
15860
  const showResourceSelect = booking.resources.requiresSelection || resources.length > 1;
15611
15861
  const allowAnyResource = !booking.resources.requiresSelection;
15612
- return /* @__PURE__ */ jsxs7("div", { className: "ab-stack", children: [
15613
- /* @__PURE__ */ jsxs7("div", { children: [
15614
- /* @__PURE__ */ jsx9("h2", { className: "ab-title", children: "Select Service" }),
15615
- /* @__PURE__ */ jsx9("p", { className: "ab-text ab-text--muted", children: "Choose the service you'd like to book" })
15862
+ return /* @__PURE__ */ jsxs9("div", { className: "rb-reg-stack", children: [
15863
+ /* @__PURE__ */ jsxs9("div", { children: [
15864
+ /* @__PURE__ */ jsx13("h2", { className: "ab-title", children: "Select Service" }),
15865
+ /* @__PURE__ */ jsx13("p", { className: "ab-text rb-on-surface--muted", children: "Choose the service you'd like to book" })
15616
15866
  ] }),
15617
- showServiceSelect ? /* @__PURE__ */ jsxs7("div", { className: "ab-stack--sm", children: [
15618
- /* @__PURE__ */ jsx9("label", { className: "ab-subtitle", children: "Service" }),
15619
- /* @__PURE__ */ jsx9("div", { className: "ab-grid", children: services.map((service) => {
15867
+ showServiceSelect ? /* @__PURE__ */ jsxs9("div", { className: "rb-reg-stack rb-reg-stack--sm", children: [
15868
+ /* @__PURE__ */ jsx13("span", { className: "ab-subtitle", children: "Service" }),
15869
+ /* @__PURE__ */ jsx13("div", { className: "rb-reg-grid", children: services.map((service) => {
15620
15870
  const isSelected = selectedServiceId === service.id;
15621
- return /* @__PURE__ */ jsx9(
15871
+ return /* @__PURE__ */ jsxs9(
15622
15872
  "button",
15623
15873
  {
15624
15874
  type: "button",
15625
15875
  onClick: () => booking.actions.selectService(service.id),
15626
- className: `ab-card ${isSelected ? "ab-card--selected" : ""}`,
15627
- children: /* @__PURE__ */ jsxs7("div", { className: "ab-row--between", children: [
15628
- /* @__PURE__ */ jsxs7("div", { children: [
15629
- /* @__PURE__ */ jsx9("div", { className: "ab-subtitle", children: service.title }),
15630
- service.description ? /* @__PURE__ */ jsx9("div", { className: "ab-text ab-text--muted", children: service.description }) : null,
15631
- service.durationMinutes ? /* @__PURE__ */ jsxs7("div", { className: "ab-text ab-text--muted", children: [
15876
+ className: optionCardClassName(isSelected),
15877
+ "aria-pressed": isSelected,
15878
+ children: [
15879
+ /* @__PURE__ */ jsxs9("div", { className: "rb-flex-1", children: [
15880
+ /* @__PURE__ */ jsx13("div", { className: "ab-subtitle", children: service.title }),
15881
+ service.description ? /* @__PURE__ */ jsx13("div", { className: "ab-text rb-on-surface--muted", children: service.description }) : null,
15882
+ service.durationMinutes ? /* @__PURE__ */ jsxs9("div", { className: "ab-text rb-on-surface--muted", children: [
15632
15883
  service.durationMinutes,
15633
15884
  " minutes"
15634
15885
  ] }) : null
15635
15886
  ] }),
15636
- isSelected ? /* @__PURE__ */ jsx9(SelectedCheck, {}) : null
15637
- ] })
15887
+ isSelected ? /* @__PURE__ */ jsx13(SelectedCheck, {}) : null
15888
+ ]
15638
15889
  },
15639
15890
  service.id
15640
15891
  );
15641
15892
  }) })
15642
15893
  ] }) : null,
15643
- booking.resources.state.tag === "loading" ? /* @__PURE__ */ jsxs7("div", { className: "ab-center", children: [
15644
- /* @__PURE__ */ jsx9(SpinnerNode, { size: "md", srLabel: "Loading practitioners" }),
15645
- /* @__PURE__ */ jsx9("p", { className: "ab-text ab-text--muted", children: "Loading practitioners..." })
15894
+ booking.resources.state.tag === "loading" ? /* @__PURE__ */ jsxs9("div", { className: "ab-center", children: [
15895
+ /* @__PURE__ */ jsx13(SpinnerNode, { size: "md", srLabel: "Loading practitioners" }),
15896
+ /* @__PURE__ */ jsx13("p", { className: "ab-text rb-on-surface--muted", children: "Loading practitioners..." })
15646
15897
  ] }) : null,
15647
- booking.resources.state.tag === "error" ? /* @__PURE__ */ jsx9(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: booking.resources.state.message }) : null,
15648
- showResourceSelect && booking.resources.state.tag === "loaded" && resources.length === 0 ? /* @__PURE__ */ jsx9(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: "No practitioners are available for this service right now." }) : null,
15649
- showResourceSelect && booking.resources.state.tag !== "loading" && (allowAnyResource || resources.length > 0) ? /* @__PURE__ */ jsxs7("div", { className: "ab-stack--sm", children: [
15650
- /* @__PURE__ */ jsxs7("label", { className: "ab-subtitle", children: [
15898
+ booking.resources.state.tag === "error" ? /* @__PURE__ */ jsx13(FeedbackMessage, { tone: "error", className: "alert alert-error", role: "alert", children: booking.resources.state.message }) : null,
15899
+ showResourceSelect && booking.resources.state.tag === "loaded" && resources.length === 0 ? /* @__PURE__ */ jsx13(FeedbackMessage, { tone: "error", className: "alert alert-error", role: "alert", children: "No practitioners are available for this service right now." }) : null,
15900
+ showResourceSelect && booking.resources.state.tag !== "loading" && (allowAnyResource || resources.length > 0) ? /* @__PURE__ */ jsxs9("div", { className: "rb-reg-stack rb-reg-stack--sm", children: [
15901
+ /* @__PURE__ */ jsxs9("span", { className: "ab-subtitle", children: [
15651
15902
  "Practitioner",
15652
15903
  booking.resources.requiresSelection ? "" : " (Optional)"
15653
15904
  ] }),
15654
- /* @__PURE__ */ jsx9("p", { className: "ab-text ab-text--muted", children: allowAnyResource ? 'Choose a specific practitioner or select "Any Available"' : "Choose the practitioner you'd like to book" }),
15655
- /* @__PURE__ */ jsxs7("div", { className: "ab-grid", children: [
15656
- allowAnyResource ? /* @__PURE__ */ jsx9(
15905
+ /* @__PURE__ */ jsx13("p", { className: "ab-text rb-on-surface--muted", children: allowAnyResource ? 'Choose a specific practitioner or select "Any Available"' : "Choose the practitioner you'd like to book" }),
15906
+ /* @__PURE__ */ jsxs9("div", { className: "rb-reg-grid", children: [
15907
+ allowAnyResource ? /* @__PURE__ */ jsxs9(
15657
15908
  "button",
15658
15909
  {
15659
15910
  type: "button",
15660
15911
  onClick: () => booking.actions.selectResource(null),
15661
- className: `ab-card ${!selectedResourceId ? "ab-card--selected" : ""}`,
15662
- children: /* @__PURE__ */ jsxs7("div", { className: "ab-row--between", children: [
15663
- /* @__PURE__ */ jsx9("div", { className: "ab-subtitle", children: "Any Available" }),
15664
- !selectedResourceId ? /* @__PURE__ */ jsx9(SelectedCheck, {}) : null
15665
- ] })
15912
+ className: optionCardClassName(!selectedResourceId),
15913
+ "aria-pressed": !selectedResourceId,
15914
+ children: [
15915
+ /* @__PURE__ */ jsx13("div", { className: "rb-flex-1 ab-subtitle", children: "Any Available" }),
15916
+ !selectedResourceId ? /* @__PURE__ */ jsx13(SelectedCheck, {}) : null
15917
+ ]
15666
15918
  }
15667
15919
  ) : null,
15668
15920
  resources.map((resource) => {
15669
15921
  const isSelected = selectedResourceId === resource.id;
15670
- return /* @__PURE__ */ jsx9(
15922
+ return /* @__PURE__ */ jsxs9(
15671
15923
  "button",
15672
15924
  {
15673
15925
  type: "button",
15674
15926
  onClick: () => booking.actions.selectResource(resource.id),
15675
- className: `ab-card ${isSelected ? "ab-card--selected" : ""}`,
15676
- children: /* @__PURE__ */ jsxs7("div", { className: "ab-row--between", children: [
15677
- /* @__PURE__ */ jsx9("div", { className: "ab-subtitle", children: resource.label }),
15678
- isSelected ? /* @__PURE__ */ jsx9(SelectedCheck, {}) : null
15679
- ] })
15927
+ className: optionCardClassName(isSelected),
15928
+ "aria-pressed": isSelected,
15929
+ children: [
15930
+ /* @__PURE__ */ jsx13("div", { className: "rb-flex-1 ab-subtitle", children: resource.label }),
15931
+ isSelected ? /* @__PURE__ */ jsx13(SelectedCheck, {}) : null
15932
+ ]
15680
15933
  },
15681
15934
  resource.id
15682
15935
  );
@@ -15686,28 +15939,31 @@ function DefaultServiceSelectionStep({
15686
15939
  ] });
15687
15940
  }
15688
15941
  function DefaultDateTimeSelectionStep({
15689
- booking
15942
+ booking,
15943
+ errorSummaryId
15690
15944
  }) {
15691
15945
  const selectedDate = booking.availability.selectedDate ?? "";
15692
- const selectedSlotStart = booking.availability.selectedSlot?.startAt ?? "";
15946
+ const selectedSlotKey = booking.availability.selectedSlot?.key ?? "";
15693
15947
  const singleService = booking.services.items.length === 1 ? booking.services.items[0] : void 0;
15694
- const slots = collapseHeadlessSlotsForDisplay({
15948
+ const slots = deriveBookingSlotDisplayOptions({
15695
15949
  slots: booking.availability.slots,
15696
15950
  hasSelectedResource: Boolean(booking.resources.selectedResourceId)
15697
15951
  });
15698
15952
  const error = booking.availability.datesState.tag === "error" ? booking.availability.datesState.message : booking.availability.slotsState.tag === "error" ? booking.availability.slotsState.message : null;
15699
- return /* @__PURE__ */ jsxs7("div", { className: "ab-stack", children: [
15700
- singleService ? /* @__PURE__ */ jsxs7("div", { className: "ab-info-box", children: [
15701
- /* @__PURE__ */ jsx9("h3", { className: "ab-subtitle", children: singleService.title }),
15702
- singleService.description ? /* @__PURE__ */ jsx9("p", { className: "ab-text ab-text--muted", children: singleService.description }) : null,
15703
- singleService.durationMinutes ? /* @__PURE__ */ jsxs7("p", { className: "ab-text ab-text--muted", children: [
15953
+ const hasValidationError = Boolean(booking.currentStep?.errors.formError);
15954
+ const validationDescribedBy = hasValidationError ? errorSummaryId : void 0;
15955
+ return /* @__PURE__ */ jsxs9("div", { className: "rb-reg-stack", children: [
15956
+ singleService ? /* @__PURE__ */ jsxs9("div", { className: "rb-reg-summary", children: [
15957
+ /* @__PURE__ */ jsx13("h3", { className: "ab-subtitle", children: singleService.title }),
15958
+ singleService.description ? /* @__PURE__ */ jsx13("p", { className: "ab-text rb-on-surface--muted", children: singleService.description }) : null,
15959
+ singleService.durationMinutes ? /* @__PURE__ */ jsxs9("p", { className: "ab-text rb-on-surface--muted", children: [
15704
15960
  "Duration: ",
15705
15961
  singleService.durationMinutes,
15706
15962
  " minutes"
15707
15963
  ] }) : null
15708
15964
  ] }) : null,
15709
- error ? /* @__PURE__ */ jsx9(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: error }) : null,
15710
- /* @__PURE__ */ jsx9(
15965
+ error ? /* @__PURE__ */ jsx13(FeedbackMessage, { tone: "error", className: "alert alert-error", role: "alert", children: error }) : null,
15966
+ /* @__PURE__ */ jsx13(
15711
15967
  DatePicker,
15712
15968
  {
15713
15969
  value: selectedDate,
@@ -15715,23 +15971,26 @@ function DefaultDateTimeSelectionStep({
15715
15971
  dateOptions: [...booking.availability.availableDates],
15716
15972
  isLoading: booking.availability.datesState.tag === "loading",
15717
15973
  isEmpty: booking.availability.datesState.tag !== "loading" && booking.availability.availableDates.length === 0,
15974
+ ariaDescribedBy: validationDescribedBy,
15975
+ ariaInvalid: hasValidationError,
15718
15976
  hasMore: booking.availability.hasMoreDates,
15719
15977
  onLoadMore: booking.availability.loadMoreDates
15720
15978
  }
15721
15979
  ),
15722
- selectedDate ? /* @__PURE__ */ jsx9(
15980
+ selectedDate ? /* @__PURE__ */ jsx13(
15723
15981
  TimeSlotSelector,
15724
15982
  {
15725
- value: selectedSlotStart,
15726
- onChange: (slotStartTime) => {
15983
+ value: selectedSlotKey,
15984
+ onChange: (slotKey) => {
15727
15985
  booking.actions.selectSlot(
15728
- booking.availability.slots.find(
15729
- (slot) => slot.startAt === slotStartTime
15730
- ) ?? null
15986
+ slots.find((slot) => slot.key === slotKey)?.slot ?? null
15731
15987
  );
15732
15988
  },
15733
15989
  slots,
15734
- isLoading: booking.availability.slotsState.tag === "loading"
15990
+ isLoading: booking.availability.slotsState.tag === "loading",
15991
+ timezone: booking.availability.timezone,
15992
+ ariaDescribedBy: validationDescribedBy,
15993
+ ariaInvalid: hasValidationError
15735
15994
  }
15736
15995
  ) : null
15737
15996
  ] });
@@ -15742,33 +16001,33 @@ function HeadlessBookingPaymentSelectionStep({
15742
16001
  const service = booking.services.selected;
15743
16002
  const viewModel = booking.payment.selection;
15744
16003
  if (booking.payment.kind === "unsupported") {
15745
- return /* @__PURE__ */ jsx9(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: booking.payment.errorMessage });
16004
+ return /* @__PURE__ */ jsx13(FeedbackMessage, { tone: "error", className: "alert alert-error", role: "alert", children: booking.payment.errorMessage });
15746
16005
  }
15747
16006
  if (!service || !viewModel) {
15748
- return /* @__PURE__ */ jsx9(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: "Payment options are unavailable for this service right now." });
16007
+ return /* @__PURE__ */ jsx13(FeedbackMessage, { tone: "error", className: "alert alert-error", role: "alert", children: "Payment options are unavailable for this service right now." });
15749
16008
  }
15750
16009
  const packageOptions = booking.payment.appointmentPackages.items;
15751
16010
  const hasPackageOptions = packageOptions.length > 0;
15752
16011
  const slidingScale = booking.payment.slidingScale;
15753
- return /* @__PURE__ */ jsxs7("div", { className: "ab-stack", children: [
15754
- /* @__PURE__ */ jsxs7("div", { className: "ab-info-box", children: [
15755
- /* @__PURE__ */ jsx9("h3", { className: "ab-subtitle", children: viewModel.sectionTitle }),
15756
- /* @__PURE__ */ jsx9("p", { className: "ab-text ab-text--muted", children: service.title })
16012
+ return /* @__PURE__ */ jsxs9("div", { className: "rb-reg-stack", children: [
16013
+ /* @__PURE__ */ jsxs9("div", { className: "rb-reg-summary", children: [
16014
+ /* @__PURE__ */ jsx13("h3", { className: "ab-subtitle", children: viewModel.sectionTitle }),
16015
+ /* @__PURE__ */ jsx13("p", { className: "ab-text rb-on-surface--muted", children: service.title })
15757
16016
  ] }),
15758
- booking.payment.appointmentPackages.state.tag === "loading" ? /* @__PURE__ */ jsx9(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info", role: "status", children: "Checking package credits..." }) : null,
15759
- booking.payment.appointmentPackages.state.tag === "error" ? /* @__PURE__ */ jsxs7(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info", role: "status", children: [
16017
+ booking.payment.appointmentPackages.state.tag === "loading" ? /* @__PURE__ */ jsx13(FeedbackMessage, { tone: "info", className: "alert alert-info", role: "status", children: "Checking package credits..." }) : null,
16018
+ booking.payment.appointmentPackages.state.tag === "error" ? /* @__PURE__ */ jsxs9(FeedbackMessage, { tone: "info", className: "alert alert-info", role: "status", children: [
15760
16019
  booking.payment.appointmentPackages.state.message,
15761
16020
  " You can continue with the normal payment option."
15762
16021
  ] }) : null,
15763
- slidingScale ? /* @__PURE__ */ jsxs7("div", { className: "rb-space-y-2", children: [
15764
- /* @__PURE__ */ jsx9("label", { htmlFor: "appointment-sliding-amount", className: "form-label", children: "Choose your price" }),
15765
- /* @__PURE__ */ jsxs7("p", { className: "rb-caption status-muted", children: [
16022
+ slidingScale ? /* @__PURE__ */ jsxs9("div", { className: "rb-space-y-2", children: [
16023
+ /* @__PURE__ */ jsx13("label", { htmlFor: "appointment-sliding-amount", className: "form-label", children: "Choose your price" }),
16024
+ /* @__PURE__ */ jsxs9("p", { className: "rb-caption status-muted", children: [
15766
16025
  formatBookingAmount(slidingScale.minAmount, slidingScale.currency),
15767
16026
  " to ",
15768
16027
  formatBookingAmount(slidingScale.maxAmount, slidingScale.currency),
15769
16028
  slidingScale.suggestedAmount !== null ? `, suggested ${formatBookingAmount(slidingScale.suggestedAmount, slidingScale.currency)}` : ""
15770
16029
  ] }),
15771
- /* @__PURE__ */ jsx9(
16030
+ /* @__PURE__ */ jsx13(
15772
16031
  "input",
15773
16032
  {
15774
16033
  id: "appointment-sliding-amount",
@@ -15782,47 +16041,47 @@ function HeadlessBookingPaymentSelectionStep({
15782
16041
  }
15783
16042
  )
15784
16043
  ] }) : null,
15785
- /* @__PURE__ */ jsxs7("div", { className: "ab-stack", role: "list", "aria-label": "Payment options", children: [
15786
- packageOptions.map((appointmentPackage) => {
15787
- const isSelected = booking.payment.selectedAppointmentPackageId === appointmentPackage.customerPassId;
15788
- return /* @__PURE__ */ jsx9(
15789
- "button",
15790
- {
15791
- type: "button",
15792
- className: themeButtonClassName({
15793
- variant: isSelected ? "primary" : "outline",
15794
- size: "md"
15795
- }),
15796
- style: paymentOptionLayoutStyle,
15797
- onClick: () => booking.actions.selectAppointmentPackage(
15798
- appointmentPackage.customerPassId
15799
- ),
15800
- "aria-pressed": isSelected,
15801
- children: /* @__PURE__ */ jsx9(
15802
- PaymentOptionContent,
16044
+ /* @__PURE__ */ jsxs9(
16045
+ "div",
16046
+ {
16047
+ className: "rb-reg-stack rb-reg-stack--sm",
16048
+ role: "list",
16049
+ "aria-label": "Payment options",
16050
+ children: [
16051
+ packageOptions.map((appointmentPackage) => {
16052
+ const isSelected = booking.payment.selectedAppointmentPackageId === appointmentPackage.customerPassId;
16053
+ return /* @__PURE__ */ jsxs9(
16054
+ "button",
15803
16055
  {
15804
- id: appointmentPackage.customerPassId,
15805
- title: appointmentPackage.passName,
15806
- description: "Use 1 package credit",
15807
- summaryRows: [{
15808
- label: "Balance",
15809
- value: `${appointmentPackage.creditsRemaining} of ${appointmentPackage.creditsTotal} credits remaining`
15810
- }]
15811
- }
15812
- )
15813
- },
15814
- appointmentPackage.customerPassId
15815
- );
15816
- }),
15817
- viewModel.options.map((option) => {
15818
- const isSelected = !booking.payment.selectedAppointmentPackageId && (booking.payment.selectedCollectionOptionKind === option.kind || viewModel.mode === "single_option");
15819
- if (viewModel.mode === "single_option" && !hasPackageOptions) {
15820
- return /* @__PURE__ */ jsx9(
15821
- "div",
15822
- {
15823
- className: "ab-card",
15824
- style: paymentOptionLayoutStyle,
15825
- children: /* @__PURE__ */ jsx9(
16056
+ type: "button",
16057
+ className: optionCardClassName(isSelected),
16058
+ onClick: () => booking.actions.selectAppointmentPackage(
16059
+ appointmentPackage.customerPassId
16060
+ ),
16061
+ "aria-pressed": isSelected,
16062
+ children: [
16063
+ /* @__PURE__ */ jsx13(
16064
+ PaymentOptionContent,
16065
+ {
16066
+ id: appointmentPackage.customerPassId,
16067
+ title: appointmentPackage.passName,
16068
+ description: "Use 1 package credit",
16069
+ summaryRows: [{
16070
+ label: "Balance",
16071
+ value: `${appointmentPackage.creditsRemaining} of ${appointmentPackage.creditsTotal} credits remaining`
16072
+ }]
16073
+ }
16074
+ ),
16075
+ isSelected ? /* @__PURE__ */ jsx13(SelectedCheck, {}) : null
16076
+ ]
16077
+ },
16078
+ appointmentPackage.customerPassId
16079
+ );
16080
+ }),
16081
+ viewModel.options.map((option) => {
16082
+ const isSelected = !booking.payment.selectedAppointmentPackageId && (booking.payment.selectedCollectionOptionKind === option.kind || viewModel.mode === "single_option");
16083
+ if (viewModel.mode === "single_option" && !hasPackageOptions) {
16084
+ return /* @__PURE__ */ jsx13("div", { className: "rb-reg-summary", children: /* @__PURE__ */ jsx13(
15826
16085
  PaymentOptionContent,
15827
16086
  {
15828
16087
  id: option.kind,
@@ -15831,37 +16090,35 @@ function HeadlessBookingPaymentSelectionStep({
15831
16090
  summaryRows: option.summaryRows,
15832
16091
  helperText: option.helperText
15833
16092
  }
15834
- )
15835
- },
15836
- option.kind
15837
- );
15838
- }
15839
- return /* @__PURE__ */ jsx9(
15840
- "button",
15841
- {
15842
- type: "button",
15843
- className: themeButtonClassName({
15844
- variant: isSelected ? "primary" : "outline",
15845
- size: "md"
15846
- }),
15847
- style: paymentOptionLayoutStyle,
15848
- onClick: () => booking.actions.selectPaymentOption(option.kind),
15849
- "aria-pressed": isSelected,
15850
- children: /* @__PURE__ */ jsx9(
15851
- PaymentOptionContent,
16093
+ ) }, option.kind);
16094
+ }
16095
+ return /* @__PURE__ */ jsxs9(
16096
+ "button",
15852
16097
  {
15853
- id: option.kind,
15854
- title: option.title,
15855
- description: option.description,
15856
- summaryRows: option.summaryRows,
15857
- helperText: option.helperText
15858
- }
15859
- )
15860
- },
15861
- option.kind
15862
- );
15863
- })
15864
- ] })
16098
+ type: "button",
16099
+ className: optionCardClassName(isSelected),
16100
+ onClick: () => booking.actions.selectPaymentOption(option.kind),
16101
+ "aria-pressed": isSelected,
16102
+ children: [
16103
+ /* @__PURE__ */ jsx13(
16104
+ PaymentOptionContent,
16105
+ {
16106
+ id: option.kind,
16107
+ title: option.title,
16108
+ description: option.description,
16109
+ summaryRows: option.summaryRows,
16110
+ helperText: option.helperText
16111
+ }
16112
+ ),
16113
+ isSelected ? /* @__PURE__ */ jsx13(SelectedCheck, {}) : null
16114
+ ]
16115
+ },
16116
+ option.kind
16117
+ );
16118
+ })
16119
+ ]
16120
+ }
16121
+ )
15865
16122
  ] });
15866
16123
  }
15867
16124
  function PaymentOptionContent({
@@ -15871,22 +16128,22 @@ function PaymentOptionContent({
15871
16128
  summaryRows,
15872
16129
  title
15873
16130
  }) {
15874
- return /* @__PURE__ */ jsxs7(Fragment2, { children: [
15875
- /* @__PURE__ */ jsx9("span", { children: title }),
15876
- /* @__PURE__ */ jsx9("span", { className: "ab-text ab-text--muted", children: description }),
15877
- /* @__PURE__ */ jsx9("div", { className: "ab-stack", style: summaryStackStyle, children: summaryRows.map((row) => /* @__PURE__ */ jsxs7("span", { className: "ab-text ab-text--muted", children: [
16131
+ return /* @__PURE__ */ jsxs9("div", { className: "rb-flex-1", children: [
16132
+ /* @__PURE__ */ jsx13("div", { className: "ab-subtitle", children: title }),
16133
+ /* @__PURE__ */ jsx13("div", { className: "ab-text rb-on-surface--muted", children: description }),
16134
+ /* @__PURE__ */ jsx13("div", { className: "ab-option-rows", children: summaryRows.map((row) => /* @__PURE__ */ jsxs9("span", { className: "ab-text rb-on-surface--muted", children: [
15878
16135
  row.label,
15879
16136
  ": ",
15880
16137
  row.value
15881
16138
  ] }, `${id}-${row.label}`)) }),
15882
- helperText ? /* @__PURE__ */ jsx9("span", { className: "ab-text ab-text--muted", children: helperText }) : null
16139
+ helperText ? /* @__PURE__ */ jsx13("div", { className: "ab-text rb-on-surface--muted", children: helperText }) : null
15883
16140
  ] });
15884
16141
  }
15885
16142
  function DefaultDynamicFields({
15886
16143
  booking,
15887
16144
  fields
15888
16145
  }) {
15889
- return /* @__PURE__ */ jsx9("div", { className: "rb-space-y-6", children: fields.map((field) => /* @__PURE__ */ jsx9(DefaultDynamicField, { booking, field }, field.id)) });
16146
+ return /* @__PURE__ */ jsx13("div", { className: "rb-space-y-6", children: fields.map((field) => /* @__PURE__ */ jsx13(DefaultDynamicField, { booking, field }, field.id)) });
15890
16147
  }
15891
16148
  function DefaultDynamicField({
15892
16149
  booking,
@@ -15896,13 +16153,13 @@ function DefaultDynamicField({
15896
16153
  const error = field.error;
15897
16154
  const errorId = error ? field.errorId ?? `${field.inputId}-error` : null;
15898
16155
  const describedBy = [field.helpTextId, errorId].filter(Boolean).join(" ") || void 0;
15899
- return /* @__PURE__ */ jsxs7("div", { className: "rb-space-y-2", children: [
15900
- /* @__PURE__ */ jsxs7("label", { id: field.labelId, htmlFor: field.inputId, className: "form-label", children: [
16156
+ return /* @__PURE__ */ jsxs9("div", { className: "rb-space-y-2", children: [
16157
+ /* @__PURE__ */ jsxs9("label", { id: field.labelId, htmlFor: field.inputId, className: "form-label", children: [
15901
16158
  field.label,
15902
- field.required ? /* @__PURE__ */ jsx9("span", { className: "required-marker", children: "*" }) : null
16159
+ field.required ? /* @__PURE__ */ jsx13("span", { className: "required-marker", children: "*" }) : null
15903
16160
  ] }),
15904
- field.helpText ? /* @__PURE__ */ jsx9("p", { id: field.helpTextId ?? void 0, className: "rb-caption status-muted", children: field.helpText }) : null,
15905
- /* @__PURE__ */ jsx9(
16161
+ field.helpText ? /* @__PURE__ */ jsx13("p", { id: field.helpTextId ?? void 0, className: "rb-caption status-muted", children: field.helpText }) : null,
16162
+ /* @__PURE__ */ jsx13(
15906
16163
  DefaultFieldInput,
15907
16164
  {
15908
16165
  field,
@@ -15914,7 +16171,7 @@ function DefaultDynamicField({
15914
16171
  describedBy
15915
16172
  }
15916
16173
  ),
15917
- error ? /* @__PURE__ */ jsx9(
16174
+ error ? /* @__PURE__ */ jsx13(
15918
16175
  FieldValidationMessage,
15919
16176
  {
15920
16177
  id: errorId ?? `${field.inputId}-error`,
@@ -15948,7 +16205,7 @@ function DefaultFieldInput({
15948
16205
  };
15949
16206
  switch (field.type) {
15950
16207
  case "textarea":
15951
- return /* @__PURE__ */ jsx9(
16208
+ return /* @__PURE__ */ jsx13(
15952
16209
  "textarea",
15953
16210
  {
15954
16211
  ...commonProps,
@@ -15963,7 +16220,7 @@ function DefaultFieldInput({
15963
16220
  );
15964
16221
  case "select":
15965
16222
  if (field.field.multiple) {
15966
- return /* @__PURE__ */ jsx9(
16223
+ return /* @__PURE__ */ jsx13(
15967
16224
  "select",
15968
16225
  {
15969
16226
  ...commonProps,
@@ -15976,11 +16233,11 @@ function DefaultFieldInput({
15976
16233
  },
15977
16234
  multiple: true,
15978
16235
  className: "form-select rb-h-32",
15979
- children: field.field.options?.map((option) => /* @__PURE__ */ jsx9("option", { value: option.value, children: option.label }, option.value))
16236
+ children: field.field.options?.map((option) => /* @__PURE__ */ jsx13("option", { value: option.value, children: option.label }, option.value))
15980
16237
  }
15981
16238
  );
15982
16239
  }
15983
- return /* @__PURE__ */ jsxs7(
16240
+ return /* @__PURE__ */ jsxs9(
15984
16241
  "select",
15985
16242
  {
15986
16243
  ...commonProps,
@@ -15988,14 +16245,14 @@ function DefaultFieldInput({
15988
16245
  onChange: (event) => onChange(event.target.value),
15989
16246
  className: "form-select",
15990
16247
  children: [
15991
- /* @__PURE__ */ jsx9("option", { value: "", children: "Select an option..." }),
15992
- field.field.options?.map((option) => /* @__PURE__ */ jsx9("option", { value: option.value, children: option.label }, option.value))
16248
+ /* @__PURE__ */ jsx13("option", { value: "", children: "Select an option..." }),
16249
+ field.field.options?.map((option) => /* @__PURE__ */ jsx13("option", { value: option.value, children: option.label }, option.value))
15993
16250
  ]
15994
16251
  }
15995
16252
  );
15996
16253
  case "radio":
15997
- return /* @__PURE__ */ jsx9("div", { className: "rb-space-y-2", children: field.field.options?.map((option) => /* @__PURE__ */ jsxs7("label", { className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer", children: [
15998
- /* @__PURE__ */ jsx9(
16254
+ return /* @__PURE__ */ jsx13("div", { className: "rb-space-y-2", children: field.field.options?.map((option) => /* @__PURE__ */ jsxs9("label", { className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer", children: [
16255
+ /* @__PURE__ */ jsx13(
15999
16256
  "input",
16000
16257
  {
16001
16258
  type: "radio",
@@ -16009,13 +16266,13 @@ function DefaultFieldInput({
16009
16266
  className: "form-radio"
16010
16267
  }
16011
16268
  ),
16012
- /* @__PURE__ */ jsx9("span", { className: "rb-caption", children: option.label })
16269
+ /* @__PURE__ */ jsx13("span", { className: "rb-caption", children: option.label })
16013
16270
  ] }, option.value)) });
16014
16271
  case "checkbox":
16015
16272
  if (field.field.options && field.field.options.length > 1) {
16016
16273
  const checkedValues = toStringArray(value);
16017
- return /* @__PURE__ */ jsx9("div", { className: "rb-space-y-2", children: field.field.options.map((option) => /* @__PURE__ */ jsxs7("label", { className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer", children: [
16018
- /* @__PURE__ */ jsx9(
16274
+ return /* @__PURE__ */ jsx13("div", { className: "rb-space-y-2", children: field.field.options.map((option) => /* @__PURE__ */ jsxs9("label", { className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer", children: [
16275
+ /* @__PURE__ */ jsx13(
16019
16276
  "input",
16020
16277
  {
16021
16278
  type: "checkbox",
@@ -16032,11 +16289,11 @@ function DefaultFieldInput({
16032
16289
  className: "form-checkbox"
16033
16290
  }
16034
16291
  ),
16035
- /* @__PURE__ */ jsx9("span", { className: "rb-caption", children: option.label })
16292
+ /* @__PURE__ */ jsx13("span", { className: "rb-caption", children: option.label })
16036
16293
  ] }, option.value)) });
16037
16294
  }
16038
- return /* @__PURE__ */ jsxs7("label", { className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer", children: [
16039
- /* @__PURE__ */ jsx9(
16295
+ return /* @__PURE__ */ jsxs9("label", { className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer", children: [
16296
+ /* @__PURE__ */ jsx13(
16040
16297
  "input",
16041
16298
  {
16042
16299
  type: "checkbox",
@@ -16050,11 +16307,11 @@ function DefaultFieldInput({
16050
16307
  className: "form-checkbox"
16051
16308
  }
16052
16309
  ),
16053
- /* @__PURE__ */ jsx9("span", { className: "rb-caption", children: field.field.placeholder || field.label })
16310
+ /* @__PURE__ */ jsx13("span", { className: "rb-caption", children: field.field.placeholder || field.label })
16054
16311
  ] });
16055
16312
  case "booking_requirement_consent":
16056
- return /* @__PURE__ */ jsxs7("label", { className: "rb-flex rb-items-start rb-gap-2 rb-cursor-pointer", children: [
16057
- /* @__PURE__ */ jsx9(
16313
+ return /* @__PURE__ */ jsxs9("label", { className: "rb-flex rb-items-start rb-gap-2 rb-cursor-pointer", children: [
16314
+ /* @__PURE__ */ jsx13(
16058
16315
  "input",
16059
16316
  {
16060
16317
  type: "checkbox",
@@ -16068,10 +16325,10 @@ function DefaultFieldInput({
16068
16325
  className: "form-checkbox rb-mt-0.5"
16069
16326
  }
16070
16327
  ),
16071
- /* @__PURE__ */ jsx9("span", { className: "rb-caption", children: field.field.placeholder || field.label })
16328
+ /* @__PURE__ */ jsx13("span", { className: "rb-caption", children: field.field.placeholder || field.label })
16072
16329
  ] });
16073
16330
  case "number":
16074
- return /* @__PURE__ */ jsx9(
16331
+ return /* @__PURE__ */ jsx13(
16075
16332
  "input",
16076
16333
  {
16077
16334
  ...commonProps,
@@ -16085,7 +16342,7 @@ function DefaultFieldInput({
16085
16342
  }
16086
16343
  );
16087
16344
  case "date":
16088
- return /* @__PURE__ */ jsx9(
16345
+ return /* @__PURE__ */ jsx13(
16089
16346
  "input",
16090
16347
  {
16091
16348
  ...commonProps,
@@ -16098,7 +16355,7 @@ function DefaultFieldInput({
16098
16355
  }
16099
16356
  );
16100
16357
  case "time":
16101
- return /* @__PURE__ */ jsx9(
16358
+ return /* @__PURE__ */ jsx13(
16102
16359
  "input",
16103
16360
  {
16104
16361
  ...commonProps,
@@ -16112,7 +16369,7 @@ function DefaultFieldInput({
16112
16369
  case "email":
16113
16370
  case "tel":
16114
16371
  case "url":
16115
- return /* @__PURE__ */ jsx9(
16372
+ return /* @__PURE__ */ jsx13(
16116
16373
  "input",
16117
16374
  {
16118
16375
  ...commonProps,
@@ -16136,8 +16393,8 @@ function DefaultBookingDiscount({
16136
16393
  }) {
16137
16394
  const shouldShowDiscountSection = !booking.payment.selectedAppointmentPackageId && !booking.discount.loading && (booking.discount.manualCodeEntryAllowed || Boolean(booking.discount.autoAppliedDiscount));
16138
16395
  if (!shouldShowDiscountSection) return null;
16139
- return /* @__PURE__ */ jsxs7("div", { className: "rb-mt-6", children: [
16140
- booking.discount.manualCodeEntryAllowed ? /* @__PURE__ */ jsx9(
16396
+ return /* @__PURE__ */ jsxs9("div", { className: "rb-mt-6", children: [
16397
+ booking.discount.manualCodeEntryAllowed ? /* @__PURE__ */ jsx13(
16141
16398
  DiscountCodeDisclosure,
16142
16399
  {
16143
16400
  surface: "theme-form",
@@ -16151,7 +16408,7 @@ function DefaultBookingDiscount({
16151
16408
  }
16152
16409
  }
16153
16410
  ) : null,
16154
- booking.discount.autoAppliedDiscount && booking.discount.code.trim().length === 0 ? /* @__PURE__ */ jsx9(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info rb-mt-4", role: "status", children: /* @__PURE__ */ jsxs7("p", { className: "ab-text", children: [
16411
+ booking.discount.autoAppliedDiscount && booking.discount.code.trim().length === 0 ? /* @__PURE__ */ jsx13(FeedbackMessage, { tone: "info", className: "alert alert-info rb-mt-4", role: "status", children: /* @__PURE__ */ jsxs9("p", { className: "ab-text", children: [
16155
16412
  "Discount available: ",
16156
16413
  booking.discount.autoAppliedDiscount.publicLabel,
16157
16414
  " ",
@@ -16163,9 +16420,9 @@ function DefaultBookingFeedback({
16163
16420
  booking
16164
16421
  }) {
16165
16422
  if (booking.feedback.kind !== "error") return null;
16166
- return /* @__PURE__ */ jsxs7(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: [
16167
- /* @__PURE__ */ jsx9("p", { className: "ab-text", children: booking.feedback.message }),
16168
- /* @__PURE__ */ jsx9(
16423
+ return /* @__PURE__ */ jsxs9(FeedbackMessage, { tone: "error", className: "alert alert-error rb-mt-4", role: "alert", children: [
16424
+ /* @__PURE__ */ jsx13("p", { className: "ab-text", children: booking.feedback.message }),
16425
+ /* @__PURE__ */ jsx13(
16169
16426
  "button",
16170
16427
  {
16171
16428
  type: "button",
@@ -16180,7 +16437,7 @@ function DefaultBookingAltcha({
16180
16437
  booking
16181
16438
  }) {
16182
16439
  if (!booking.spamProtection.enabled) return null;
16183
- return /* @__PURE__ */ jsx9("div", { className: "ab-altcha", children: /* @__PURE__ */ jsx9(
16440
+ return /* @__PURE__ */ jsx13("div", { className: "ab-altcha", children: /* @__PURE__ */ jsx13(
16184
16441
  AltchaWidget,
16185
16442
  {
16186
16443
  challengeUrl: booking.spamProtection.challenge.url,
@@ -16189,43 +16446,26 @@ function DefaultBookingAltcha({
16189
16446
  ) });
16190
16447
  }
16191
16448
  function DefaultBookingErrorSummary({
16192
- errors
16449
+ errors,
16450
+ id
16193
16451
  }) {
16194
16452
  if (!hasBookingValidationErrors(errors)) return null;
16195
- return /* @__PURE__ */ jsxs7(FeedbackMessage, { tone: "error", className: "rb-mt-6 alert alert-error", role: "alert", children: [
16196
- errors.formError ? /* @__PURE__ */ jsx9("p", { className: "rb-caption", children: /* @__PURE__ */ jsx9("strong", { children: errors.formError }) }) : null,
16197
- Object.entries(errors.fieldErrors).map(([key, message]) => /* @__PURE__ */ jsx9("p", { className: "rb-caption", children: message }, key))
16198
- ] });
16199
- }
16200
- function SelectedCheck() {
16201
- return /* @__PURE__ */ jsx9("div", { className: "ab-check", children: /* @__PURE__ */ jsx9(
16202
- "svg",
16453
+ return /* @__PURE__ */ jsxs9(
16454
+ FeedbackMessage,
16203
16455
  {
16204
- fill: "none",
16205
- strokeLinecap: "round",
16206
- strokeLinejoin: "round",
16207
- strokeWidth: "2",
16208
- viewBox: "0 0 24 24",
16209
- stroke: "currentColor",
16210
- children: /* @__PURE__ */ jsx9("path", { d: "M5 13l4 4L19 7" })
16456
+ tone: "error",
16457
+ className: "rb-mt-6 alert alert-error",
16458
+ id,
16459
+ role: "alert",
16460
+ children: [
16461
+ errors.formError ? /* @__PURE__ */ jsx13("p", { className: "rb-caption", children: /* @__PURE__ */ jsx13("strong", { children: errors.formError }) }) : null,
16462
+ Object.entries(errors.fieldErrors).map(([key, message]) => /* @__PURE__ */ jsx13("p", { className: "rb-caption", children: message }, key))
16463
+ ]
16211
16464
  }
16212
- ) });
16465
+ );
16213
16466
  }
16214
- function collapseHeadlessSlotsForDisplay(input) {
16215
- const seenStartTimes = /* @__PURE__ */ new Set();
16216
- const visibleSlots = [];
16217
- for (const slot of input.slots) {
16218
- if (!input.hasSelectedResource) {
16219
- if (seenStartTimes.has(slot.startAt)) continue;
16220
- seenStartTimes.add(slot.startAt);
16221
- }
16222
- visibleSlots.push({
16223
- startAt: slot.startAt,
16224
- endAt: slot.endAt,
16225
- resourceId: unsafeAsAppointmentResourceId(slot.resourceId)
16226
- });
16227
- }
16228
- return visibleSlots;
16467
+ function SelectedCheck() {
16468
+ return /* @__PURE__ */ jsx13("div", { className: "rb-option-check", children: /* @__PURE__ */ jsx13(CheckIcon, {}) });
16229
16469
  }
16230
16470
 
16231
16471
  // ../blocks/src/system/runtime/shared/utils/checkoutUrls.ts
@@ -16274,7 +16514,7 @@ function consumeSearchParam(paramName) {
16274
16514
  }
16275
16515
 
16276
16516
  // ../blocks/src/system/runtime/nodes/booking-form.client.tsx
16277
- import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
16517
+ import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
16278
16518
  var PORTAL_REBOOK_QUERY_PARAM = "rebook";
16279
16519
  var PORTAL_REBOOK_QUERY_VALUE = "1";
16280
16520
  var REBOOK_COMPLETION_MODE_VERIFIED_CHECKOUT = "verified_checkout";
@@ -16299,6 +16539,14 @@ function appendRebookFlag(url, enabled) {
16299
16539
  );
16300
16540
  return nextUrl.toString();
16301
16541
  }
16542
+ function BookingSurface({
16543
+ id,
16544
+ className,
16545
+ children
16546
+ }) {
16547
+ const classes = ["rb-reg-surface", className ?? ""].join(" ").trim();
16548
+ return /* @__PURE__ */ jsx14("div", { id, className: classes, children });
16549
+ }
16302
16550
  var BookingFormClient = ({
16303
16551
  siteId: siteIdProp,
16304
16552
  render
@@ -16335,7 +16583,7 @@ var BookingFormClient = ({
16335
16583
  successMessage: render.display.successMessage ?? void 0,
16336
16584
  viewerTimeZone
16337
16585
  });
16338
- React3.useEffect(() => {
16586
+ React6.useEffect(() => {
16339
16587
  if (!siteId) {
16340
16588
  console.error("[BookingFormClient] ERROR: siteId is missing!");
16341
16589
  }
@@ -16352,7 +16600,7 @@ var BookingFormClient = ({
16352
16600
  redirectState,
16353
16601
  verificationState: verification.state
16354
16602
  });
16355
- React3.useEffect(() => {
16603
+ React6.useEffect(() => {
16356
16604
  if (viewState.kind === "error") {
16357
16605
  scrollToBlock(bookingAnchorId);
16358
16606
  }
@@ -16361,12 +16609,12 @@ var BookingFormClient = ({
16361
16609
  viewState.kind,
16362
16610
  viewState.kind === "error" ? viewState.message : null
16363
16611
  ]);
16364
- React3.useEffect(() => {
16612
+ React6.useEffect(() => {
16365
16613
  if (viewState.kind === "success" && redirectState.kind === "success") {
16366
16614
  scrollToBlock(bookingAnchorId);
16367
16615
  }
16368
16616
  }, [bookingAnchorId, redirectState.kind, viewState.kind]);
16369
- React3.useEffect(() => {
16617
+ React6.useEffect(() => {
16370
16618
  if (!isPortalRebook || viewState.kind !== "success") {
16371
16619
  return;
16372
16620
  }
@@ -16392,13 +16640,13 @@ var BookingFormClient = ({
16392
16640
  viewState.kind
16393
16641
  ]);
16394
16642
  if (render.display.state === "missing" || !form || !render.hydration.formId) {
16395
- return /* @__PURE__ */ jsx10(
16643
+ return /* @__PURE__ */ jsx14(
16396
16644
  FeedbackMessage,
16397
16645
  {
16398
16646
  tone: "error",
16399
- className: `ab-alert ab-alert--error ${render.display.className ?? ""}`.trim(),
16647
+ className: `alert alert-error ${render.display.className ?? ""}`.trim(),
16400
16648
  role: "alert",
16401
- children: /* @__PURE__ */ jsx10("p", { className: "ab-text", children: render.display.message ?? "Booking form not found. Please check your configuration." })
16649
+ children: /* @__PURE__ */ jsx14("p", { className: "ab-text", children: render.display.message ?? "Booking form not found. Please check your configuration." })
16402
16650
  }
16403
16651
  );
16404
16652
  }
@@ -16418,29 +16666,21 @@ var BookingFormClient = ({
16418
16666
  }
16419
16667
  };
16420
16668
  if (viewState.kind === "success") {
16421
- return /* @__PURE__ */ jsx10(
16669
+ return /* @__PURE__ */ jsx14(BookingSurface, { id: bookingAnchorId, className: render.display.className, children: /* @__PURE__ */ jsx14(
16422
16670
  SuccessMessage,
16423
16671
  {
16424
16672
  message: getBookingSuccessMessage(render.display.successMessage),
16425
- resourceName: viewState.resourceName,
16426
- className: render.display.className ?? void 0
16673
+ resourceName: viewState.resourceName
16427
16674
  }
16428
- );
16675
+ ) });
16429
16676
  }
16430
16677
  if (viewState.kind === "verifying") {
16431
- return /* @__PURE__ */ jsx10(
16432
- "div",
16433
- {
16434
- id: bookingAnchorId,
16435
- className: render.display.className ?? void 0,
16436
- children: /* @__PURE__ */ jsx10(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info", role: "status", children: /* @__PURE__ */ jsx10("p", { className: "ab-text", children: viewState.message }) })
16437
- }
16438
- );
16678
+ return /* @__PURE__ */ jsx14(BookingSurface, { id: bookingAnchorId, className: render.display.className, children: /* @__PURE__ */ jsx14(FeedbackMessage, { tone: "info", className: "alert alert-info", role: "status", children: /* @__PURE__ */ jsx14("p", { className: "ab-text", children: viewState.message }) }) });
16439
16679
  }
16440
- return /* @__PURE__ */ jsxs8("div", { id: bookingAnchorId, className: render.display.className ?? void 0, children: [
16441
- render.hydration.noticeMessage ? /* @__PURE__ */ jsx10(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info rb-mb-4", role: "status", children: /* @__PURE__ */ jsx10("p", { className: "ab-text", children: render.hydration.noticeMessage }) }) : null,
16442
- viewState.kind === "error" ? /* @__PURE__ */ jsx10(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: /* @__PURE__ */ jsx10("p", { className: "ab-text", children: viewState.message }) }) : null,
16443
- /* @__PURE__ */ jsx10(HeadlessBookingDefaultForm, { booking, onSubmit: handleComplete })
16680
+ return /* @__PURE__ */ jsxs10(BookingSurface, { id: bookingAnchorId, className: render.display.className, children: [
16681
+ render.hydration.noticeMessage ? /* @__PURE__ */ jsx14(FeedbackMessage, { tone: "info", className: "alert alert-info rb-mb-4", role: "status", children: /* @__PURE__ */ jsx14("p", { className: "ab-text", children: render.hydration.noticeMessage }) }) : null,
16682
+ viewState.kind === "error" ? /* @__PURE__ */ jsx14(FeedbackMessage, { tone: "error", className: "alert alert-error rb-mb-4", role: "alert", children: /* @__PURE__ */ jsx14("p", { className: "ab-text", children: viewState.message }) }) : null,
16683
+ /* @__PURE__ */ jsx14(HeadlessBookingDefaultForm, { booking, onSubmit: handleComplete })
16444
16684
  ] });
16445
16685
  };
16446
16686
 
@@ -17104,8 +17344,14 @@ function existingRegistrationLookupReducer(state, action) {
17104
17344
  }
17105
17345
 
17106
17346
  // ../blocks/src/system/runtime/nodes/event-registration/hooks.ts
17347
+ var eventRegistrationHooksDeps = {
17348
+ useBlockApi
17349
+ };
17107
17350
  function usePortalAuth() {
17108
- const api = useBlockApi();
17351
+ return usePortalAuthWithDeps(eventRegistrationHooksDeps);
17352
+ }
17353
+ function usePortalAuthWithDeps(deps) {
17354
+ const api = deps.useBlockApi();
17109
17355
  const [authState, setAuthState] = useState3("checking");
17110
17356
  const [profile, setProfile] = useState3(null);
17111
17357
  useEffect8(() => {
@@ -17153,7 +17399,10 @@ function usePortalAuth() {
17153
17399
  };
17154
17400
  }
17155
17401
  function useEligibility(params) {
17156
- const api = useBlockApi();
17402
+ return useEligibilityWithDeps(params, eventRegistrationHooksDeps);
17403
+ }
17404
+ function useEligibilityWithDeps(params, deps) {
17405
+ const api = deps.useBlockApi();
17157
17406
  const ticketSelectionsKey = JSON.stringify(normalizeTicketSelectionLines(params.ticketSelections));
17158
17407
  const [state, dispatch] = useReducer7(
17159
17408
  eligibilityLookupReducer,
@@ -17222,7 +17471,16 @@ function useExistingEventRegistration({
17222
17471
  isAuthenticated,
17223
17472
  occurrenceId
17224
17473
  }) {
17225
- const api = useBlockApi();
17474
+ return useExistingEventRegistrationWithDeps(
17475
+ { isAuthenticated, occurrenceId },
17476
+ eventRegistrationHooksDeps
17477
+ );
17478
+ }
17479
+ function useExistingEventRegistrationWithDeps({
17480
+ isAuthenticated,
17481
+ occurrenceId
17482
+ }, deps) {
17483
+ const api = deps.useBlockApi();
17226
17484
  const [state, dispatch] = useReducer7(
17227
17485
  existingRegistrationLookupReducer,
17228
17486
  initialExistingRegistrationLookupState
@@ -17609,6 +17867,9 @@ function getWaitlistClaimTokenFromUrl() {
17609
17867
  const token = new URLSearchParams(window.location.search).get("waitlist_claim")?.trim() ?? "";
17610
17868
  return token.length > 0 ? token : null;
17611
17869
  }
17870
+ var useWaitlistClaimDeps = {
17871
+ useBlockApi
17872
+ };
17612
17873
  function subscribeToWaitlistClaimToken(callback) {
17613
17874
  if (typeof window === "undefined") {
17614
17875
  return () => {
@@ -17624,7 +17885,10 @@ function getWaitlistClaimTokenSnapshot() {
17624
17885
  return getWaitlistClaimTokenFromUrl();
17625
17886
  }
17626
17887
  function useWaitlistClaim() {
17627
- const api = useBlockApi();
17888
+ return useWaitlistClaimWithDeps(useWaitlistClaimDeps);
17889
+ }
17890
+ function useWaitlistClaimWithDeps(deps) {
17891
+ const api = deps.useBlockApi();
17628
17892
  const token = useSyncExternalStore(
17629
17893
  subscribeToWaitlistClaimToken,
17630
17894
  getWaitlistClaimTokenSnapshot,
@@ -17675,8 +17939,14 @@ import { useEffect as useEffect10, useMemo as useMemo5 } from "react";
17675
17939
 
17676
17940
  // ../blocks/src/system/runtime/hooks/usePaymentVerification.ts
17677
17941
  import { useMemo as useMemo4 } from "react";
17942
+ var paymentVerificationDeps = {
17943
+ useBlockApi
17944
+ };
17678
17945
  function usePaymentVerification(config) {
17679
- const api = useBlockApi();
17946
+ return usePaymentVerificationWithDeps(config, paymentVerificationDeps);
17947
+ }
17948
+ function usePaymentVerificationWithDeps(config, deps) {
17949
+ const api = deps.useBlockApi();
17680
17950
  const pollingConfig = useMemo4(() => {
17681
17951
  if (!config) return null;
17682
17952
  return {
@@ -17786,7 +18056,13 @@ function useEventRegistrationStripeReturn(options) {
17786
18056
  }
17787
18057
 
17788
18058
  // ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationSubmit.ts
18059
+ var eventRegistrationSubmitDeps = {
18060
+ savePendingRegistration
18061
+ };
17789
18062
  function useEventRegistrationSubmit(options) {
18063
+ return useEventRegistrationSubmitWithDeps(options, eventRegistrationSubmitDeps);
18064
+ }
18065
+ function useEventRegistrationSubmitWithDeps(options, deps) {
17790
18066
  return async (method, passId, membershipId, selection, submitOptions) => {
17791
18067
  const submitOccurrenceId = options.registrationTarget?.occurrenceId;
17792
18068
  if (!submitOccurrenceId) {
@@ -17875,7 +18151,7 @@ function useEventRegistrationSubmit(options) {
17875
18151
  }
17876
18152
  const siteId = options.api.config.siteId;
17877
18153
  if (siteId && submitOccurrenceId) {
17878
- savePendingRegistration(siteId, submitOccurrenceId, {
18154
+ deps.savePendingRegistration(siteId, submitOccurrenceId, {
17879
18155
  attendeeId: result.attendeeId,
17880
18156
  formData: options.formData,
17881
18157
  ticketSelections,
@@ -17931,6 +18207,15 @@ function useEventRegistrationSubmit(options) {
17931
18207
  }
17932
18208
 
17933
18209
  // ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.ts
18210
+ var eventRegistrationWizardDeps = {
18211
+ usePortalAuth,
18212
+ useEligibility,
18213
+ useExistingEventRegistration,
18214
+ useWaitlistClaim,
18215
+ useEventRegistrationStripeReturn,
18216
+ useEventRegistrationSubmit,
18217
+ useDiscountCodeUi
18218
+ };
17934
18219
  function parseCurrencyInputToCents(value) {
17935
18220
  const trimmed = value.trim();
17936
18221
  if (!trimmed) return null;
@@ -17961,6 +18246,9 @@ function getSlidingScaleSelectionMessage(input) {
17961
18246
  return null;
17962
18247
  }
17963
18248
  function useEventRegistrationWizard(options) {
18249
+ return useEventRegistrationWizardWithDeps(options, eventRegistrationWizardDeps);
18250
+ }
18251
+ function useEventRegistrationWizardWithDeps(options, deps) {
17964
18252
  const api = useBlockApi();
17965
18253
  const registrationEvents = useMemo6(
17966
18254
  () => toRegistrationEvents(options.events ?? []),
@@ -18010,8 +18298,8 @@ function useEventRegistrationWizard(options) {
18010
18298
  const [registrationResult, setRegistrationResult] = useState4(null);
18011
18299
  const [errorMessage, setErrorMessage] = useState4("");
18012
18300
  const [altchaSolution, setAltchaSolution] = useState4(null);
18013
- const { authState: portalAuthState, profile: portalProfile } = usePortalAuth();
18014
- const waitlistClaim = useWaitlistClaim();
18301
+ const { authState: portalAuthState, profile: portalProfile } = deps.usePortalAuth();
18302
+ const waitlistClaim = deps.useWaitlistClaim();
18015
18303
  const [showMagicLinkModal, setShowMagicLinkModal] = useState4(false);
18016
18304
  const [pendingAttendeeId, setPendingAttendeeId] = useState4(null);
18017
18305
  const [paymentStepState, setPaymentStepState] = useState4({
@@ -18076,7 +18364,7 @@ function useEventRegistrationWizard(options) {
18076
18364
  if (flowState.ticketsCount === ticketsCount) return;
18077
18365
  dispatchFlow({ type: "set-tickets-count", ticketsCount });
18078
18366
  }, [flowState.ticketsCount, ticketsCount]);
18079
- const eligibilityResult = useEligibility({
18367
+ const eligibilityResult = deps.useEligibility({
18080
18368
  enabled: portalAuthState === "authenticated" || step === "enter-details" || step === "select-payment",
18081
18369
  occurrenceId,
18082
18370
  attendanceMode: selectedAttendanceMode,
@@ -18084,7 +18372,7 @@ function useEventRegistrationWizard(options) {
18084
18372
  selectedSlidingAmount: parseCurrencyInputToCents(selectedSlidingAmountInput),
18085
18373
  email: formData.email
18086
18374
  });
18087
- const existingRegistrationResult = useExistingEventRegistration({
18375
+ const existingRegistrationResult = deps.useExistingEventRegistration({
18088
18376
  isAuthenticated: portalAuthState === "authenticated",
18089
18377
  occurrenceId
18090
18378
  });
@@ -18178,7 +18466,7 @@ function useEventRegistrationWizard(options) {
18178
18466
  useEffect11(() => {
18179
18467
  dispatchFlow({ type: "eligibility-updated", eligibility });
18180
18468
  }, [eligibility]);
18181
- const verification = useEventRegistrationStripeReturn({
18469
+ const verification = deps.useEventRegistrationStripeReturn({
18182
18470
  api,
18183
18471
  events: registrationEvents,
18184
18472
  occurrenceId,
@@ -18442,10 +18730,10 @@ function useEventRegistrationWizard(options) {
18442
18730
  if (discountContext?.type !== "event") return void 0;
18443
18731
  return ticketSelectionSubtotalCents;
18444
18732
  }, [discountContext, ticketSelectionSubtotalCents]);
18445
- const discountUi = useDiscountCodeUi({ api, discountContext, subtotalCents: discountSubtotalCents });
18733
+ const discountUi = deps.useDiscountCodeUi({ api, discountContext, subtotalCents: discountSubtotalCents });
18446
18734
  const selectionMethod = paymentSelection.method;
18447
18735
  const shouldShowDiscountToggle = discountContext !== null && discountUi.manualCodeEntryAllowed && (selectionMethod === "stripe" || selectionMethod === "pass_bundle" || selectionMethod === "membership_bundle");
18448
- const handleSubmit = useEventRegistrationSubmit({
18736
+ const handleSubmit = deps.useEventRegistrationSubmit({
18449
18737
  api,
18450
18738
  registrationTarget,
18451
18739
  selectedAttendanceMode,
@@ -18832,6 +19120,34 @@ ${root} {
18832
19120
  /* Order summary */
18833
19121
  --er-summary-bg: rgba(var(--tb-primary), 0.1);
18834
19122
  --er-summary-border: rgb(var(--tb-border));
19123
+
19124
+ /* Shared registration-surface mappings (issue 1174).
19125
+ Route the shared --rb-reg-* contract through this block's documented
19126
+ Tier 3 vars so existing --er-* overrides keep working unchanged. */
19127
+ --rb-reg-radius: var(--er-radius);
19128
+ --rb-reg-border: var(--er-border);
19129
+ --rb-reg-border-hover: var(--er-border-hover);
19130
+ --rb-reg-border-selected: var(--er-border-selected);
19131
+ --rb-reg-bg-selected: var(--er-payment-bg-selected);
19132
+ --rb-reg-option-bg: var(--er-control-bg);
19133
+ --rb-reg-option-hover-shadow: 0 8px 18px rgba(var(--tb-shadow, 15 23 42), 0.08);
19134
+ --rb-reg-surface-bg: rgb(var(--tb-surface));
19135
+ --rb-reg-on-surface: var(--er-on-surface);
19136
+ --rb-reg-on-surface-muted: var(--er-on-surface-muted);
19137
+ --rb-reg-on-surface-subtle: var(--er-on-surface-subtle);
19138
+ --rb-reg-on-surface-faint: var(--er-on-surface-faint);
19139
+ --rb-reg-check-bg: var(--er-check-bg);
19140
+ --rb-reg-check-text: var(--er-check-text);
19141
+ --rb-reg-step-active: var(--er-step-active);
19142
+ --rb-reg-step-completed: var(--er-step-completed);
19143
+ --rb-reg-step-inactive: var(--er-step-inactive);
19144
+ --rb-reg-step-text: var(--er-step-text);
19145
+ --rb-reg-step-text-active: var(--er-step-text-active);
19146
+ --rb-reg-step-connector: var(--er-step-connector);
19147
+ --rb-reg-summary-bg: var(--er-surface-muted);
19148
+ --rb-reg-summary-border: var(--er-border);
19149
+ --rb-reg-focus-ring: var(--er-focus-ring);
19150
+ --rb-reg-shell-line: var(--er-shell-line);
18835
19151
  }
18836
19152
  `;
18837
19153
  }
@@ -18964,25 +19280,40 @@ ${root} {
18964
19280
  --ab-info-bg: rgba(var(--tb-info), 0.1);
18965
19281
  --ab-info-text: rgb(var(--tb-info));
18966
19282
 
18967
- /* Loading/muted states */
19283
+ /* Muted summary state */
18968
19284
  --ab-muted-bg: rgba(var(--tb-text), 0.05);
18969
- --ab-muted-text: rgba(var(--tb-text), 0.6);
18970
- --ab-spinner-color: rgb(var(--tb-primary));
18971
19285
 
18972
- /* Form elements */
18973
- --ab-input-border: rgb(var(--tb-border));
19286
+ /* Focus ring used by shared registration-surface controls */
18974
19287
  --ab-input-focus-ring: rgba(var(--tb-primary), 0.3);
18975
19288
 
18976
- /* Buttons */
18977
- --ab-btn-primary-bg: rgb(var(--tb-primary));
18978
- --ab-btn-primary-text: rgb(var(--tb-background));
18979
- --ab-btn-primary-hover: rgba(var(--tb-primary), 0.9);
18980
- --ab-btn-secondary-border: rgb(var(--tb-border));
18981
- --ab-btn-secondary-hover: rgba(var(--tb-text), 0.05);
18982
-
18983
- /* Text opacity levels */
18984
- --ab-text-muted-opacity: 0.6;
18985
- --ab-text-faint-opacity: 0.4;
19289
+ /* Shared registration-surface mappings (issue 1174).
19290
+ Route the shared --rb-reg-* contract through this block's Tier 3 vars
19291
+ (palette tokens where no --ab-* var exists) so --ab-* overrides keep
19292
+ working as the block adopts the shared classes. */
19293
+ --rb-reg-radius: var(--ab-card-radius, var(--rb-block-radius));
19294
+ --rb-reg-border: var(--ab-card-border);
19295
+ --rb-reg-border-hover: var(--ab-card-border-hover);
19296
+ --rb-reg-border-selected: var(--ab-card-border-selected);
19297
+ --rb-reg-bg-selected: var(--ab-card-bg-selected);
19298
+ --rb-reg-option-bg: transparent;
19299
+ --rb-reg-option-hover-shadow: 0 8px 18px rgba(var(--tb-shadow, 15 23 42), 0.08);
19300
+ --rb-reg-surface-bg: rgb(var(--tb-surface));
19301
+ --rb-reg-on-surface: rgb(var(--tb-onSurface, var(--tb-text)));
19302
+ --rb-reg-on-surface-muted: rgba(var(--tb-onSurface, var(--tb-text)), 0.7);
19303
+ --rb-reg-on-surface-subtle: rgba(var(--tb-onSurface, var(--tb-text)), 0.6);
19304
+ --rb-reg-on-surface-faint: rgba(var(--tb-onSurface, var(--tb-text)), 0.5);
19305
+ --rb-reg-check-bg: var(--ab-check-bg);
19306
+ --rb-reg-check-text: var(--ab-check-text);
19307
+ --rb-reg-step-active: rgb(var(--tb-primary));
19308
+ --rb-reg-step-completed: rgb(var(--tb-success));
19309
+ --rb-reg-step-inactive: rgb(var(--tb-mutedText));
19310
+ --rb-reg-step-text: rgb(255 255 255);
19311
+ --rb-reg-step-text-active: rgb(var(--tb-primaryText, 255 255 255));
19312
+ --rb-reg-step-connector: rgba(var(--tb-border), 0.5);
19313
+ --rb-reg-summary-bg: var(--ab-muted-bg);
19314
+ --rb-reg-summary-border: var(--ab-card-border);
19315
+ --rb-reg-focus-ring: var(--ab-input-focus-ring);
19316
+ --rb-reg-shell-line: rgba(var(--tb-mutedText, 100 116 139), 0.22);
18986
19317
  }
18987
19318
  `;
18988
19319
  }
@@ -19273,6 +19604,35 @@ ${root} {
19273
19604
  /* Summary */
19274
19605
  --cr-summary-bg: rgba(var(--tb-primary), 0.1);
19275
19606
  --cr-summary-border: rgb(var(--tb-border));
19607
+
19608
+ /* Shared registration-surface mappings (issue 1174).
19609
+ Route the shared --rb-reg-* contract through this block's Tier 3 vars
19610
+ (palette tokens where no --cr-* var exists) so existing --cr-* overrides
19611
+ keep working unchanged. */
19612
+ --rb-reg-radius: var(--rb-block-radius);
19613
+ --rb-reg-border: var(--cr-border);
19614
+ --rb-reg-border-hover: var(--cr-border-hover);
19615
+ --rb-reg-border-selected: var(--cr-border-selected);
19616
+ --rb-reg-bg-selected: var(--cr-payment-bg-selected);
19617
+ --rb-reg-option-bg: rgb(var(--tb-background));
19618
+ --rb-reg-option-hover-shadow: 0 8px 18px rgba(var(--tb-shadow, 15 23 42), 0.08);
19619
+ --rb-reg-surface-bg: rgb(var(--tb-surface));
19620
+ --rb-reg-on-surface: var(--cr-on-surface);
19621
+ --rb-reg-on-surface-muted: rgba(var(--tb-onSurface, var(--tb-text)), 0.7);
19622
+ --rb-reg-on-surface-subtle: rgba(var(--tb-onSurface, var(--tb-text)), 0.6);
19623
+ --rb-reg-on-surface-faint: rgba(var(--tb-onSurface, var(--tb-text)), 0.5);
19624
+ --rb-reg-check-bg: var(--cr-check-bg);
19625
+ --rb-reg-check-text: var(--cr-check-text);
19626
+ --rb-reg-step-active: var(--cr-step-active);
19627
+ --rb-reg-step-completed: var(--cr-step-completed);
19628
+ --rb-reg-step-inactive: var(--cr-step-inactive);
19629
+ --rb-reg-step-text: var(--cr-step-text);
19630
+ --rb-reg-step-text-active: var(--cr-step-text-active);
19631
+ --rb-reg-step-connector: var(--cr-step-connector);
19632
+ --rb-reg-summary-bg: var(--cr-summary-bg);
19633
+ --rb-reg-summary-border: var(--cr-summary-border);
19634
+ --rb-reg-focus-ring: var(--cr-focus-ring);
19635
+ --rb-reg-shell-line: rgba(var(--tb-mutedText, 100 116 139), 0.22);
19276
19636
  }
19277
19637
  `;
19278
19638
  }
@@ -19319,24 +19679,30 @@ function buildResponsiveScopeRulePatternSource() {
19319
19679
  }
19320
19680
 
19321
19681
  // ../theme-core/src/ThemeScopeCore.tsx
19322
- import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
19682
+ import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
19323
19683
 
19324
19684
  // ../theme-core/src/ClientThemeScope.tsx
19325
- import { jsx as jsx12 } from "react/jsx-runtime";
19685
+ import { jsx as jsx16 } from "react/jsx-runtime";
19326
19686
 
19327
19687
  // ../blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.ts
19328
- import React4, { useCallback as useCallback7, useMemo as useMemo8 } from "react";
19688
+ import React7, { useCallback as useCallback7, useMemo as useMemo8 } from "react";
19689
+ var eventRegistrationControllerDeps = {
19690
+ useEventRegistrationWizard
19691
+ };
19329
19692
  function HeadlessEventRegistrationProvider({
19330
19693
  config,
19331
19694
  children
19332
19695
  }) {
19333
- return React4.createElement(BlockApiProvider, { config, children });
19696
+ return React7.createElement(BlockApiProvider, { config, children });
19334
19697
  }
19335
19698
  function useHeadlessEventRegistrationFlow(options) {
19336
19699
  return useEventRegistrationController(options).flow;
19337
19700
  }
19338
19701
  function useEventRegistrationController(options) {
19339
- const { wizard } = useEventRegistrationWizardController(options);
19702
+ return useEventRegistrationControllerWithDeps(options, eventRegistrationControllerDeps);
19703
+ }
19704
+ function useEventRegistrationControllerWithDeps(options, deps) {
19705
+ const { wizard } = useEventRegistrationWizardControllerWithDeps(options, deps);
19340
19706
  const steps = useMemo8(
19341
19707
  () => deriveEventRegistrationSteps({
19342
19708
  step: wizard.step,
@@ -19581,9 +19947,9 @@ function useEventRegistrationController(options) {
19581
19947
  };
19582
19948
  return { flow, wizard };
19583
19949
  }
19584
- function useEventRegistrationWizardController(options) {
19950
+ function useEventRegistrationWizardControllerWithDeps(options, deps) {
19585
19951
  const maxTicketsNum = normalizeEventRegistrationMaxTickets(options.maxTickets);
19586
- const wizard = useEventRegistrationWizard({
19952
+ const wizard = deps.useEventRegistrationWizard({
19587
19953
  anchorId: options.anchorId ?? "event-registration",
19588
19954
  occurrenceContext: options.occurrenceContext ?? null,
19589
19955
  contentEntry: options.contentEntry ?? null,
@@ -19815,19 +20181,19 @@ async function loadBookingFormServices(api, formConfig) {
19815
20181
 
19816
20182
  // src/bookings/index.ts
19817
20183
  var BookingFormClient2 = (props) => {
19818
- return React5.createElement(BookingFormClient, props);
20184
+ return React8.createElement(BookingFormClient, props);
19819
20185
  };
19820
20186
  function useBookingFormConfig2(siteId, formId) {
19821
20187
  return useBookingFormConfig(siteId, formId);
19822
20188
  }
19823
20189
  var HeadlessBookingProvider2 = (props) => {
19824
- return React5.createElement(HeadlessBookingProvider, props);
20190
+ return React8.createElement(HeadlessBookingProvider, props);
19825
20191
  };
19826
20192
  var HeadlessEventRegistrationProvider2 = (props) => {
19827
- return React5.createElement(HeadlessEventRegistrationProvider, props);
20193
+ return React8.createElement(HeadlessEventRegistrationProvider, props);
19828
20194
  };
19829
20195
  var HeadlessBookingPaymentSelectionStep2 = (props) => {
19830
- return React5.createElement(HeadlessBookingPaymentSelectionStep, props);
20196
+ return React8.createElement(HeadlessBookingPaymentSelectionStep, props);
19831
20197
  };
19832
20198
  export {
19833
20199
  BOOKING_FORM_DATA_RESERVED_KEY_VALUES,