@riverbankcms/sdk 0.181.0 → 0.183.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.
- package/CHANGELOG.md +79 -0
- package/README.md +49 -3
- package/dist/_dts/{BlocksIslandsHydrator-CVCasDPz.d.ts → BlocksIslandsHydrator-X1_G96iN.d.ts} +1 -1
- package/dist/_dts/{Page-Dtj2Ui3S.d.ts → Page-CEqZJZEE.d.ts} +7 -7
- package/dist/_dts/{SdkPreviewMode-D1f_60WW.d.ts → SdkPreviewMode-DQejfbXL.d.ts} +2 -2
- package/dist/_dts/{client-Chr9pNVW.d.ts → client-B_B_amKD.d.ts} +2 -3
- package/dist/_dts/{content-types-kjccgopX.d.ts → content-types-Dhx5Ocvx.d.ts} +9 -16
- package/dist/_dts/{contracts-BodaiS00.d.ts → contracts-FeOnfoa1.d.ts} +3 -3
- package/dist/_dts/{generatePageMetadata-BS6kaJFp.d.ts → generatePageMetadata-m70J6tit.d.ts} +2 -2
- package/dist/_dts/{index-Brl6_I2j.d.ts → index-BOpUh8kO.d.ts} +1 -1
- package/dist/_dts/{index-CJkefwYh.d.ts → index-Bizdaxji.d.ts} +2 -2
- package/dist/_dts/{index-Diqt0PvG.d.ts → index-BxCmCit0.d.ts} +1 -1
- package/dist/_dts/{index-DG0OvBs0.d.ts → index-CjAkEWAp.d.ts} +4 -4
- package/dist/_dts/{index-D1WpKwQe.d.ts → index-iuFrbIjt.d.ts} +1 -1
- package/dist/_dts/{index-Dy50xUMK.d.ts → index-liuhlOX7.d.ts} +2 -2
- package/dist/_dts/{loadContent-BgxshKrA.d.ts → loadContent-D4wrTIIw.d.ts} +7 -7
- package/dist/_dts/{request-CA0izds5.d.ts → request-Gn0O1blj.d.ts} +25042 -23761
- package/dist/_dts/{resolveBlockData-ChQmwEd3.d.ts → resolveBlockData-D5duwuqS.d.ts} +5 -5
- package/dist/_dts/{resolvePageContent-BvGyvblj.d.ts → resolvePageContent-xzJ3c9Na.d.ts} +1 -1
- package/dist/_dts/sdk/src/bookings/index.d.ts +2 -2
- package/dist/_dts/sdk/src/client/types.d.ts +2 -2
- package/dist/_dts/sdk/src/client.d.ts +7 -7
- package/dist/_dts/sdk/src/config/index.d.ts +7 -7
- package/dist/_dts/sdk/src/config/template-validation.d.ts +1 -1
- package/dist/_dts/sdk/src/config/validation.d.ts +1 -1
- package/dist/_dts/sdk/src/data/dataLoaderContext.d.ts +2 -2
- package/dist/_dts/sdk/src/data/resolveBlockData.d.ts +1 -1
- package/dist/_dts/sdk/src/data/types.d.ts +2 -2
- package/dist/_dts/sdk/src/gifting/client.d.ts +1 -1
- package/dist/_dts/sdk/src/index.d.ts +8 -8
- package/dist/_dts/sdk/src/manifest/index.d.ts +3 -3
- package/dist/_dts/sdk/src/metadata/index.d.ts +1 -1
- package/dist/_dts/sdk/src/navigation/index.d.ts +3 -3
- package/dist/_dts/sdk/src/next/index.d.ts +7 -7
- package/dist/_dts/sdk/src/next/middleware.d.ts +2 -2
- package/dist/_dts/sdk/src/page-converter/index.d.ts +3 -3
- package/dist/_dts/sdk/src/portal/client.d.ts +1 -1
- package/dist/_dts/sdk/src/portal/index.d.ts +1 -1
- package/dist/_dts/sdk/src/prebuild/index.d.ts +1 -1
- package/dist/_dts/sdk/src/preview-next/before-render.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/index.d.ts +2 -2
- package/dist/_dts/sdk/src/preview-next/client/runtime.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/client.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +4 -4
- package/dist/_dts/sdk/src/rendering/index.d.ts +6 -6
- package/dist/_dts/sdk/src/rendering/islands/client.d.ts +1 -1
- package/dist/_dts/sdk/src/rendering/server.d.ts +2 -2
- package/dist/_dts/sdk/src/rendering/themeAdmission.d.ts +1 -1
- package/dist/_dts/sdk/src/routing/index.d.ts +6 -6
- package/dist/_dts/sdk/src/server.d.ts +5 -5
- package/dist/_dts/sdk/src/spam-protection/index.d.ts +2 -2
- package/dist/_dts/sdk/src/theme/index.d.ts +91 -2
- package/dist/_dts/{serviceBookingOutline-BgFbJQhU.d.ts → serviceBookingOutline-B1gyJon_.d.ts} +7 -7
- package/dist/_dts/{types-CgS3xLk8.d.ts → types-BoITy0rA.d.ts} +41 -4
- package/dist/_dts/{types-CQrsP1x_.d.ts → types-DBNuMtSk.d.ts} +16 -5
- package/dist/_dts/{types-R65DKjPn.d.ts → types-DHMcuoeQ.d.ts} +7 -7
- package/dist/_dts/{validation-6LTIbuBA.d.ts → validation-BIPO-XlE.d.ts} +4 -4
- package/dist/client/{BlocksIslandsHydrator-DqZPz6oW.mjs → BlocksIslandsHydrator-Ct8slgRk.mjs} +22 -18
- package/dist/client/{BookingMailingListNote-uWfR2kaG.mjs → BookingMailingListNote-qqTxGGS4.mjs} +7 -7
- package/dist/client/{BookingQuestionFields-CyNIKw6k.mjs → BookingQuestionFields-DCh9MUIF.mjs} +2 -2
- package/dist/client/{CalendarAction-D_Glwvz2.mjs → CalendarAction-RcdaStG7.mjs} +1 -1
- package/dist/client/{CalendarNavigationChevron-BGCX3zwG.mjs → CalendarNavigationChevron-D7Wt-Oaa.mjs} +27 -10
- package/dist/client/{CheckboxChoice-C8i4NraK.mjs → CheckboxChoice-BdGxZWeg.mjs} +1 -1
- package/dist/client/{DemoBookingPortalAccess-DFLPyuqe.mjs → DemoBookingPortalAccess-HFVkoOac.mjs} +5 -5
- package/dist/client/{EventCalendar.client-zDL4-t-B.mjs → EventCalendar.client-BtkJW8bA.mjs} +10 -10
- package/dist/client/{EventCombined.client-uciDKLID.mjs → EventCombined.client-DxaGjFFS.mjs} +9 -9
- package/dist/client/{EventEmbeddedCheckoutStep-BGkbUhuw.mjs → EventEmbeddedCheckoutStep-B2c5dR49.mjs} +1 -1
- package/dist/client/{EventItem-CwzrjcRw.mjs → EventItem-Fr2qi2C2.mjs} +33 -186
- package/dist/client/{EventListWeekNavigation-ChvcnPma.mjs → EventListWeekNavigation-BRMaq0ky.mjs} +1 -1
- package/dist/client/{EventListing.client-DA57Qoyx.mjs → EventListing.client-BhGxfbjt.mjs} +3 -3
- package/dist/client/{EventListing.view-DZ0qMFF4.mjs → EventListing.view-COuEJzbO.mjs} +8 -8
- package/dist/client/{EventRegistrationPayment-DSqCJL8E.mjs → EventRegistrationPayment-BTLYhVxD.mjs} +41 -195
- package/dist/client/{Page-C7mygH_f.mjs → Page-CgbQZP5g.mjs} +2947 -1018
- package/dist/client/{ProtectedSubmitButton-BNnKuir8.mjs → ProtectedSubmitButton-BG7my0Qf.mjs} +1 -1
- package/dist/client/{SiteTermsAgreementField-B4z-e4Wq.mjs → SiteTermsAgreementField-DQNkfNLA.mjs} +3 -3
- package/dist/client/{StepIndicator-Dn_DY4oY.mjs → StepIndicator-DvPekKeM.mjs} +1 -1
- package/dist/client/{StepIndicator-atfDU82W.mjs → StepIndicator-DyXoI3ob.mjs} +221 -20
- package/dist/client/{ThemedButton-PFOhXktM.mjs → ThemedButton-Bc9DBbVp.mjs} +42 -9
- package/dist/client/{accessibleSurfaces-n6kS6Hct.mjs → accessibleSurfaces-wj4Rloo5.mjs} +1214 -724
- package/dist/client/{accordion-CsW8U3ff.mjs → accordion-BVXfjnh-.mjs} +1 -1
- package/dist/client/{booking-form.client-cBWM392H.mjs → booking-form.client-DycPGtke.mjs} +191 -71
- package/dist/client/{bookingForm-DgySpp6C.mjs → bookingForm-DrWSUqL3.mjs} +4 -4
- package/dist/client/bookings.mjs +5 -5
- package/dist/client/{boxStyleClassNames-BpGVdLFD.mjs → boxStyleClassNames-CduDRcIk.mjs} +2 -2
- package/dist/client/buttonParts-CJEtVOUy.mjs +1511 -0
- package/dist/client/{carousel-DJoleFV3.mjs → carousel-DyCLMP8s.mjs} +2 -2
- package/dist/client/{carousel.client-BtLwHefX.mjs → carousel.client-DffP_Nv0.mjs} +1 -1
- package/dist/client/{cart-EO5o6uPH.mjs → cart-BuEp_cj4.mjs} +3 -3
- package/dist/client/{cart.client-D_gPw45z.mjs → cart.client-CAO39uDG.mjs} +1 -1
- package/dist/client/{checkout-NVfZW0kR.mjs → checkout-BoxzT64s.mjs} +3 -3
- package/dist/client/{checkout.client-DD3JuqOy.mjs → checkout.client-IGUy7XOx.mjs} +1 -1
- package/dist/client/{checkoutUrls-z2gXvlGw.mjs → checkoutUrls-D0UsiFmm.mjs} +1 -1
- package/dist/client/client.mjs +466 -94
- package/dist/client/{constants-CoOkvw__.mjs → constants-C_8AxMdm.mjs} +1 -1
- package/dist/client/{context-CRhn9qzS.mjs → context-D1L0pe__.mjs} +23 -5
- package/dist/client/{dateFormatting-BnWB4L1s.mjs → dateFormatting-HvfmS_cH.mjs} +1 -1
- package/dist/client/{demoPortalMagicLink-CWDGSTBu.mjs → demoPortalMagicLink-BunFTnIq.mjs} +1 -1
- package/dist/client/{enhanceHeaderSection-tdP_-Z9o.mjs → enhanceHeaderSection-CtLAG651.mjs} +4 -4
- package/dist/client/{event-registration.client-D7YYKySQ.mjs → event-registration.client-DiSxkBUP.mjs} +15 -15
- package/dist/client/{eventCalendar-CsAfu5d0.mjs → eventCalendar-DUnhwZ1o.mjs} +4 -4
- package/dist/client/{eventCombined-VXJB5CoS.mjs → eventCombined-BvBQo0nF.mjs} +4 -4
- package/dist/client/{eventListing-B3KIZNfY.mjs → eventListing-aTLifOX7.mjs} +4 -4
- package/dist/client/{eventRegistration-BP-dEk1c.mjs → eventRegistration-DFd7pr09.mjs} +4 -4
- package/dist/client/{form-DM8Zbxbv.mjs → form-Dikmc2AO.mjs} +3 -3
- package/dist/client/{form.client-e2z_Tlgk.mjs → form.client-zHaQK5I9.mjs} +5 -5
- package/dist/client/{form.parts-Ctljy1a3.mjs → form.parts-BLl9n8TH.mjs} +3 -3
- package/dist/client/gifting/client.mjs +16 -9
- package/dist/client/{gifting-DWIsqQru.mjs → gifting-CufPM38H.mjs} +4 -4
- package/dist/client/{gifting.client-QsSWF0uA.mjs → gifting.client--N1GaSY8.mjs} +155 -84
- package/dist/client/gifting.interactive-D9MK4HkV.mjs +157 -0
- package/dist/client/gifting.parts-CRtiRzo-.mjs +119 -0
- package/dist/client/{headerSection-DAkRkwb-.mjs → headerSection-BIaBpmk3.mjs} +2 -2
- package/dist/client/{noop-Dl4mZ-rr.mjs → islands-DJDLGQEm.mjs} +16008 -8676
- package/dist/client/{newsletter-form.client-WYja9-WN.mjs → newsletter-form.client-wg_JHTxm.mjs} +6 -6
- package/dist/client/{newsletter-form.interactive-RuM86VAv.mjs → newsletter-form.interactive-hzpkW9NQ.mjs} +384 -326
- package/dist/client/{newsletter-form.parts-2petDnWv.mjs → newsletter-form.parts-CgzpSv9p.mjs} +2 -2
- package/dist/client/{newsletterForm-BUbXdA_e.mjs → newsletterForm-CvxLiEBT.mjs} +3 -3
- package/dist/client/portal/client.mjs +291 -101
- package/dist/client/{portalOrders-COGn4BKG.mjs → portalOrders-tCxS04g0.mjs} +3 -2
- package/dist/client/{portalRoutes-D72yvtDh.mjs → portalRoutes-DTHlWg_F.mjs} +33 -7
- package/dist/client/{product-detail.client-pOAryevt.mjs → product-detail.client-22Q7zgjN.mjs} +1 -1
- package/dist/client/{product-list.client-CcUpUiud.mjs → product-list.client-DFWYvK8z.mjs} +1 -1
- package/dist/client/{productDetail-BZJCfqat.mjs → productDetail-DhZAwo60.mjs} +3 -3
- package/dist/client/{productList-CiRs3mNb.mjs → productList-BiVpbZK2.mjs} +3 -3
- package/dist/client/{propsDecoder--uHW4tFM.mjs → propsDecoder-DFYqKnLy.mjs} +4 -2
- package/dist/client/{registry.server-CDNNd8wC.mjs → registry.server-C3OBRg7x.mjs} +2305 -873
- package/dist/client/rendering/client.mjs +29 -26
- package/dist/client/rendering/islands.mjs +1 -1
- package/dist/client/rendering.mjs +5 -5
- package/dist/client/{richText-coerce-CQGE_wHV.mjs → richText-coerce-ms477Z08.mjs} +2 -2
- package/dist/client/{routeIslandApiConfig-BtCg87-N.mjs → routeIslandApiConfig-B6nQeqvH.mjs} +1 -1
- package/dist/client/{runtimeResponse-Ds9cmBUf.mjs → runtimeResponse-BYqsV1Kb.mjs} +1 -1
- package/dist/client/runtimeResponse-CUX_lldL.mjs +3 -0
- package/dist/client/{shop-commerce-D8evQnMT.mjs → shop-commerce-DVsIcPaI.mjs} +16 -15
- package/dist/client/{shop-commerce-store-C9PcsSTj.mjs → shop-commerce-store-7mO6KY7_.mjs} +1 -1
- package/dist/client/{shop-discount-apply.state-D5CtGfJI.mjs → shop-discount-apply.state-L1Vge8tG.mjs} +2 -2
- package/dist/client/{shop-Rx_gEMK8.mjs → shop-xt4dQ3HH.mjs} +3 -3
- package/dist/client/{shop.client-D4lzQ9oY.mjs → shop.client-DNJfD3VQ.mjs} +28 -17
- package/dist/client/{shopShared-BVbq7Nm-.mjs → shopShared-DS8t6749.mjs} +2 -2
- package/dist/client/spam-protection.mjs +1 -1
- package/dist/client/{src-ZSqRK3dD.mjs → src-Do_s2lqH.mjs} +16 -19
- package/dist/client/{timetableModel-BQJrSK0K.mjs → timetableModel-Dy3nNfTG.mjs} +13 -17
- package/dist/client/{useAvailableSlots-Dm3lKJKR.mjs → useAvailableSlots-DcjtDpUu.mjs} +2 -2
- package/dist/client/{useDiscountCodeUi-klgfGn7f.mjs → useDiscountCodeUi-DvdFFWOT.mjs} +1 -1
- package/dist/client/{useEventPagination-Jnjt7_ly.mjs → useEventPagination-Cq-7sU5_.mjs} +8 -8
- package/dist/client/{view-CC_yQLSA.mjs → view-4gnPcpWJ.mjs} +24 -9
- package/dist/client/{wizardSteps-BliJOzEX.mjs → wizardSteps-DDvL3iza.mjs} +375 -186
- package/dist/preview-next/client/{EventEmbeddedCheckoutStep-aRJjq4x8.mjs → EventEmbeddedCheckoutStep-CLqSRUpt.mjs} +1 -1
- package/dist/preview-next/client/{LocationPickerEnvironment-BW3dRFIv.mjs → LocationPickerEnvironment-CIdAg-Tm.mjs} +1 -1
- package/dist/preview-next/client/{MapLibreEditMap-Db9BHyXh.mjs → MapLibreEditMap-Bm85jX35.mjs} +2 -2
- package/dist/preview-next/client/{PageSectionToolbar-BhL0uADo.mjs → PageSectionToolbar-D8srnz9R.mjs} +445 -18
- package/dist/preview-next/client/{PreviewEditorSidebar-Ct8eIm0i.mjs → PreviewEditorSidebar-DVpk5cqp.mjs} +3871 -1947
- package/dist/preview-next/client/{PreviewEditorUI-BS32G4V9.mjs → PreviewEditorUI-XoTtHSFH.mjs} +11 -36
- package/dist/preview-next/client/{PreviewShell-RL0WfZXD.mjs → PreviewShell-VQHsRg2u.mjs} +40 -35
- package/dist/preview-next/client/{SdkPreviewModeRuntime-MK_gHeGy.mjs → SdkPreviewModeRuntime-CLdF9f6o.mjs} +51 -20
- package/dist/preview-next/client/{ThemedButton-CVYz7h68.mjs → ThemedButton-ORNN4x-3.mjs} +782 -16
- package/dist/preview-next/client/{lucide-react-00FF_oar.mjs → lucide-react-eAi3tDAr.mjs} +11 -1
- package/dist/preview-next/client/{previewAssistantSlot-CQyS8pcq.mjs → previewAssistantSlot-CqH91EwA.mjs} +20687 -8562
- package/dist/preview-next/client/{previewChromeRoot-BSxp3Mfu.mjs → previewChromeRoot-B3ySEu6p.mjs} +3 -90
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/preview-next/client/{sdk-runtime-DKnTzy74.mjs → sdk-runtime-CdpSupcr.mjs} +2 -2
- package/dist/preview-next/client/{siteStyleAccess-BlmbvbLN.mjs → siteStyleAccess-C6eOP6QW.mjs} +35 -6
- package/dist/preview-next/client/{useAutosaveStatus-D-7GwZOQ.mjs → useAutosaveStatus-BhPg4e-r.mjs} +49 -3
- package/dist/preview-next/client/{useOpenBlockForSetup-BNZtGM5g.mjs → useOpenBlockForSetup-BaWUF9D7.mjs} +2007 -448
- package/dist/preview-next/container-responsive.css +320 -0
- package/dist/preview-next/editor-chrome.css +23 -2
- package/dist/preview-next/keepAlive.mjs +1 -1
- package/dist/preview-next/middleware.mjs +1 -1
- package/dist/preview-next/{route-contract-R3PcMmax.mjs → route-contract-Ch0X99vE.mjs} +183 -18
- package/dist/server/{Block.shared-CniF9tSu.mjs → Block.shared-B2FmczLO.mjs} +5 -5
- package/dist/server/{ThemeScopeCore-BQWsnGT6.mjs → ThemeScopeCore-DtAyv9qA.mjs} +51 -29
- package/dist/server/{accessibleSurfaces-WPzUAHp4.mjs → accessibleSurfaces-BtPqb76u.mjs} +509 -389
- package/dist/server/{accordions-By_0Ykks.mjs → accordions-vzdZ2Wt1.mjs} +1 -1
- package/dist/server/{bindings-DxojjtK3.mjs → bindings-B_9JuU66.mjs} +7 -7
- package/dist/server/{client-CDndhbYO.mjs → client-DC7cjiSw.mjs} +489 -93
- package/dist/server/config-validation.mjs +1 -1
- package/dist/server/config.mjs +2 -2
- package/dist/server/{constants-VyF5nEhL.mjs → constants-d6nPNJpe.mjs} +33 -6
- package/dist/server/{customCss-C9kgPHvr.mjs → customCss-rtIfEYwQ.mjs} +1 -18
- package/dist/server/data/resolveBlockData.mjs +1 -1
- package/dist/server/{resolveButtonColourStates-B0O1IM16.mjs → expandPalette-DxPrNOAB.mjs} +950 -316
- package/dist/server/index.mjs +3 -3
- package/dist/server/{loadContent-BKstMBmX.mjs → loadContent-hb27HYic.mjs} +11 -10
- package/dist/server/{loadPage-IgNnZaqr.mjs → loadPage-JToD8wDD.mjs} +3 -3
- package/dist/server/{lookMediaFrame-TFjgNG61.mjs → lookMediaFrame-CTsycLLK.mjs} +94 -39
- package/dist/server/manifest.mjs +2 -2
- package/dist/server/{navigation-quBYlSKD.mjs → navigation-B2WhGofA.mjs} +1 -1
- package/dist/server/navigation.mjs +1 -1
- package/dist/server/next.mjs +8 -8
- package/dist/server/{overrideResolution-CCaAPpIa.mjs → overrideResolution-vD5KTClL.mjs} +1 -1
- package/dist/server/page-converter.mjs +3 -3
- package/dist/server/{pageRenderPlan-B7iULvKe.mjs → pageRenderPlan-CdqJ1NQZ.mjs} +242 -336
- package/dist/server/{pageRuntimeSupport-BytMroxn.mjs → pageRuntimeSupport-CAhr4oOf.mjs} +3 -3
- package/dist/server/{pageShared-Dcs_XTIO.mjs → pageShared-m80Xu2pd.mjs} +1292 -877
- package/dist/server/{parseThemeForPersistence-Bihl4W5K.mjs → parseThemeForPersistence-CRwOZfpa.mjs} +3 -3
- package/dist/server/{portal-CMW_b9mG.mjs → portal-B2wCQno_.mjs} +1 -1
- package/dist/server/portal.mjs +2 -2
- package/dist/server/{prebuild-agaH-vZV.mjs → prebuild-BWIkFaXq.mjs} +1 -1
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/{prefetchBlockData-DwpRjqw4.mjs → prefetchBlockData-D1PHU-K9.mjs} +3 -3
- package/dist/server/{registry-DM9dHfDC.mjs → registry-KtsOsAzY.mjs} +21703 -10936
- package/dist/server/rendering/components/pageShared.mjs +1 -1
- package/dist/server/rendering/helpers/loadPage.mjs +1 -1
- package/dist/server/rendering/helpers/pageRuntimeSupport.mjs +1 -1
- package/dist/server/rendering/server.mjs +4 -4
- package/dist/server/rendering.mjs +9 -9
- package/dist/server/{resolveBlockData-CinHGf8l.mjs → resolveBlockData-sjIDJYl7.mjs} +1 -1
- package/dist/server/{schema-CwfxQjc4.mjs → schema-BBEqquBM.mjs} +44 -28
- package/dist/server/server.mjs +3 -3
- package/dist/server/{servicePageContent-BBBhOtdE.mjs → servicePageContent-ChEZDRwU.mjs} +38 -15
- package/dist/server/theme-bridge.mjs +34 -9
- package/dist/server/theme.mjs +2 -2
- package/dist/server/{three-pass-converter-DPaUPTfl.mjs → three-pass-converter-DKCIBeb1.mjs} +2 -2
- package/dist/server/{titleSourceSchema-NhK6azFS.mjs → titleSourceSchema-DybHErxH.mjs} +4 -4
- package/dist/server/{typeGuards-CTW_9AXq.mjs → typeGuards-DZOaGTEv.mjs} +126 -126
- package/dist/server/{types-BKaBZFjD.mjs → types-vyz09w64.mjs} +479 -8
- package/dist/server/{validation-DG5jX3jH.mjs → validation-Cvi-1TZZ.mjs} +13 -9
- package/dist/server/{version-CipbxPHL.mjs → version-B-icAIV1.mjs} +1 -1
- package/dist/server/{video-Cdr3wh-q.mjs → video-DBaeSawZ.mjs} +1 -1
- package/dist/styles/index.css +2568 -154
- package/package.json +1 -1
- package/dist/client/gifting.parts-CedLgwa_.mjs +0 -86
- package/dist/client/runtimeResponse-DL_ARBpa.mjs +0 -3
- package/dist/client/types-BEaKfam_.mjs +0 -778
package/dist/client/{ProtectedSubmitButton-BNnKuir8.mjs → ProtectedSubmitButton-BG7my0Qf.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { n as ThemedButton } from "./ThemedButton-
|
|
2
|
+
import { n as ThemedButton } from "./ThemedButton-Bc9DBbVp.mjs";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region ../blocks/src/system/runtime/shared/components/ProtectedSubmitButton.tsx
|
package/dist/client/{SiteTermsAgreementField-B4z-e4Wq.mjs → SiteTermsAgreementField-DQNkfNLA.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { t as assertNever } from "./src-
|
|
3
|
-
import { i as BlockApiError, n as useBlockApi } from "./context-
|
|
4
|
-
import { t as CheckboxChoice } from "./CheckboxChoice-
|
|
2
|
+
import { t as assertNever } from "./src-Do_s2lqH.mjs";
|
|
3
|
+
import { i as BlockApiError, n as useBlockApi } from "./context-D1L0pe__.mjs";
|
|
4
|
+
import { t as CheckboxChoice } from "./CheckboxChoice-BdGxZWeg.mjs";
|
|
5
5
|
import { n as getFieldValidationControlProps, t as FieldValidationMessage } from "./FieldValidationMessage-CsqxShw4.mjs";
|
|
6
6
|
import { t as FeedbackMessage } from "./FeedbackMessage-CSJrAuXH.mjs";
|
|
7
7
|
import { useCallback, useEffect, useId, useMemo, useReducer } from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { lo as bookingPresentation } from "./wizardSteps-DDvL3iza.mjs";
|
|
3
3
|
import "react";
|
|
4
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region ../blocks/src/system/runtime/shared/BookingPanelArrangement.tsx
|
|
@@ -1,14 +1,142 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { C as resolveEventRegistrationEventSource, M as cancelledDateCopy, N as hasCancelledRegistrationDate } from "./newsletter-form.interactive-
|
|
3
|
-
import { Cn as toUtcIsoDateTimeString, nn as formatDate } from "./src-
|
|
4
|
-
import {
|
|
2
|
+
import { C as resolveEventRegistrationEventSource, M as cancelledDateCopy, N as hasCancelledRegistrationDate } from "./newsletter-form.interactive-hzpkW9NQ.mjs";
|
|
3
|
+
import { Cn as toUtcIsoDateTimeString, nn as formatDate } from "./src-Do_s2lqH.mjs";
|
|
4
|
+
import { $s as orderedLiveRunSessions, Bo as eventDateOptions, Di as planWholeSeriesParentBooking, Ei as planOrdinarySeriesSelection, Mi as selectionRepresentativeEvent, Oi as planWholeSeriesParentSelection, Si as getPublicEventCanonicalPath, Ti as planDropInPanel, bi as resolveEventRegistrationScopedEvents, di as closedDateListCopy, ec as resolveWholeSeriesBookingPhase, fi as closedDatesCopy, gi as cutOffDateCopy, hi as closedDateCopy, ji as resolveSelectionBookingClosedDetail, ki as planWholeSeriesRunSelection, lo as bookingPresentation, mi as bookElsewhereDateCopy, pi as closedRunCopy, vi as normalizeEventRegistrationPageSurfaceSubject, wi as isOrdinaryPublicEvent, xi as eventOccurrenceContext, xo as isInBookingCutOffWindow } from "./wizardSteps-DDvL3iza.mjs";
|
|
5
5
|
import { h as assertNever } from "./bookingCalendar--aWnqFDn.mjs";
|
|
6
|
-
import { r as boxStyleClassNames } from "./boxStyleClassNames-
|
|
7
|
-
import { n as ThemedButton, r as ThemedButtonLink } from "./ThemedButton-
|
|
8
|
-
import { t as EVENT_REGISTRATION_ANCHOR_ID } from "./constants-
|
|
9
|
-
import { n as BookingPanelArrangement, t as StepIndicator$1 } from "./StepIndicator-
|
|
6
|
+
import { r as boxStyleClassNames } from "./boxStyleClassNames-CduDRcIk.mjs";
|
|
7
|
+
import { n as ThemedButton, r as ThemedButtonLink } from "./ThemedButton-Bc9DBbVp.mjs";
|
|
8
|
+
import { t as EVENT_REGISTRATION_ANCHOR_ID } from "./constants-C_8AxMdm.mjs";
|
|
9
|
+
import { n as BookingPanelArrangement, t as StepIndicator$1 } from "./StepIndicator-DvPekKeM.mjs";
|
|
10
10
|
import React from "react";
|
|
11
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
//#region ../blocks/src/system/blocks/events/shared/bookedElsewhere.ts
|
|
13
|
+
/**
|
|
14
|
+
* The booking decision for a page whose event is booked on another website.
|
|
15
|
+
*
|
|
16
|
+
* Such a page has no booking form here, only a button out, so what it needs to
|
|
17
|
+
* know is which date (if any) that button books and, when none, why not. The
|
|
18
|
+
* page's header and its registration panel both read this one decision, so a
|
|
19
|
+
* recurring class whose today's date is past its cut-off can't be "closed" in
|
|
20
|
+
* one place and bookable for next week in the other. Copy projects from the
|
|
21
|
+
* closure; it never decides eligibility.
|
|
22
|
+
*
|
|
23
|
+
* The render clock is part of the input: a page's projected availability can be
|
|
24
|
+
* older than the page, and a cut-off or start makes that gap matter.
|
|
25
|
+
*/
|
|
26
|
+
/** Every date the page scopes in is booked elsewhere. */
|
|
27
|
+
function isBookedElsewherePage(events) {
|
|
28
|
+
return events.length > 0 && events.every((event) => event.destination.kind === "external");
|
|
29
|
+
}
|
|
30
|
+
/** Null while the date is open by both its projected availability and this clock. */
|
|
31
|
+
function bookedElsewhereDateClosure(event, now) {
|
|
32
|
+
const closesAt = event.bookingClosesAt;
|
|
33
|
+
if (closesAt && isInBookingCutOffWindow(event, now)) return {
|
|
34
|
+
kind: "cutOff",
|
|
35
|
+
closesAt
|
|
36
|
+
};
|
|
37
|
+
const reason = event.bookingAvailability.kind === "closed" ? event.bookingAvailability.reason : null;
|
|
38
|
+
if (reason === "occurrence_completed" || reason === "series_completed" || Date.parse(event.endsAt) <= now.getTime()) return { kind: "finished" };
|
|
39
|
+
if (reason === "already_started" || Date.parse(event.startsAt) <= now.getTime()) return { kind: "started" };
|
|
40
|
+
return reason ? { kind: "notTaking" } : null;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* What a page booked elsewhere books. Null when the selection isn't booked
|
|
44
|
+
* elsewhere, so pages booked here keep their own rules. A page-level closure
|
|
45
|
+
* (paused, opening soon) comes first; then the selection's own dates.
|
|
46
|
+
*/
|
|
47
|
+
function decideBookedElsewhereBooking(selection, now) {
|
|
48
|
+
const destination = selectionRepresentativeEvent(selection).destination;
|
|
49
|
+
if (destination.kind !== "external") return null;
|
|
50
|
+
const open = (target) => ({
|
|
51
|
+
kind: "open",
|
|
52
|
+
target,
|
|
53
|
+
destination
|
|
54
|
+
});
|
|
55
|
+
const closed = (closure) => ({
|
|
56
|
+
kind: "closed",
|
|
57
|
+
closure
|
|
58
|
+
});
|
|
59
|
+
const detail = resolveSelectionBookingClosedDetail(selection);
|
|
60
|
+
if (detail) return closed({
|
|
61
|
+
kind: "bookingClosed",
|
|
62
|
+
detail
|
|
63
|
+
});
|
|
64
|
+
switch (selection.kind) {
|
|
65
|
+
case "occurrence": {
|
|
66
|
+
const closure = bookedElsewhereDateClosure(selection.event, now);
|
|
67
|
+
return closure ? closed({
|
|
68
|
+
kind: "date",
|
|
69
|
+
event: selection.event,
|
|
70
|
+
closure
|
|
71
|
+
}) : open(selection.event);
|
|
72
|
+
}
|
|
73
|
+
case "dateChoice": {
|
|
74
|
+
const target = selection.dates.find((date) => bookedElsewhereDateClosure(date, now) === null);
|
|
75
|
+
if (target) return open(target);
|
|
76
|
+
const firstCutOff = selection.dates.flatMap((event) => {
|
|
77
|
+
const closure = bookedElsewhereDateClosure(event, now);
|
|
78
|
+
return closure?.kind === "cutOff" ? [{
|
|
79
|
+
event,
|
|
80
|
+
closesAt: closure.closesAt
|
|
81
|
+
}] : [];
|
|
82
|
+
})[0];
|
|
83
|
+
return closed(firstCutOff ? {
|
|
84
|
+
kind: "datesCutOff",
|
|
85
|
+
dates: selection.dates,
|
|
86
|
+
firstCutOff
|
|
87
|
+
} : { kind: "unavailable" });
|
|
88
|
+
}
|
|
89
|
+
case "wholeSeriesRun": {
|
|
90
|
+
const { run, representative } = selection.run;
|
|
91
|
+
const phase = resolveWholeSeriesBookingPhase(run, now);
|
|
92
|
+
if (phase.kind === "closed") return closed({
|
|
93
|
+
kind: "run",
|
|
94
|
+
reason: phase.reason,
|
|
95
|
+
run
|
|
96
|
+
});
|
|
97
|
+
return representative.bookingAvailability.kind === "closed" ? closed({
|
|
98
|
+
kind: "run",
|
|
99
|
+
reason: "enrolment-closed",
|
|
100
|
+
run
|
|
101
|
+
}) : open(representative);
|
|
102
|
+
}
|
|
103
|
+
case "wholeSeriesParent": return open(selection.eligibleRuns[0].representative);
|
|
104
|
+
case "wholeSeriesParentUnavailable": return closed({ kind: "unavailable" });
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* The date a page of dates booked elsewhere speaks for: the route's own date,
|
|
109
|
+
* else the series' earliest date still open there, so one closed date (today's,
|
|
110
|
+
* past its cut-off) doesn't close the page while next week's can still be
|
|
111
|
+
* booked. With none open, the series' usual choice speaks and shows its closed
|
|
112
|
+
* state. Null when the page isn't booked elsewhere or names no such date.
|
|
113
|
+
*/
|
|
114
|
+
function selectBookedElsewhereDates(events, occurrenceId, now) {
|
|
115
|
+
if (!isBookedElsewherePage(events)) return null;
|
|
116
|
+
if (occurrenceId) {
|
|
117
|
+
const event = events.find((candidate) => candidate.occurrenceId === occurrenceId);
|
|
118
|
+
return event && isOrdinaryPublicEvent(event) ? {
|
|
119
|
+
kind: "occurrence",
|
|
120
|
+
event
|
|
121
|
+
} : null;
|
|
122
|
+
}
|
|
123
|
+
const fallback = planOrdinarySeriesSelection(events);
|
|
124
|
+
if (fallback?.kind !== "occurrence") return fallback;
|
|
125
|
+
const open = events.filter(isOrdinaryPublicEvent).filter((event) => event.seriesId === fallback.event.seriesId).filter((event) => decideBookedElsewhereBooking({
|
|
126
|
+
kind: "occurrence",
|
|
127
|
+
event
|
|
128
|
+
}, now)?.kind === "open").sort((left, right) => Date.parse(left.startsAt) - Date.parse(right.startsAt))[0];
|
|
129
|
+
return open ? {
|
|
130
|
+
kind: "occurrence",
|
|
131
|
+
event: open
|
|
132
|
+
} : fallback;
|
|
133
|
+
}
|
|
134
|
+
/** The page's whole decision for dates booked elsewhere, for consumers that show it without a selection of their own. */
|
|
135
|
+
function decideBookedElsewhereDatesPage(events, occurrenceId, now) {
|
|
136
|
+
const selection = selectBookedElsewhereDates(events, occurrenceId, now);
|
|
137
|
+
return selection ? decideBookedElsewhereBooking(selection, now) : null;
|
|
138
|
+
}
|
|
139
|
+
//#endregion
|
|
12
140
|
//#region ../blocks/src/system/runtime/nodes/event-registration/BookingPanel.tsx
|
|
13
141
|
function EventBookingPanelView({ panel, pageKind, children }) {
|
|
14
142
|
const body = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(EventBookingPanelBody, { panel }), children] });
|
|
@@ -40,6 +168,18 @@ function EventBookingPanelBody({ panel }) {
|
|
|
40
168
|
children: cancelledDateCopy.bodyText
|
|
41
169
|
})]
|
|
42
170
|
});
|
|
171
|
+
case "bookElsewhere": return /* @__PURE__ */ jsx("div", {
|
|
172
|
+
className: "event-booking-panel__book-elsewhere",
|
|
173
|
+
children: /* @__PURE__ */ jsx(ThemedButtonLink, {
|
|
174
|
+
variant: "primary",
|
|
175
|
+
size: "md",
|
|
176
|
+
extraClassName: "event-booking-panel__book-link rb-block rb-w-full rb-text-center",
|
|
177
|
+
href: panel.url,
|
|
178
|
+
target: "_blank",
|
|
179
|
+
rel: "noopener noreferrer",
|
|
180
|
+
label: panel.label
|
|
181
|
+
})
|
|
182
|
+
});
|
|
43
183
|
case "dropIn": return /* @__PURE__ */ jsx(DropInPanel, { panel: panel.panel });
|
|
44
184
|
case "bookingClosed": return /* @__PURE__ */ jsx(BookingClosedPanel, { detail: panel.detail });
|
|
45
185
|
case "closedRun": return /* @__PURE__ */ jsx(ClosedRunPanel, { copy: closedRunCopy(panel.reason, panel.run) });
|
|
@@ -226,20 +366,36 @@ function resolveBookingPanelSelection(source) {
|
|
|
226
366
|
} : null;
|
|
227
367
|
}
|
|
228
368
|
function selectPagePanel(source, events) {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
eventSeriesId: source.subject.eventSeriesId,
|
|
369
|
+
const bookedElsewhere = isBookedElsewherePage(events);
|
|
370
|
+
const subject = source.subject;
|
|
371
|
+
if (subject?.kind === "eventOffering" && subject.bookingScope === "whole_series") return source.pageKind === "bookingPage" || bookedElsewhere ? planWholeSeriesParentSelection({
|
|
372
|
+
offeringId: subject.eventOfferingId,
|
|
373
|
+
events,
|
|
374
|
+
now: new Date(source.now)
|
|
375
|
+
}) : null;
|
|
376
|
+
if (subject?.kind === "eventSeries" && subject.bookingScope === "whole_series") return planWholeSeriesRunSelection({
|
|
377
|
+
eventSeriesId: subject.eventSeriesId,
|
|
239
378
|
events
|
|
240
379
|
});
|
|
241
|
-
|
|
242
|
-
|
|
380
|
+
return bookedElsewhere ? selectBookedElsewherePanel(source, events) : selectBookedHerePanel(source, events);
|
|
381
|
+
}
|
|
382
|
+
/** The page header reads the same choice (`decideBookedElsewhereDatesPage`). Unscoped blocks show no panel. */
|
|
383
|
+
function selectBookedElsewherePanel(source, events) {
|
|
384
|
+
const occurrenceId = source.occurrenceContext?.id ?? null;
|
|
385
|
+
return occurrenceId || offersSeriesDates(source, true) ? selectBookedElsewhereDates(events, occurrenceId, new Date(source.now)) : null;
|
|
386
|
+
}
|
|
387
|
+
function selectBookedHerePanel(source, events) {
|
|
388
|
+
return offersSeriesDates(source, false) ? planOrdinarySeriesSelection(events) : selectOccurrenceForPanel(events, source.occurrenceContext?.id);
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* A series subject without a dated route offers the same eligible dates in
|
|
392
|
+
* CMS/SDK and hosted pages. Unscoped blocks keep their catalogue picker, as
|
|
393
|
+
* does an offering's page booked here.
|
|
394
|
+
*/
|
|
395
|
+
function offersSeriesDates(source, bookedElsewhere) {
|
|
396
|
+
if (source.occurrenceContext) return false;
|
|
397
|
+
const kind = source.subject?.kind;
|
|
398
|
+
return kind === "eventSeries" || kind === "eventOffering" && bookedElsewhere;
|
|
243
399
|
}
|
|
244
400
|
/** The decided target is also retained for recovery when fresh booking is closed. */
|
|
245
401
|
function registrationSourceForPanel(source, panel) {
|
|
@@ -263,6 +419,8 @@ function planEventBookingPanel({ selection, subject, pageEvents }, now) {
|
|
|
263
419
|
kind: "cancelled",
|
|
264
420
|
registration: null
|
|
265
421
|
};
|
|
422
|
+
const elsewhere = planBookElsewherePanel(selection, now);
|
|
423
|
+
if (elsewhere) return elsewhere;
|
|
266
424
|
const nonBookingPanel = planNonBookingPanel(selection);
|
|
267
425
|
switch (selection.kind) {
|
|
268
426
|
case "occurrence":
|
|
@@ -320,6 +478,49 @@ function closedDatePanel(selection, now) {
|
|
|
320
478
|
copy
|
|
321
479
|
} : null;
|
|
322
480
|
}
|
|
481
|
+
/**
|
|
482
|
+
* An event booked on another website is saved with no booking here, so it
|
|
483
|
+
* would otherwise read as a drop-in ("No booking needed"). It is decided
|
|
484
|
+
* first, after a cancelled date, by the shared booked-elsewhere decision the
|
|
485
|
+
* page header also reads: a closed, started or finished date says so rather
|
|
486
|
+
* than sending people out. There is nothing here to recover, so no
|
|
487
|
+
* registration target is kept.
|
|
488
|
+
*/
|
|
489
|
+
function planBookElsewherePanel(selection, now) {
|
|
490
|
+
const booking = decideBookedElsewhereBooking(selection, now);
|
|
491
|
+
if (!booking) return null;
|
|
492
|
+
return booking.kind === "open" ? {
|
|
493
|
+
kind: "bookElsewhere",
|
|
494
|
+
url: booking.destination.url,
|
|
495
|
+
label: booking.destination.label,
|
|
496
|
+
registration: null
|
|
497
|
+
} : {
|
|
498
|
+
...bookElsewhereClosedPanel(booking.closure),
|
|
499
|
+
registration: null
|
|
500
|
+
};
|
|
501
|
+
}
|
|
502
|
+
function bookElsewhereClosedPanel(closure) {
|
|
503
|
+
switch (closure.kind) {
|
|
504
|
+
case "bookingClosed": return {
|
|
505
|
+
kind: "bookingClosed",
|
|
506
|
+
detail: closure.detail
|
|
507
|
+
};
|
|
508
|
+
case "date": return {
|
|
509
|
+
kind: "closedDate",
|
|
510
|
+
copy: bookElsewhereDateCopy(closure.event, closure.closure)
|
|
511
|
+
};
|
|
512
|
+
case "datesCutOff": return {
|
|
513
|
+
kind: "closedDate",
|
|
514
|
+
copy: closedDateListCopy(closure.dates.length, cutOffDateCopy(closure.firstCutOff.event, closure.firstCutOff.closesAt))
|
|
515
|
+
};
|
|
516
|
+
case "run": return {
|
|
517
|
+
kind: "closedRun",
|
|
518
|
+
reason: closure.reason,
|
|
519
|
+
run: closure.run
|
|
520
|
+
};
|
|
521
|
+
case "unavailable": return { kind: "unavailable" };
|
|
522
|
+
}
|
|
523
|
+
}
|
|
323
524
|
/** Drop-in and page-level closure take precedence over fresh booking and run selection. */
|
|
324
525
|
function planNonBookingPanel(selection) {
|
|
325
526
|
if (!selectionRepresentativeEvent(selection).requiresRegistration) return {
|
|
@@ -806,4 +1007,4 @@ function StepIndicator(props) {
|
|
|
806
1007
|
});
|
|
807
1008
|
}
|
|
808
1009
|
//#endregion
|
|
809
|
-
export { planEventBookingPanel as a, EventBookingPanelView as c, RegistrationClosedState as i, BookingEntryBar as n, registrationSourceForPanel as o, BookingEntryCard as r, resolveBookingPanelSelection as s, StepIndicator as t };
|
|
1010
|
+
export { planEventBookingPanel as a, EventBookingPanelView as c, RegistrationClosedState as i, decideBookedElsewhereDatesPage as l, BookingEntryBar as n, registrationSourceForPanel as o, BookingEntryCard as r, resolveBookingPanelSelection as s, StepIndicator as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import "react";
|
|
2
|
+
import { b as buttonVariantIdSchema, f as isVariantRole, l as asSpecialVariantId, n as BUTTON_LABEL_CLASS, s as DEFAULT_VARIANT_ALIAS_ID, t as BUTTON_LABEL_ATTRIBUTE } from "./buttonParts-CJEtVOUy.mjs";
|
|
3
|
+
import React from "react";
|
|
4
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region ../theme-core/src/buttons/affordanceSuppression.ts
|
|
6
6
|
/**
|
|
@@ -1257,6 +1257,31 @@ function themedButtonClasses(variant, size, extraClassName) {
|
|
|
1257
1257
|
extraClassName
|
|
1258
1258
|
].filter(Boolean).join(" ");
|
|
1259
1259
|
}
|
|
1260
|
+
/**
|
|
1261
|
+
* Every themed control wraps its label text in this span and repeats the text
|
|
1262
|
+
* in an attribute on the control. A button style can then move the label on
|
|
1263
|
+
* its own, or show the text a second time from CSS. The span carries no styles
|
|
1264
|
+
* of its own, so a style that uses neither renders exactly as it did without it.
|
|
1265
|
+
*/
|
|
1266
|
+
function ButtonLabelText({ text, className }) {
|
|
1267
|
+
return /* @__PURE__ */ jsx("span", {
|
|
1268
|
+
className: className ? `${BUTTON_LABEL_CLASS} ${className}` : BUTTON_LABEL_CLASS,
|
|
1269
|
+
children: text
|
|
1270
|
+
});
|
|
1271
|
+
}
|
|
1272
|
+
/**
|
|
1273
|
+
* The label's plain text. Labels are typed as text, but the page builder hands
|
|
1274
|
+
* some of them over as an element that marks the text as editable.
|
|
1275
|
+
*/
|
|
1276
|
+
function labelText(label) {
|
|
1277
|
+
if (typeof label === "string" || typeof label === "number") return String(label);
|
|
1278
|
+
if (Array.isArray(label)) return label.map(labelText).join("");
|
|
1279
|
+
if (React.isValidElement(label)) return labelText(label.props.children ?? label.props.value);
|
|
1280
|
+
return "";
|
|
1281
|
+
}
|
|
1282
|
+
function labelAttribute(label) {
|
|
1283
|
+
return { [BUTTON_LABEL_ATTRIBUTE]: labelText(label) };
|
|
1284
|
+
}
|
|
1260
1285
|
function ThemedButtonLabel(props) {
|
|
1261
1286
|
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1262
1287
|
props.pending ? /* @__PURE__ */ jsx(SpinnerNode, {
|
|
@@ -1265,10 +1290,10 @@ function ThemedButtonLabel(props) {
|
|
|
1265
1290
|
className: props.pending.spinnerClassName ?? "rb-mr-2",
|
|
1266
1291
|
srLabel: props.pending.srLabel
|
|
1267
1292
|
}) : null,
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
})
|
|
1293
|
+
/* @__PURE__ */ jsx(ButtonLabelText, {
|
|
1294
|
+
text: props.label,
|
|
1295
|
+
className: props.labelClassName
|
|
1296
|
+
}),
|
|
1272
1297
|
props.screenReaderSuffix ? /* @__PURE__ */ jsx("span", {
|
|
1273
1298
|
className: "rb-sr-only",
|
|
1274
1299
|
children: props.screenReaderSuffix
|
|
@@ -1282,6 +1307,7 @@ function ThemedButtonLabel(props) {
|
|
|
1282
1307
|
/** A native file chooser with the same structural styling owner as themed buttons. */
|
|
1283
1308
|
function ThemedFileChooser({ variant, size, extraClassName, label, inputRef, inputProps }) {
|
|
1284
1309
|
return /* @__PURE__ */ jsxs("label", {
|
|
1310
|
+
...labelAttribute(label),
|
|
1285
1311
|
className: themedButtonClasses(variant, size, extraClassName),
|
|
1286
1312
|
children: [
|
|
1287
1313
|
/* @__PURE__ */ jsx("input", {
|
|
@@ -1300,16 +1326,18 @@ function ThemedFileChooser({ variant, size, extraClassName, label, inputRef, inp
|
|
|
1300
1326
|
strokeWidth: "2",
|
|
1301
1327
|
children: /* @__PURE__ */ jsx("path", { d: "M12 16V4M6 10l6-6 6 6M4 20h16" })
|
|
1302
1328
|
}),
|
|
1303
|
-
label
|
|
1329
|
+
/* @__PURE__ */ jsx(ButtonLabelText, { text: label })
|
|
1304
1330
|
]
|
|
1305
1331
|
});
|
|
1306
1332
|
}
|
|
1307
1333
|
function ThemedButton({ variant, size, extraClassName, screenReaderSuffix, labelClassName, pending, label, ...buttonProps }) {
|
|
1334
|
+
const shown = pending?.label ?? label;
|
|
1308
1335
|
return /* @__PURE__ */ jsx("button", {
|
|
1309
1336
|
...buttonProps,
|
|
1337
|
+
...labelAttribute(shown),
|
|
1310
1338
|
className: themedButtonClasses(variant, size, extraClassName),
|
|
1311
1339
|
children: /* @__PURE__ */ jsx(ThemedButtonLabel, {
|
|
1312
|
-
label,
|
|
1340
|
+
label: shown,
|
|
1313
1341
|
pending,
|
|
1314
1342
|
screenReaderSuffix,
|
|
1315
1343
|
labelClassName
|
|
@@ -1319,6 +1347,7 @@ function ThemedButton({ variant, size, extraClassName, screenReaderSuffix, label
|
|
|
1319
1347
|
function ThemedButtonLink({ variant, size, extraClassName, screenReaderSuffix, labelClassName, label, ...anchorProps }) {
|
|
1320
1348
|
return /* @__PURE__ */ jsx("a", {
|
|
1321
1349
|
...anchorProps,
|
|
1350
|
+
...labelAttribute(label),
|
|
1322
1351
|
className: themedButtonClasses(variant, size, extraClassName),
|
|
1323
1352
|
children: /* @__PURE__ */ jsx(ThemedButtonLabel, {
|
|
1324
1353
|
label,
|
|
@@ -1331,6 +1360,7 @@ function ThemedButtonLink({ variant, size, extraClassName, screenReaderSuffix, l
|
|
|
1331
1360
|
function ThemedDownloadLink({ variant, size, extraClassName, label, screenReaderSuffix, labelClassName, ...anchorProps }) {
|
|
1332
1361
|
return /* @__PURE__ */ jsxs("a", {
|
|
1333
1362
|
...anchorProps,
|
|
1363
|
+
...labelAttribute(label),
|
|
1334
1364
|
className: themedButtonClasses(variant, size, extraClassName),
|
|
1335
1365
|
children: [/* @__PURE__ */ jsx(DownloadIcon, {
|
|
1336
1366
|
"aria-hidden": "true",
|
|
@@ -1347,16 +1377,18 @@ function ThemedAuthoredButton({ label, href, variant, size, extraClassName, disa
|
|
|
1347
1377
|
const affordance = resolveButtonAffordance({ trailingIcon });
|
|
1348
1378
|
const Icon = affordance ? getIconComponent(affordance.iconId) : null;
|
|
1349
1379
|
const className = variant ? themedButtonClasses(variant, size, Icon ? [extraClassName, themeButtonExtraClassesWithTrailingIcon()].filter(Boolean).join(" ") : extraClassName) : extraClassName ?? void 0;
|
|
1350
|
-
const content = /* @__PURE__ */ jsxs(Fragment, { children: [label, Icon ? /* @__PURE__ */ jsx(Icon, {
|
|
1380
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [variant ? /* @__PURE__ */ jsx(ButtonLabelText, { text: label }) : label, Icon ? /* @__PURE__ */ jsx(Icon, {
|
|
1351
1381
|
"aria-hidden": true,
|
|
1352
1382
|
className: "rb-ml-2 rb-h-4 rb-w-4 rb-inline-block"
|
|
1353
1383
|
}) : null] });
|
|
1384
|
+
const labelled = variant ? labelAttribute(label) : {};
|
|
1354
1385
|
return href ? /* @__PURE__ */ jsx("a", {
|
|
1355
1386
|
href,
|
|
1356
1387
|
target,
|
|
1357
1388
|
rel,
|
|
1358
1389
|
"aria-label": ariaLabel,
|
|
1359
1390
|
"data-testid": dataTestId,
|
|
1391
|
+
...labelled,
|
|
1360
1392
|
className,
|
|
1361
1393
|
onClick,
|
|
1362
1394
|
children: content
|
|
@@ -1365,6 +1397,7 @@ function ThemedAuthoredButton({ label, href, variant, size, extraClassName, disa
|
|
|
1365
1397
|
disabled,
|
|
1366
1398
|
"aria-label": ariaLabel,
|
|
1367
1399
|
"data-testid": dataTestId,
|
|
1400
|
+
...labelled,
|
|
1368
1401
|
className,
|
|
1369
1402
|
onClick,
|
|
1370
1403
|
children: content
|