@clickaroo/checkout-ui 0.1.3-beta → 0.1.5-beta
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/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/storybook/storybook-static/assets/APIs.en-BZfNNuoc.js +372 -0
- package/dist/storybook/storybook-static/assets/APIs.en-BZzPbEJW.js +372 -0
- package/dist/storybook/storybook-static/assets/APIs.en-Bf5J1Ifk.js +372 -0
- package/dist/storybook/storybook-static/assets/APIs.en-DSVQkUt3.js +372 -0
- package/dist/storybook/storybook-static/assets/APIs.en-DcEWunRx.js +372 -0
- package/dist/storybook/storybook-static/assets/APIs.en-DfWH0fys.js +372 -0
- package/dist/storybook/storybook-static/assets/APIs.en-TWb_-3VC.js +372 -0
- package/dist/storybook/storybook-static/assets/APIs.en-m6cq4XTv.js +372 -0
- package/dist/storybook/storybook-static/assets/APIs.en-nicPQ5AW.js +372 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage-BsnzMxJk.js +3 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage-CDW7SRyI.js +3 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage-CrHN6Fcv.js +3 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage-DFb28rrp.js +3 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage-DSLcTghb.js +3 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage-DYMMhAMX.js +3 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage-DgZ1RopD.js +3 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage-DvHYA1Jd.js +3 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage-d8MZfjpI.js +3 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage.en-BeknEgWZ.js +147 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage.en-Bsh4jm31.js +147 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage.en-Byu6MnFF.js +147 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage.en-C5I1UUQc.js +147 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage.en-CNVaEQvK.js +147 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage.en-D87qzfwm.js +147 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage.en-DLb_7NPf.js +147 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage.en-DQ0u0fHa.js +147 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage.en-DiHMI_iH.js +147 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage.stories-B5y94bOo.js +44 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage.stories-B8Vyz9GJ.js +44 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage.stories-BRP4VrvR.js +44 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage.stories-BahbUp4O.js +44 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage.stories-DAo0u2QI.js +44 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage.stories-DFK1bMdr.js +44 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage.stories-DLD3oWo_.js +44 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage.stories-DeC6lyzr.js +44 -0
- package/dist/storybook/storybook-static/assets/CheckoutPage.stories-DvaZetee.js +44 -0
- package/dist/storybook/storybook-static/assets/Color-YHDXOIA2-B0J9WR4k.js +1 -0
- package/dist/storybook/storybook-static/assets/Color-YHDXOIA2-BE_XGTCZ.js +1 -0
- package/dist/storybook/storybook-static/assets/Color-YHDXOIA2-B_hoSOu5.js +1 -0
- package/dist/storybook/storybook-static/assets/Color-YHDXOIA2-Bly_OAJP.js +1 -0
- package/dist/storybook/storybook-static/assets/Color-YHDXOIA2-BorkAxO4.js +1 -0
- package/dist/storybook/storybook-static/assets/Color-YHDXOIA2-C2GhQi7e.js +1 -0
- package/dist/storybook/storybook-static/assets/Color-YHDXOIA2-D3zu28Rn.js +1 -0
- package/dist/storybook/storybook-static/assets/Color-YHDXOIA2-DI94E3AI.js +1 -0
- package/dist/storybook/storybook-static/assets/Color-YHDXOIA2-DVI1_7_g.js +1 -0
- package/dist/storybook/storybook-static/assets/CustomCheckout.en-8VNcggT9.js +211 -0
- package/dist/storybook/storybook-static/assets/CustomCheckout.en-BMJEFVTk.js +211 -0
- package/dist/storybook/storybook-static/assets/CustomCheckout.en-Bg4oz9hS.js +211 -0
- package/dist/storybook/storybook-static/assets/CustomCheckout.en-Bq25x8qa.js +211 -0
- package/dist/storybook/storybook-static/assets/CustomCheckout.en-BvF7SmOy.js +211 -0
- package/dist/storybook/storybook-static/assets/CustomCheckout.en-CckpRGsp.js +211 -0
- package/dist/storybook/storybook-static/assets/CustomCheckout.en-D80ZpldF.js +211 -0
- package/dist/storybook/storybook-static/assets/CustomCheckout.en-uXQeih6h.js +211 -0
- package/dist/storybook/storybook-static/assets/CustomCheckout.en-wshSoFMr.js +211 -0
- package/dist/storybook/storybook-static/assets/CustomCheckout.stories-B8CnjGCn.js +6 -0
- package/dist/storybook/storybook-static/assets/CustomCheckout.stories-BQkpNbox.js +6 -0
- package/dist/storybook/storybook-static/assets/CustomCheckout.stories-BrF5j7zs.js +6 -0
- package/dist/storybook/storybook-static/assets/CustomCheckout.stories-CKQKzMq0.js +6 -0
- package/dist/storybook/storybook-static/assets/CustomCheckout.stories-DhCrUQc1.js +6 -0
- package/dist/storybook/storybook-static/assets/CustomCheckout.stories-F2GZKkIG.js +6 -0
- package/dist/storybook/storybook-static/assets/CustomCheckout.stories-V2NHLbZo.js +6 -0
- package/dist/storybook/storybook-static/assets/CustomCheckout.stories-ZCeqtMGJ.js +6 -0
- package/dist/storybook/storybook-static/assets/CustomCheckout.stories-rMIVoUs4.js +6 -0
- package/dist/storybook/storybook-static/assets/CustomerInfo-BMTfZ9z3.js +1 -0
- package/dist/storybook/storybook-static/assets/CustomerInfo-BqCSWi4I.js +1 -0
- package/dist/storybook/storybook-static/assets/CustomerInfo-BwyY9803.js +1 -0
- package/dist/storybook/storybook-static/assets/CustomerInfo-CPNuEjrH.js +1 -0
- package/dist/storybook/storybook-static/assets/CustomerInfo-CTx1dFS3.js +1 -0
- package/dist/storybook/storybook-static/assets/CustomerInfo-Cp0u57C5.js +1 -0
- package/dist/storybook/storybook-static/assets/CustomerInfo-D3WHpN32.js +1 -0
- package/dist/storybook/storybook-static/assets/CustomerInfo-DShSrjMR.js +1 -0
- package/dist/storybook/storybook-static/assets/CustomerInfo-mKAI6gWW.js +1 -0
- package/dist/storybook/storybook-static/assets/CustomerInfo.stories-BAbhNSal.js +9 -0
- package/dist/storybook/storybook-static/assets/CustomerInfo.stories-BeF8Yh1A.js +9 -0
- package/dist/storybook/storybook-static/assets/CustomerInfo.stories-BwCrEBgN.js +9 -0
- package/dist/storybook/storybook-static/assets/CustomerInfo.stories-CYx1hKNg.js +9 -0
- package/dist/storybook/storybook-static/assets/CustomerInfo.stories-D1l3Glaq.js +9 -0
- package/dist/storybook/storybook-static/assets/CustomerInfo.stories-DB2C3zqQ.js +9 -0
- package/dist/storybook/storybook-static/assets/CustomerInfo.stories-Dv6cHWui.js +9 -0
- package/dist/storybook/storybook-static/assets/CustomerInfo.stories-jpdDC3ta.js +9 -0
- package/dist/storybook/storybook-static/assets/CustomerInfo.stories-tyhy9PWf.js +9 -0
- package/dist/storybook/storybook-static/assets/DeliveryAddress-CD42v0od.js +2 -0
- package/dist/storybook/storybook-static/assets/DeliveryAddress-CeuByf4d.js +2 -0
- package/dist/storybook/storybook-static/assets/DeliveryAddress-DOxyPw17.js +2 -0
- package/dist/storybook/storybook-static/assets/DeliveryAddress-DY5lFnTv.js +2 -0
- package/dist/storybook/storybook-static/assets/DeliveryAddress-DaRy4l-D.js +2 -0
- package/dist/storybook/storybook-static/assets/DeliveryAddress-Lfanl1PO.js +2 -0
- package/dist/storybook/storybook-static/assets/DeliveryAddress-QAGxLlLf.js +2 -0
- package/dist/storybook/storybook-static/assets/DeliveryAddress-TRtlNz2v.js +2 -0
- package/dist/storybook/storybook-static/assets/DeliveryAddress-X81XGbKD.js +2 -0
- package/dist/storybook/storybook-static/assets/DeliveryAddress.stories-BvAXTiNm.js +9 -0
- package/dist/storybook/storybook-static/assets/DeliveryAddress.stories-C1JtetLS.js +9 -0
- package/dist/storybook/storybook-static/assets/DeliveryAddress.stories-C8sE6JJZ.js +9 -0
- package/dist/storybook/storybook-static/assets/DeliveryAddress.stories-CBScReyV.js +9 -0
- package/dist/storybook/storybook-static/assets/DeliveryAddress.stories-CTyS3zFt.js +9 -0
- package/dist/storybook/storybook-static/assets/DeliveryAddress.stories-CqmJ_Wn7.js +9 -0
- package/dist/storybook/storybook-static/assets/DeliveryAddress.stories-DHyw5QNl.js +9 -0
- package/dist/storybook/storybook-static/assets/DeliveryAddress.stories-FMwTSh9f.js +9 -0
- package/dist/storybook/storybook-static/assets/DeliveryAddress.stories-vQ0cdVl6.js +9 -0
- package/dist/storybook/storybook-static/assets/DocsRenderer-CFRXHY34-4VFo0TRH.js +2 -0
- package/dist/storybook/storybook-static/assets/DocsRenderer-CFRXHY34-BKek9MhZ.js +2 -0
- package/dist/storybook/storybook-static/assets/DocsRenderer-CFRXHY34-C4t3f4os.js +2 -0
- package/dist/storybook/storybook-static/assets/DocsRenderer-CFRXHY34-CtrnOF1G.js +2 -0
- package/dist/storybook/storybook-static/assets/DocsRenderer-CFRXHY34-DU1kBIGp.js +2 -0
- package/dist/storybook/storybook-static/assets/DocsRenderer-CFRXHY34-DzgR8M-W.js +2 -0
- package/dist/storybook/storybook-static/assets/DocsRenderer-CFRXHY34-OiuU2wez.js +2 -0
- package/dist/storybook/storybook-static/assets/DocsRenderer-CFRXHY34-Q5WDl3Gp.js +2 -0
- package/dist/storybook/storybook-static/assets/DocsRenderer-CFRXHY34-sE6BxCwu.js +2 -0
- package/dist/storybook/storybook-static/assets/Guide.en-BJ4qiYIc.js +107 -0
- package/dist/storybook/storybook-static/assets/Guide.en-BRVwtDXj.js +107 -0
- package/dist/storybook/storybook-static/assets/Guide.en-Boc44Lax.js +107 -0
- package/dist/storybook/storybook-static/assets/Guide.en-CKA244dX.js +107 -0
- package/dist/storybook/storybook-static/assets/Guide.en-CiR7CrYZ.js +107 -0
- package/dist/storybook/storybook-static/assets/Guide.en-Citkzdg9.js +107 -0
- package/dist/storybook/storybook-static/assets/Guide.en-DPJzC5RR.js +107 -0
- package/dist/storybook/storybook-static/assets/Guide.en-Dn9xb9YI.js +107 -0
- package/dist/storybook/storybook-static/assets/Guide.en-XzxJQK_F.js +107 -0
- package/dist/storybook/storybook-static/assets/PaymentMethods-BFtlMopq.js +2 -0
- package/dist/storybook/storybook-static/assets/PaymentMethods-BNEEARzu.js +2 -0
- package/dist/storybook/storybook-static/assets/PaymentMethods-BnPZRrAs.js +2 -0
- package/dist/storybook/storybook-static/assets/PaymentMethods-Buladk2O.js +2 -0
- package/dist/storybook/storybook-static/assets/PaymentMethods-CBXk2f9N.js +2 -0
- package/dist/storybook/storybook-static/assets/PaymentMethods-DmV3o0ow.js +2 -0
- package/dist/storybook/storybook-static/assets/PaymentMethods-DxorWSOl.js +2 -0
- package/dist/storybook/storybook-static/assets/PaymentMethods-afz1CTO5.js +2 -0
- package/dist/storybook/storybook-static/assets/PaymentMethods-e9HqQtxN.js +2 -0
- package/dist/storybook/storybook-static/assets/PaymentMethods.stories-6fZvfvMO.js +9 -0
- package/dist/storybook/storybook-static/assets/PaymentMethods.stories-Bc4jYrum.js +9 -0
- package/dist/storybook/storybook-static/assets/PaymentMethods.stories-CcjSRFbb.js +9 -0
- package/dist/storybook/storybook-static/assets/PaymentMethods.stories-ChiL9TJn.js +9 -0
- package/dist/storybook/storybook-static/assets/PaymentMethods.stories-D1SSfWqv.js +9 -0
- package/dist/storybook/storybook-static/assets/PaymentMethods.stories-DJpOtGJg.js +9 -0
- package/dist/storybook/storybook-static/assets/PaymentMethods.stories-Dyg3R8Cs.js +9 -0
- package/dist/storybook/storybook-static/assets/PaymentMethods.stories-U-xbCFtF.js +9 -0
- package/dist/storybook/storybook-static/assets/PaymentMethods.stories-pOuLDPwE.js +9 -0
- package/dist/storybook/storybook-static/assets/QuickStart.en-8otT6VDx.js +136 -0
- package/dist/storybook/storybook-static/assets/QuickStart.en-B2goyY4Q.js +136 -0
- package/dist/storybook/storybook-static/assets/QuickStart.en-Bz56Z2wW.js +136 -0
- package/dist/storybook/storybook-static/assets/QuickStart.en-C1fKNHfm.js +136 -0
- package/dist/storybook/storybook-static/assets/QuickStart.en-CEFLfOWt.js +136 -0
- package/dist/storybook/storybook-static/assets/QuickStart.en-Ct2dMZNT.js +136 -0
- package/dist/storybook/storybook-static/assets/QuickStart.en-D5OiYfrB.js +136 -0
- package/dist/storybook/storybook-static/assets/QuickStart.en-D6K1vnx2.js +136 -0
- package/dist/storybook/storybook-static/assets/QuickStart.en-wgtxGAFt.js +136 -0
- package/dist/storybook/storybook-static/assets/ValidateInput-BKNagaQv.js +2 -0
- package/dist/storybook/storybook-static/assets/ValidateInput-BMZhq5zE.js +2 -0
- package/dist/storybook/storybook-static/assets/ValidateInput-CECRKp4c.js +2 -0
- package/dist/storybook/storybook-static/assets/ValidateInput-CXYuXafK.js +2 -0
- package/dist/storybook/storybook-static/assets/ValidateInput-Cl2O4HCX.js +2 -0
- package/dist/storybook/storybook-static/assets/ValidateInput-DcnOO9py.js +2 -0
- package/dist/storybook/storybook-static/assets/ValidateInput-LNzX4jJP.js +2 -0
- package/dist/storybook/storybook-static/assets/ValidateInput-np1-zwvJ.js +2 -0
- package/dist/storybook/storybook-static/assets/ValidateInput-sZgX3GCF.js +2 -0
- package/dist/storybook/storybook-static/assets/entry-preview-BAF1DioI.js +2 -0
- package/dist/storybook/storybook-static/assets/entry-preview-BAb-nh3P.js +2 -0
- package/dist/storybook/storybook-static/assets/entry-preview-BQMc41xo.js +2 -0
- package/dist/storybook/storybook-static/assets/entry-preview-Bnn64O7J.js +2 -0
- package/dist/storybook/storybook-static/assets/entry-preview-C4SPQchM.js +2 -0
- package/dist/storybook/storybook-static/assets/entry-preview-CAnH1TUA.js +2 -0
- package/dist/storybook/storybook-static/assets/entry-preview-Dbi49YCK.js +2 -0
- package/dist/storybook/storybook-static/assets/entry-preview-GhM6ttN0.js +2 -0
- package/dist/storybook/storybook-static/assets/entry-preview-hHv11-z5.js +2 -0
- package/dist/storybook/storybook-static/assets/iframe-CakT_Hx-.js +211 -0
- package/dist/storybook/storybook-static/assets/iframe-Ce3kgeV4.js +211 -0
- package/dist/storybook/storybook-static/assets/iframe-Crv4raYy.js +211 -0
- package/dist/storybook/storybook-static/assets/iframe-CueR_wS4.js +211 -0
- package/dist/storybook/storybook-static/assets/iframe-DWFwLXCc.js +211 -0
- package/dist/storybook/storybook-static/assets/iframe-DsSsblW_.js +211 -0
- package/dist/storybook/storybook-static/assets/iframe-PThBYPHV.js +211 -0
- package/dist/storybook/storybook-static/assets/iframe-SJLFWhX6.js +211 -0
- package/dist/storybook/storybook-static/assets/iframe-eGyOKkka.js +211 -0
- package/dist/storybook/storybook-static/assets/index-3vMs57rT.js +575 -0
- package/dist/storybook/storybook-static/assets/index-BlPVJQpb.js +575 -0
- package/dist/storybook/storybook-static/assets/index-Bz3Q1Yw_.js +575 -0
- package/dist/storybook/storybook-static/assets/index-CZFGp9Su.js +575 -0
- package/dist/storybook/storybook-static/assets/index-CkNSuRJg.js +575 -0
- package/dist/storybook/storybook-static/assets/index-D66ljFJA.js +575 -0
- package/dist/storybook/storybook-static/assets/index-DnrKlQ76.js +575 -0
- package/dist/storybook/storybook-static/assets/index-DoDFfets.js +575 -0
- package/dist/storybook/storybook-static/assets/index-LRKEu_dQ.js +575 -0
- package/dist/storybook/storybook-static/assets/preview-884UjfA3.js +2 -0
- package/dist/storybook/storybook-static/assets/preview-C1X5Ys-q.js +2 -0
- package/dist/storybook/storybook-static/assets/preview-CbAwkmzD.js +2 -0
- package/dist/storybook/storybook-static/assets/preview-DGJdQn9n.js +2 -0
- package/dist/storybook/storybook-static/assets/preview-DJkpO_nB.js +2 -0
- package/dist/storybook/storybook-static/assets/preview-DNROAajq.js +2 -0
- package/dist/storybook/storybook-static/assets/preview-De1PUXkc.js +2 -0
- package/dist/storybook/storybook-static/assets/preview-DyVoah3G.js +2 -0
- package/dist/storybook/storybook-static/assets/preview-EmPtksy2.js +2 -0
- package/dist/storybook/storybook-static/assets/useCheckoutContext-3YTrU8Qh.js +27 -0
- package/dist/storybook/storybook-static/assets/useCheckoutContext-B8tsk5b5.js +27 -0
- package/dist/storybook/storybook-static/assets/useCheckoutContext-BW2h13W8.js +27 -0
- package/dist/storybook/storybook-static/assets/useCheckoutContext-BXtGY5u3.js +27 -0
- package/dist/storybook/storybook-static/assets/useCheckoutContext-C6u4Rp5U.js +27 -0
- package/dist/storybook/storybook-static/assets/useCheckoutContext-C7KjDyWW.js +27 -0
- package/dist/storybook/storybook-static/assets/useCheckoutContext-CroxIBFh.js +27 -0
- package/dist/storybook/storybook-static/assets/useCheckoutContext-DuJ1Ep0-.js +27 -0
- package/dist/storybook/storybook-static/assets/useCheckoutContext-L3zhltsm.js +27 -0
- package/dist/storybook/storybook-static/iframe.html +1 -1
- package/dist/storybook/storybook-static/project.json +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import{j as e}from"./jsx-runtime-DiklIkkE.js";import{useMDXComponents as r}from"./index-ChEI-nsM.js";import{M as c,C as t,a as d}from"./index-D66ljFJA.js";import{Default as s}from"./PaymentMethods.stories-CcjSRFbb.js";import{D as a}from"./CustomCheckout.stories-BrF5j7zs.js";import"./index-DRjF_FHU.js";import"./iframe-CakT_Hx-.js";import"./index-B7ki2Uzk.js";import"./index-D-Mha1DF.js";import"./index-DrFu-skq.js";import"./PaymentMethods-BFtlMopq.js";import"./useCheckoutContext-C7KjDyWW.js";/* empty css */import"./CheckoutPage-CDW7SRyI.js";import"./CustomerInfo-CPNuEjrH.js";import"./ValidateInput-BKNagaQv.js";import"./DeliveryAddress-CeuByf4d.js";function i(o){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...r(),...o.components};return e.jsxs(e.Fragment,{children:[e.jsx(c,{title:"Documentation/Guide"}),`
|
|
2
|
+
`,e.jsx(n.h1,{id:"getting-started-guide",children:"Getting Started Guide"}),`
|
|
3
|
+
`,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"@clickaroo/checkout-ui"})," is a comprehensive checkout page component library designed for React applications, providing a complete checkout flow solution. The library includes core features such as customer information collection, delivery address management, payment method selection, and integrates seamlessly with payment systems."]}),`
|
|
4
|
+
`,e.jsx(n.p,{children:"This guide will walk you through different ways to integrate the checkout components into your React application, from the simplest all-in-one solution to fully customized implementations."}),`
|
|
5
|
+
`,e.jsxs(n.blockquote,{children:[`
|
|
6
|
+
`,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"Note"}),": If you're new to this library, we recommend starting with the ",e.jsx(n.a,{href:"./?path=/docs/documentation-quickstart--docs",children:"Quick Start Guide"})," which covers installation, basic usage with ",e.jsx(n.code,{children:"CheckoutPage"}),", and event callbacks."]}),`
|
|
7
|
+
`]}),`
|
|
8
|
+
`,e.jsx(n.h3,{id:"quick-integration-with-checkoutpage",children:"Quick Integration with CheckoutPage"}),`
|
|
9
|
+
`,e.jsxs(n.p,{children:["The simplest way to integrate is using the ",e.jsx(n.code,{children:"CheckoutPage"})," component, which includes the complete checkout flow. With this single component, you can quickly integrate a full-featured checkout experience."]}),`
|
|
10
|
+
`,e.jsxs(n.p,{children:["👉 See the ",e.jsx(n.a,{href:"./?path=/docs/documentation-quickstart--docs#use-checkout-all-in-one",children:"Use Checkout All in One"})," section in the Quick Start Guide for detailed instructions and examples."]}),`
|
|
11
|
+
`,e.jsx(n.h3,{id:"payment-only-integration",children:"Payment-Only Integration"}),`
|
|
12
|
+
`,e.jsxs(n.p,{children:["If you only need payment functionality and have already collected customer and address information elsewhere in your application, you can use the ",e.jsx(n.code,{children:"PaymentMethods"})," component independently."]}),`
|
|
13
|
+
`,e.jsx(t,{of:s}),`
|
|
14
|
+
`,e.jsx(n.h4,{id:"props",children:"Props"}),`
|
|
15
|
+
`,e.jsx(d,{of:s}),`
|
|
16
|
+
`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-tsx",children:`import { CheckoutProvider, PaymentMethods } from '@clickaroo/checkout-ui';
|
|
17
|
+
|
|
18
|
+
function PaymentOnly() {
|
|
19
|
+
const cart = [
|
|
20
|
+
{
|
|
21
|
+
sku: "TEST001",
|
|
22
|
+
offerPricePoint: "OPP-TEST001",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
sku: "TEST002",
|
|
26
|
+
offerPricePoint: "OPP-TEST002",
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<CheckoutProvider cart={cart}>
|
|
32
|
+
<PaymentMethods />
|
|
33
|
+
</CheckoutProvider>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
`})}),`
|
|
37
|
+
`,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"Important Notes:"}),`
|
|
38
|
+
The `,e.jsx(n.code,{children:"PaymentMethods"})," component must be wrapped in a ",e.jsx(n.code,{children:"CheckoutProvider"}),". See ",e.jsx(n.a,{href:"./?path=/docs/components-customcheckout--customcheckout-english#using-checkoutprovider",children:"CheckoutProvider Props"})," for all available configuration options."]}),`
|
|
39
|
+
`,e.jsx(n.p,{children:"To complete the full payment flow (including order submission), you'll need to use the APIs and hooks provided by the library:"}),`
|
|
40
|
+
`,e.jsxs(n.ol,{children:[`
|
|
41
|
+
`,e.jsxs(n.li,{children:["Update customer and address information using ",e.jsx(n.code,{children:"updateCustomerInfo"})," and ",e.jsx(n.code,{children:"updateDeliveryAddress"})," from ",e.jsx(n.code,{children:"useCheckoutContext"})," hook"]}),`
|
|
42
|
+
`,e.jsxs(n.li,{children:["Use the ",e.jsx(n.code,{children:"useOrderSubmission"})," hook to handle order submission"]}),`
|
|
43
|
+
`,e.jsxs(n.li,{children:["Create a custom submit button that calls ",e.jsx(n.code,{children:"submitOrder()"})," from the ",e.jsx(n.code,{children:"useOrderSubmission"})," hook when clicked"]}),`
|
|
44
|
+
`]}),`
|
|
45
|
+
`,e.jsxs(n.p,{children:["For a complete implementation example, see the ",e.jsx(n.a,{href:"./?path=/docs/documentation-apis--docs",children:"APIs documentation"})," section on ",e.jsx(n.code,{children:"useOrderSubmission"}),"."]}),`
|
|
46
|
+
`,e.jsx(n.h3,{id:"custom-checkout",children:"Custom Checkout"}),`
|
|
47
|
+
`,e.jsx(n.p,{children:"You can build a custom checkout page by mixing and matching the library's built-in components with your own custom components. This gives you full control over the layout, styling, and user experience while leveraging the library's functionality."}),`
|
|
48
|
+
`,e.jsx(t,{of:a}),`
|
|
49
|
+
`,e.jsxs(n.p,{children:["You can replace some built-in components with your own custom implementations, but ",e.jsxs(n.strong,{children:[e.jsx(n.code,{children:"PaymentMethods"})," must always be used from the library"]})," as it contains critical payment logic that cannot be customized."]}),`
|
|
50
|
+
`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-tsx",children:`import {
|
|
51
|
+
CheckoutProvider,
|
|
52
|
+
PaymentMethods,
|
|
53
|
+
useCheckoutContext,
|
|
54
|
+
useOrderSubmission
|
|
55
|
+
} from '@clickaroo/checkout-ui';
|
|
56
|
+
|
|
57
|
+
function CustomCheckout() {
|
|
58
|
+
const cart = [{ sku: "TEST001", offerPricePoint: "OPP-TEST001" }];
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
// All components must be wrapped in CheckoutProvider
|
|
62
|
+
<CheckoutProvider cart={cart}>
|
|
63
|
+
<MyCustomCustomerInfo />
|
|
64
|
+
<MyCustomDeliveryAddress />
|
|
65
|
+
<PaymentMethods /> {/* Required - cannot be customized */}
|
|
66
|
+
<MyCustomSubmitButton />
|
|
67
|
+
</CheckoutProvider>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Use hooks to build custom components
|
|
72
|
+
function MyCustomCustomerInfo() {
|
|
73
|
+
const { customerInfo, updateCustomerInfo } = useCheckoutContext();
|
|
74
|
+
// use hook to update form data
|
|
75
|
+
updateCustomerInfo({ firstName: 'xxx', lastName: 'xxx', ...})
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function MyCustomDeliveryAddress() {
|
|
79
|
+
const { deliveryAddress, updateDeliveryAddress } = useCheckoutContext();
|
|
80
|
+
// Your custom form implementation
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function MyCustomSubmitButton() {
|
|
84
|
+
const { isFormValid } = useCheckoutContext();
|
|
85
|
+
// use hook to handle order submission
|
|
86
|
+
const { isSubmitting, submitOrder } = useOrderSubmission();
|
|
87
|
+
// Your custom button implementation
|
|
88
|
+
}
|
|
89
|
+
`})}),`
|
|
90
|
+
`,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"Important Notes:"})," All components must be wrapped in CheckoutProvider. See ",e.jsx(n.a,{href:"./?path=/docs/components-customcheckout--customcheckout-english#using-checkoutprovider",children:"CheckoutProvider Props"})," for all available configuration options."]}),`
|
|
91
|
+
`,e.jsxs(n.p,{children:["For a complete implementation example, see the ",e.jsx(n.a,{href:"./?path=/docs/components-customcheckout--customcheckout-english",children:"CustomCheckout documentation"}),"."]}),`
|
|
92
|
+
`,e.jsx(n.h3,{id:"apis-and-hooks",children:"APIs and Hooks"}),`
|
|
93
|
+
`,e.jsx(n.p,{children:"As mentioned above, the component library provides HTTP APIs and React Hooks for more granular control and advanced use cases."}),`
|
|
94
|
+
`,e.jsx(n.h4,{id:"http-apis",children:"HTTP APIs"}),`
|
|
95
|
+
`,e.jsxs(n.ul,{children:[`
|
|
96
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"getPricePointInfo"})})," - Get price point information (supports single or multiple price points)"]}),`
|
|
97
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"createOrder"})})," - Create an order with the provided order data"]}),`
|
|
98
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"getOrderDetail"})})," - Get detailed information about an order by order code"]}),`
|
|
99
|
+
`]}),`
|
|
100
|
+
`,e.jsx(n.h4,{id:"react-hooks",children:"React Hooks"}),`
|
|
101
|
+
`,e.jsxs(n.ul,{children:[`
|
|
102
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"useCheckoutContext"})})," - Access checkout state and update functions (customer info, delivery address, form validation)"]}),`
|
|
103
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"useOrderSubmission"})})," - Handle order submission with loading states and error handling"]}),`
|
|
104
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"useOrderDetail"})})," - Fetch order details"]}),`
|
|
105
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"usePricePointInfo"})})," - Get price point information"]}),`
|
|
106
|
+
`]}),`
|
|
107
|
+
`,e.jsxs(n.p,{children:["For detailed API documentation and hook usage examples, see the ",e.jsx(n.a,{href:"./?path=/docs/documentation-apis--docs",children:"APIs Documentation"}),"."]})]})}function I(o={}){const{wrapper:n}={...r(),...o.components};return n?e.jsx(n,{...o,children:e.jsx(i,{...o})}):i(o)}export{I as default};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import{j as e}from"./jsx-runtime-DiklIkkE.js";import{useMDXComponents as r}from"./index-ChEI-nsM.js";import{M as c,C as t,a as d}from"./index-3vMs57rT.js";import{Default as s}from"./PaymentMethods.stories-U-xbCFtF.js";import{D as a}from"./CustomCheckout.stories-B8CnjGCn.js";import"./index-DRjF_FHU.js";import"./iframe-DWFwLXCc.js";import"./index-B7ki2Uzk.js";import"./index-D-Mha1DF.js";import"./index-DrFu-skq.js";import"./PaymentMethods-DmV3o0ow.js";import"./useCheckoutContext-BW2h13W8.js";/* empty css */import"./CheckoutPage-DSLcTghb.js";import"./CustomerInfo-DShSrjMR.js";import"./ValidateInput-CECRKp4c.js";import"./DeliveryAddress-DY5lFnTv.js";function i(o){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...r(),...o.components};return e.jsxs(e.Fragment,{children:[e.jsx(c,{title:"Documentation/Guide"}),`
|
|
2
|
+
`,e.jsx(n.h1,{id:"getting-started-guide",children:"Getting Started Guide"}),`
|
|
3
|
+
`,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"@clickaroo/checkout-ui"})," is a comprehensive checkout page component library designed for React applications, providing a complete checkout flow solution. The library includes core features such as customer information collection, delivery address management, payment method selection, and integrates seamlessly with payment systems."]}),`
|
|
4
|
+
`,e.jsx(n.p,{children:"This guide will walk you through different ways to integrate the checkout components into your React application, from the simplest all-in-one solution to fully customized implementations."}),`
|
|
5
|
+
`,e.jsxs(n.blockquote,{children:[`
|
|
6
|
+
`,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"Note"}),": If you're new to this library, we recommend starting with the ",e.jsx(n.a,{href:"./?path=/docs/documentation-quickstart--docs",children:"Quick Start Guide"})," which covers installation, basic usage with ",e.jsx(n.code,{children:"CheckoutPage"}),", and event callbacks."]}),`
|
|
7
|
+
`]}),`
|
|
8
|
+
`,e.jsx(n.h3,{id:"quick-integration-with-checkoutpage",children:"Quick Integration with CheckoutPage"}),`
|
|
9
|
+
`,e.jsxs(n.p,{children:["The simplest way to integrate is using the ",e.jsx(n.code,{children:"CheckoutPage"})," component, which includes the complete checkout flow. With this single component, you can quickly integrate a full-featured checkout experience."]}),`
|
|
10
|
+
`,e.jsxs(n.p,{children:["👉 See the ",e.jsx(n.a,{href:"./?path=/docs/documentation-quickstart--docs#use-checkout-all-in-one",children:"Use Checkout All in One"})," section in the Quick Start Guide for detailed instructions and examples."]}),`
|
|
11
|
+
`,e.jsx(n.h3,{id:"payment-only-integration",children:"Payment-Only Integration"}),`
|
|
12
|
+
`,e.jsxs(n.p,{children:["If you only need payment functionality and have already collected customer and address information elsewhere in your application, you can use the ",e.jsx(n.code,{children:"PaymentMethods"})," component independently."]}),`
|
|
13
|
+
`,e.jsx(t,{of:s}),`
|
|
14
|
+
`,e.jsx(n.h4,{id:"props",children:"Props"}),`
|
|
15
|
+
`,e.jsx(d,{of:s}),`
|
|
16
|
+
`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-tsx",children:`import { CheckoutProvider, PaymentMethods } from '@clickaroo/checkout-ui';
|
|
17
|
+
|
|
18
|
+
function PaymentOnly() {
|
|
19
|
+
const cart = [
|
|
20
|
+
{
|
|
21
|
+
sku: "TEST001",
|
|
22
|
+
offerPricePoint: "OPP-TEST001",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
sku: "TEST002",
|
|
26
|
+
offerPricePoint: "OPP-TEST002",
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<CheckoutProvider cart={cart}>
|
|
32
|
+
<PaymentMethods />
|
|
33
|
+
</CheckoutProvider>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
`})}),`
|
|
37
|
+
`,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"Important Notes:"}),`
|
|
38
|
+
The `,e.jsx(n.code,{children:"PaymentMethods"})," component must be wrapped in a ",e.jsx(n.code,{children:"CheckoutProvider"}),". See ",e.jsx(n.a,{href:"./?path=/docs/components-customcheckout--customcheckout-english#using-checkoutprovider",children:"CheckoutProvider Props"})," for all available configuration options."]}),`
|
|
39
|
+
`,e.jsx(n.p,{children:"To complete the full payment flow (including order submission), you'll need to use the APIs and hooks provided by the library:"}),`
|
|
40
|
+
`,e.jsxs(n.ol,{children:[`
|
|
41
|
+
`,e.jsxs(n.li,{children:["Update customer and address information using ",e.jsx(n.code,{children:"updateCustomerInfo"})," and ",e.jsx(n.code,{children:"updateDeliveryAddress"})," from ",e.jsx(n.code,{children:"useCheckoutContext"})," hook"]}),`
|
|
42
|
+
`,e.jsxs(n.li,{children:["Use the ",e.jsx(n.code,{children:"useOrderSubmission"})," hook to handle order submission"]}),`
|
|
43
|
+
`,e.jsxs(n.li,{children:["Create a custom submit button that calls ",e.jsx(n.code,{children:"submitOrder()"})," from the ",e.jsx(n.code,{children:"useOrderSubmission"})," hook when clicked"]}),`
|
|
44
|
+
`]}),`
|
|
45
|
+
`,e.jsxs(n.p,{children:["For a complete implementation example, see the ",e.jsx(n.a,{href:"./?path=/docs/documentation-apis--docs",children:"APIs documentation"})," section on ",e.jsx(n.code,{children:"useOrderSubmission"}),"."]}),`
|
|
46
|
+
`,e.jsx(n.h3,{id:"custom-checkout",children:"Custom Checkout"}),`
|
|
47
|
+
`,e.jsx(n.p,{children:"You can build a custom checkout page by mixing and matching the library's built-in components with your own custom components. This gives you full control over the layout, styling, and user experience while leveraging the library's functionality."}),`
|
|
48
|
+
`,e.jsx(t,{of:a}),`
|
|
49
|
+
`,e.jsxs(n.p,{children:["You can replace some built-in components with your own custom implementations, but ",e.jsxs(n.strong,{children:[e.jsx(n.code,{children:"PaymentMethods"})," must always be used from the library"]})," as it contains critical payment logic that cannot be customized."]}),`
|
|
50
|
+
`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-tsx",children:`import {
|
|
51
|
+
CheckoutProvider,
|
|
52
|
+
PaymentMethods,
|
|
53
|
+
useCheckoutContext,
|
|
54
|
+
useOrderSubmission
|
|
55
|
+
} from '@clickaroo/checkout-ui';
|
|
56
|
+
|
|
57
|
+
function CustomCheckout() {
|
|
58
|
+
const cart = [{ sku: "TEST001", offerPricePoint: "OPP-TEST001" }];
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
// All components must be wrapped in CheckoutProvider
|
|
62
|
+
<CheckoutProvider cart={cart}>
|
|
63
|
+
<MyCustomCustomerInfo />
|
|
64
|
+
<MyCustomDeliveryAddress />
|
|
65
|
+
<PaymentMethods /> {/* Required - cannot be customized */}
|
|
66
|
+
<MyCustomSubmitButton />
|
|
67
|
+
</CheckoutProvider>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Use hooks to build custom components
|
|
72
|
+
function MyCustomCustomerInfo() {
|
|
73
|
+
const { customerInfo, updateCustomerInfo } = useCheckoutContext();
|
|
74
|
+
// use hook to update form data
|
|
75
|
+
updateCustomerInfo({ firstName: 'xxx', lastName: 'xxx', ...})
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function MyCustomDeliveryAddress() {
|
|
79
|
+
const { deliveryAddress, updateDeliveryAddress } = useCheckoutContext();
|
|
80
|
+
// Your custom form implementation
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function MyCustomSubmitButton() {
|
|
84
|
+
const { isFormValid } = useCheckoutContext();
|
|
85
|
+
// use hook to handle order submission
|
|
86
|
+
const { isSubmitting, submitOrder } = useOrderSubmission();
|
|
87
|
+
// Your custom button implementation
|
|
88
|
+
}
|
|
89
|
+
`})}),`
|
|
90
|
+
`,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"Important Notes:"})," All components must be wrapped in CheckoutProvider. See ",e.jsx(n.a,{href:"./?path=/docs/components-customcheckout--customcheckout-english#using-checkoutprovider",children:"CheckoutProvider Props"})," for all available configuration options."]}),`
|
|
91
|
+
`,e.jsxs(n.p,{children:["For a complete implementation example, see the ",e.jsx(n.a,{href:"./?path=/docs/components-customcheckout--customcheckout-english",children:"CustomCheckout documentation"}),"."]}),`
|
|
92
|
+
`,e.jsx(n.h3,{id:"apis-and-hooks",children:"APIs and Hooks"}),`
|
|
93
|
+
`,e.jsx(n.p,{children:"As mentioned above, the component library provides HTTP APIs and React Hooks for more granular control and advanced use cases."}),`
|
|
94
|
+
`,e.jsx(n.h4,{id:"http-apis",children:"HTTP APIs"}),`
|
|
95
|
+
`,e.jsxs(n.ul,{children:[`
|
|
96
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"getPricePointInfo"})})," - Get price point information (supports single or multiple price points)"]}),`
|
|
97
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"createOrder"})})," - Create an order with the provided order data"]}),`
|
|
98
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"getOrderDetail"})})," - Get detailed information about an order by order code"]}),`
|
|
99
|
+
`]}),`
|
|
100
|
+
`,e.jsx(n.h4,{id:"react-hooks",children:"React Hooks"}),`
|
|
101
|
+
`,e.jsxs(n.ul,{children:[`
|
|
102
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"useCheckoutContext"})})," - Access checkout state and update functions (customer info, delivery address, form validation)"]}),`
|
|
103
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"useOrderSubmission"})})," - Handle order submission with loading states and error handling"]}),`
|
|
104
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"useOrderDetail"})})," - Fetch order details"]}),`
|
|
105
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"usePricePointInfo"})})," - Get price point information"]}),`
|
|
106
|
+
`]}),`
|
|
107
|
+
`,e.jsxs(n.p,{children:["For detailed API documentation and hook usage examples, see the ",e.jsx(n.a,{href:"./?path=/docs/documentation-apis--docs",children:"APIs Documentation"}),"."]})]})}function I(o={}){const{wrapper:n}={...r(),...o.components};return n?e.jsx(n,{...o,children:e.jsx(i,{...o})}):i(o)}export{I as default};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import{j as e}from"./jsx-runtime-DiklIkkE.js";import{useMDXComponents as r}from"./index-ChEI-nsM.js";import{M as c,C as t,a as d}from"./index-DnrKlQ76.js";import{Default as s}from"./PaymentMethods.stories-Dyg3R8Cs.js";import{D as a}from"./CustomCheckout.stories-BQkpNbox.js";import"./index-DRjF_FHU.js";import"./iframe-SJLFWhX6.js";import"./index-B7ki2Uzk.js";import"./index-D-Mha1DF.js";import"./index-DrFu-skq.js";import"./PaymentMethods-DxorWSOl.js";import"./useCheckoutContext-CroxIBFh.js";/* empty css */import"./CheckoutPage-DFb28rrp.js";import"./CustomerInfo-BMTfZ9z3.js";import"./ValidateInput-BMZhq5zE.js";import"./DeliveryAddress-DOxyPw17.js";function i(o){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...r(),...o.components};return e.jsxs(e.Fragment,{children:[e.jsx(c,{title:"Documentation/Guide"}),`
|
|
2
|
+
`,e.jsx(n.h1,{id:"getting-started-guide",children:"Getting Started Guide"}),`
|
|
3
|
+
`,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"@clickaroo/checkout-ui"})," is a comprehensive checkout page component library designed for React applications, providing a complete checkout flow solution. The library includes core features such as customer information collection, delivery address management, payment method selection, and integrates seamlessly with payment systems."]}),`
|
|
4
|
+
`,e.jsx(n.p,{children:"This guide will walk you through different ways to integrate the checkout components into your React application, from the simplest all-in-one solution to fully customized implementations."}),`
|
|
5
|
+
`,e.jsxs(n.blockquote,{children:[`
|
|
6
|
+
`,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"Note"}),": If you're new to this library, we recommend starting with the ",e.jsx(n.a,{href:"./?path=/docs/documentation-quickstart--docs",children:"Quick Start Guide"})," which covers installation, basic usage with ",e.jsx(n.code,{children:"CheckoutPage"}),", and event callbacks."]}),`
|
|
7
|
+
`]}),`
|
|
8
|
+
`,e.jsx(n.h3,{id:"quick-integration-with-checkoutpage",children:"Quick Integration with CheckoutPage"}),`
|
|
9
|
+
`,e.jsxs(n.p,{children:["The simplest way to integrate is using the ",e.jsx(n.code,{children:"CheckoutPage"})," component, which includes the complete checkout flow. With this single component, you can quickly integrate a full-featured checkout experience."]}),`
|
|
10
|
+
`,e.jsxs(n.p,{children:["👉 See the ",e.jsx(n.a,{href:"./?path=/docs/documentation-quickstart--docs#use-checkout-all-in-one",children:"Use Checkout All in One"})," section in the Quick Start Guide for detailed instructions and examples."]}),`
|
|
11
|
+
`,e.jsx(n.h3,{id:"payment-only-integration",children:"Payment-Only Integration"}),`
|
|
12
|
+
`,e.jsxs(n.p,{children:["If you only need payment functionality and have already collected customer and address information elsewhere in your application, you can use the ",e.jsx(n.code,{children:"PaymentMethods"})," component independently."]}),`
|
|
13
|
+
`,e.jsx(t,{of:s}),`
|
|
14
|
+
`,e.jsx(n.h4,{id:"props",children:"Props"}),`
|
|
15
|
+
`,e.jsx(d,{of:s}),`
|
|
16
|
+
`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-tsx",children:`import { CheckoutProvider, PaymentMethods } from '@clickaroo/checkout-ui';
|
|
17
|
+
|
|
18
|
+
function PaymentOnly() {
|
|
19
|
+
const cart = [
|
|
20
|
+
{
|
|
21
|
+
sku: "TEST001",
|
|
22
|
+
offerPricePoint: "OPP-TEST001",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
sku: "TEST002",
|
|
26
|
+
offerPricePoint: "OPP-TEST002",
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<CheckoutProvider cart={cart}>
|
|
32
|
+
<PaymentMethods />
|
|
33
|
+
</CheckoutProvider>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
`})}),`
|
|
37
|
+
`,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"Important Notes:"}),`
|
|
38
|
+
The `,e.jsx(n.code,{children:"PaymentMethods"})," component must be wrapped in a ",e.jsx(n.code,{children:"CheckoutProvider"}),". See ",e.jsx(n.a,{href:"./?path=/docs/components-customcheckout--customcheckout-english#using-checkoutprovider",children:"CheckoutProvider Props"})," for all available configuration options."]}),`
|
|
39
|
+
`,e.jsx(n.p,{children:"To complete the full payment flow (including order submission), you'll need to use the APIs and hooks provided by the library:"}),`
|
|
40
|
+
`,e.jsxs(n.ol,{children:[`
|
|
41
|
+
`,e.jsxs(n.li,{children:["Update customer and address information using ",e.jsx(n.code,{children:"updateCustomerInfo"})," and ",e.jsx(n.code,{children:"updateDeliveryAddress"})," from ",e.jsx(n.code,{children:"useCheckoutContext"})," hook"]}),`
|
|
42
|
+
`,e.jsxs(n.li,{children:["Use the ",e.jsx(n.code,{children:"useOrderSubmission"})," hook to handle order submission"]}),`
|
|
43
|
+
`,e.jsxs(n.li,{children:["Create a custom submit button that calls ",e.jsx(n.code,{children:"submitOrder()"})," from the ",e.jsx(n.code,{children:"useOrderSubmission"})," hook when clicked"]}),`
|
|
44
|
+
`]}),`
|
|
45
|
+
`,e.jsxs(n.p,{children:["For a complete implementation example, see the ",e.jsx(n.a,{href:"./?path=/docs/documentation-apis--docs",children:"APIs documentation"})," section on ",e.jsx(n.code,{children:"useOrderSubmission"}),"."]}),`
|
|
46
|
+
`,e.jsx(n.h3,{id:"custom-checkout",children:"Custom Checkout"}),`
|
|
47
|
+
`,e.jsx(n.p,{children:"You can build a custom checkout page by mixing and matching the library's built-in components with your own custom components. This gives you full control over the layout, styling, and user experience while leveraging the library's functionality."}),`
|
|
48
|
+
`,e.jsx(t,{of:a}),`
|
|
49
|
+
`,e.jsxs(n.p,{children:["You can replace some built-in components with your own custom implementations, but ",e.jsxs(n.strong,{children:[e.jsx(n.code,{children:"PaymentMethods"})," must always be used from the library"]})," as it contains critical payment logic that cannot be customized."]}),`
|
|
50
|
+
`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-tsx",children:`import {
|
|
51
|
+
CheckoutProvider,
|
|
52
|
+
PaymentMethods,
|
|
53
|
+
useCheckoutContext,
|
|
54
|
+
useOrderSubmission
|
|
55
|
+
} from '@clickaroo/checkout-ui';
|
|
56
|
+
|
|
57
|
+
function CustomCheckout() {
|
|
58
|
+
const cart = [{ sku: "TEST001", offerPricePoint: "OPP-TEST001" }];
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
// All components must be wrapped in CheckoutProvider
|
|
62
|
+
<CheckoutProvider cart={cart}>
|
|
63
|
+
<MyCustomCustomerInfo />
|
|
64
|
+
<MyCustomDeliveryAddress />
|
|
65
|
+
<PaymentMethods /> {/* Required - cannot be customized */}
|
|
66
|
+
<MyCustomSubmitButton />
|
|
67
|
+
</CheckoutProvider>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Use hooks to build custom components
|
|
72
|
+
function MyCustomCustomerInfo() {
|
|
73
|
+
const { customerInfo, updateCustomerInfo } = useCheckoutContext();
|
|
74
|
+
// use hook to update form data
|
|
75
|
+
updateCustomerInfo({ firstName: 'xxx', lastName: 'xxx', ...})
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function MyCustomDeliveryAddress() {
|
|
79
|
+
const { deliveryAddress, updateDeliveryAddress } = useCheckoutContext();
|
|
80
|
+
// Your custom form implementation
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function MyCustomSubmitButton() {
|
|
84
|
+
const { isFormValid } = useCheckoutContext();
|
|
85
|
+
// use hook to handle order submission
|
|
86
|
+
const { isSubmitting, submitOrder } = useOrderSubmission();
|
|
87
|
+
// Your custom button implementation
|
|
88
|
+
}
|
|
89
|
+
`})}),`
|
|
90
|
+
`,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"Important Notes:"})," All components must be wrapped in CheckoutProvider. See ",e.jsx(n.a,{href:"./?path=/docs/components-customcheckout--customcheckout-english#using-checkoutprovider",children:"CheckoutProvider Props"})," for all available configuration options."]}),`
|
|
91
|
+
`,e.jsxs(n.p,{children:["For a complete implementation example, see the ",e.jsx(n.a,{href:"./?path=/docs/components-customcheckout--customcheckout-english",children:"CustomCheckout documentation"}),"."]}),`
|
|
92
|
+
`,e.jsx(n.h3,{id:"apis-and-hooks",children:"APIs and Hooks"}),`
|
|
93
|
+
`,e.jsx(n.p,{children:"As mentioned above, the component library provides HTTP APIs and React Hooks for more granular control and advanced use cases."}),`
|
|
94
|
+
`,e.jsx(n.h4,{id:"http-apis",children:"HTTP APIs"}),`
|
|
95
|
+
`,e.jsxs(n.ul,{children:[`
|
|
96
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"getPricePointInfo"})})," - Get price point information (supports single or multiple price points)"]}),`
|
|
97
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"createOrder"})})," - Create an order with the provided order data"]}),`
|
|
98
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"getOrderDetail"})})," - Get detailed information about an order by order code"]}),`
|
|
99
|
+
`]}),`
|
|
100
|
+
`,e.jsx(n.h4,{id:"react-hooks",children:"React Hooks"}),`
|
|
101
|
+
`,e.jsxs(n.ul,{children:[`
|
|
102
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"useCheckoutContext"})})," - Access checkout state and update functions (customer info, delivery address, form validation)"]}),`
|
|
103
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"useOrderSubmission"})})," - Handle order submission with loading states and error handling"]}),`
|
|
104
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"useOrderDetail"})})," - Fetch order details"]}),`
|
|
105
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"usePricePointInfo"})})," - Get price point information"]}),`
|
|
106
|
+
`]}),`
|
|
107
|
+
`,e.jsxs(n.p,{children:["For detailed API documentation and hook usage examples, see the ",e.jsx(n.a,{href:"./?path=/docs/documentation-apis--docs",children:"APIs Documentation"}),"."]})]})}function I(o={}){const{wrapper:n}={...r(),...o.components};return n?e.jsx(n,{...o,children:e.jsx(i,{...o})}):i(o)}export{I as default};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import{j as e}from"./jsx-runtime-DiklIkkE.js";import{useMDXComponents as r}from"./index-ChEI-nsM.js";import{M as c,C as t,a as d}from"./index-LRKEu_dQ.js";import{Default as s}from"./PaymentMethods.stories-pOuLDPwE.js";import{D as a}from"./CustomCheckout.stories-CKQKzMq0.js";import"./index-DRjF_FHU.js";import"./iframe-Ce3kgeV4.js";import"./index-B7ki2Uzk.js";import"./index-D-Mha1DF.js";import"./index-DrFu-skq.js";import"./PaymentMethods-BNEEARzu.js";import"./useCheckoutContext-B8tsk5b5.js";/* empty css */import"./CheckoutPage-BsnzMxJk.js";import"./CustomerInfo-CTx1dFS3.js";import"./ValidateInput-Cl2O4HCX.js";import"./DeliveryAddress-X81XGbKD.js";function i(o){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...r(),...o.components};return e.jsxs(e.Fragment,{children:[e.jsx(c,{title:"Documentation/Guide"}),`
|
|
2
|
+
`,e.jsx(n.h1,{id:"getting-started-guide",children:"Getting Started Guide"}),`
|
|
3
|
+
`,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"@clickaroo/checkout-ui"})," is a comprehensive checkout page component library designed for React applications, providing a complete checkout flow solution. The library includes core features such as customer information collection, delivery address management, payment method selection, and integrates seamlessly with payment systems."]}),`
|
|
4
|
+
`,e.jsx(n.p,{children:"This guide will walk you through different ways to integrate the checkout components into your React application, from the simplest all-in-one solution to fully customized implementations."}),`
|
|
5
|
+
`,e.jsxs(n.blockquote,{children:[`
|
|
6
|
+
`,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"Note"}),": If you're new to this library, we recommend starting with the ",e.jsx(n.a,{href:"./?path=/docs/documentation-quickstart--docs",children:"Quick Start Guide"})," which covers installation, basic usage with ",e.jsx(n.code,{children:"CheckoutPage"}),", and event callbacks."]}),`
|
|
7
|
+
`]}),`
|
|
8
|
+
`,e.jsx(n.h3,{id:"quick-integration-with-checkoutpage",children:"Quick Integration with CheckoutPage"}),`
|
|
9
|
+
`,e.jsxs(n.p,{children:["The simplest way to integrate is using the ",e.jsx(n.code,{children:"CheckoutPage"})," component, which includes the complete checkout flow. With this single component, you can quickly integrate a full-featured checkout experience."]}),`
|
|
10
|
+
`,e.jsxs(n.p,{children:["👉 See the ",e.jsx(n.a,{href:"./?path=/docs/documentation-quickstart--docs#use-checkout-all-in-one",children:"Use Checkout All in One"})," section in the Quick Start Guide for detailed instructions and examples."]}),`
|
|
11
|
+
`,e.jsx(n.h3,{id:"payment-only-integration",children:"Payment-Only Integration"}),`
|
|
12
|
+
`,e.jsxs(n.p,{children:["If you only need payment functionality and have already collected customer and address information elsewhere in your application, you can use the ",e.jsx(n.code,{children:"PaymentMethods"})," component independently."]}),`
|
|
13
|
+
`,e.jsx(t,{of:s}),`
|
|
14
|
+
`,e.jsx(n.h4,{id:"props",children:"Props"}),`
|
|
15
|
+
`,e.jsx(d,{of:s}),`
|
|
16
|
+
`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-tsx",children:`import { CheckoutProvider, PaymentMethods } from '@clickaroo/checkout-ui';
|
|
17
|
+
|
|
18
|
+
function PaymentOnly() {
|
|
19
|
+
const cart = [
|
|
20
|
+
{
|
|
21
|
+
sku: "TEST001",
|
|
22
|
+
offerPricePoint: "OPP-TEST001",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
sku: "TEST002",
|
|
26
|
+
offerPricePoint: "OPP-TEST002",
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<CheckoutProvider cart={cart}>
|
|
32
|
+
<PaymentMethods />
|
|
33
|
+
</CheckoutProvider>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
`})}),`
|
|
37
|
+
`,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"Important Notes:"}),`
|
|
38
|
+
The `,e.jsx(n.code,{children:"PaymentMethods"})," component must be wrapped in a ",e.jsx(n.code,{children:"CheckoutProvider"}),". See ",e.jsx(n.a,{href:"./?path=/docs/components-customcheckout--customcheckout-english#using-checkoutprovider",children:"CheckoutProvider Props"})," for all available configuration options."]}),`
|
|
39
|
+
`,e.jsx(n.p,{children:"To complete the full payment flow (including order submission), you'll need to use the APIs and hooks provided by the library:"}),`
|
|
40
|
+
`,e.jsxs(n.ol,{children:[`
|
|
41
|
+
`,e.jsxs(n.li,{children:["Update customer and address information using ",e.jsx(n.code,{children:"updateCustomerInfo"})," and ",e.jsx(n.code,{children:"updateDeliveryAddress"})," from ",e.jsx(n.code,{children:"useCheckoutContext"})," hook"]}),`
|
|
42
|
+
`,e.jsxs(n.li,{children:["Use the ",e.jsx(n.code,{children:"useOrderSubmission"})," hook to handle order submission"]}),`
|
|
43
|
+
`,e.jsxs(n.li,{children:["Create a custom submit button that calls ",e.jsx(n.code,{children:"submitOrder()"})," from the ",e.jsx(n.code,{children:"useOrderSubmission"})," hook when clicked"]}),`
|
|
44
|
+
`]}),`
|
|
45
|
+
`,e.jsxs(n.p,{children:["For a complete implementation example, see the ",e.jsx(n.a,{href:"./?path=/docs/documentation-apis--docs",children:"APIs documentation"})," section on ",e.jsx(n.code,{children:"useOrderSubmission"}),"."]}),`
|
|
46
|
+
`,e.jsx(n.h3,{id:"custom-checkout",children:"Custom Checkout"}),`
|
|
47
|
+
`,e.jsx(n.p,{children:"You can build a custom checkout page by mixing and matching the library's built-in components with your own custom components. This gives you full control over the layout, styling, and user experience while leveraging the library's functionality."}),`
|
|
48
|
+
`,e.jsx(t,{of:a}),`
|
|
49
|
+
`,e.jsxs(n.p,{children:["You can replace some built-in components with your own custom implementations, but ",e.jsxs(n.strong,{children:[e.jsx(n.code,{children:"PaymentMethods"})," must always be used from the library"]})," as it contains critical payment logic that cannot be customized."]}),`
|
|
50
|
+
`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-tsx",children:`import {
|
|
51
|
+
CheckoutProvider,
|
|
52
|
+
PaymentMethods,
|
|
53
|
+
useCheckoutContext,
|
|
54
|
+
useOrderSubmission
|
|
55
|
+
} from '@clickaroo/checkout-ui';
|
|
56
|
+
|
|
57
|
+
function CustomCheckout() {
|
|
58
|
+
const cart = [{ sku: "TEST001", offerPricePoint: "OPP-TEST001" }];
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
// All components must be wrapped in CheckoutProvider
|
|
62
|
+
<CheckoutProvider cart={cart}>
|
|
63
|
+
<MyCustomCustomerInfo />
|
|
64
|
+
<MyCustomDeliveryAddress />
|
|
65
|
+
<PaymentMethods /> {/* Required - cannot be customized */}
|
|
66
|
+
<MyCustomSubmitButton />
|
|
67
|
+
</CheckoutProvider>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Use hooks to build custom components
|
|
72
|
+
function MyCustomCustomerInfo() {
|
|
73
|
+
const { customerInfo, updateCustomerInfo } = useCheckoutContext();
|
|
74
|
+
// use hook to update form data
|
|
75
|
+
updateCustomerInfo({ firstName: 'xxx', lastName: 'xxx', ...})
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function MyCustomDeliveryAddress() {
|
|
79
|
+
const { deliveryAddress, updateDeliveryAddress } = useCheckoutContext();
|
|
80
|
+
// Your custom form implementation
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function MyCustomSubmitButton() {
|
|
84
|
+
const { isFormValid } = useCheckoutContext();
|
|
85
|
+
// use hook to handle order submission
|
|
86
|
+
const { isSubmitting, submitOrder } = useOrderSubmission();
|
|
87
|
+
// Your custom button implementation
|
|
88
|
+
}
|
|
89
|
+
`})}),`
|
|
90
|
+
`,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"Important Notes:"})," All components must be wrapped in CheckoutProvider. See ",e.jsx(n.a,{href:"./?path=/docs/components-customcheckout--customcheckout-english#using-checkoutprovider",children:"CheckoutProvider Props"})," for all available configuration options."]}),`
|
|
91
|
+
`,e.jsxs(n.p,{children:["For a complete implementation example, see the ",e.jsx(n.a,{href:"./?path=/docs/components-customcheckout--customcheckout-english",children:"CustomCheckout documentation"}),"."]}),`
|
|
92
|
+
`,e.jsx(n.h3,{id:"apis-and-hooks",children:"APIs and Hooks"}),`
|
|
93
|
+
`,e.jsx(n.p,{children:"As mentioned above, the component library provides HTTP APIs and React Hooks for more granular control and advanced use cases."}),`
|
|
94
|
+
`,e.jsx(n.h4,{id:"http-apis",children:"HTTP APIs"}),`
|
|
95
|
+
`,e.jsxs(n.ul,{children:[`
|
|
96
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"getPricePointInfo"})})," - Get price point information (supports single or multiple price points)"]}),`
|
|
97
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"createOrder"})})," - Create an order with the provided order data"]}),`
|
|
98
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"getOrderDetail"})})," - Get detailed information about an order by order code"]}),`
|
|
99
|
+
`]}),`
|
|
100
|
+
`,e.jsx(n.h4,{id:"react-hooks",children:"React Hooks"}),`
|
|
101
|
+
`,e.jsxs(n.ul,{children:[`
|
|
102
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"useCheckoutContext"})})," - Access checkout state and update functions (customer info, delivery address, form validation)"]}),`
|
|
103
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"useOrderSubmission"})})," - Handle order submission with loading states and error handling"]}),`
|
|
104
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"useOrderDetail"})})," - Fetch order details"]}),`
|
|
105
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"usePricePointInfo"})})," - Get price point information"]}),`
|
|
106
|
+
`]}),`
|
|
107
|
+
`,e.jsxs(n.p,{children:["For detailed API documentation and hook usage examples, see the ",e.jsx(n.a,{href:"./?path=/docs/documentation-apis--docs",children:"APIs Documentation"}),"."]})]})}function I(o={}){const{wrapper:n}={...r(),...o.components};return n?e.jsx(n,{...o,children:e.jsx(i,{...o})}):i(o)}export{I as default};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import{j as e}from"./jsx-runtime-DiklIkkE.js";import{useMDXComponents as r}from"./index-ChEI-nsM.js";import{M as c,C as t,a as d}from"./index-Bz3Q1Yw_.js";import{Default as s}from"./PaymentMethods.stories-DJpOtGJg.js";import{D as a}from"./CustomCheckout.stories-rMIVoUs4.js";import"./index-DRjF_FHU.js";import"./iframe-eGyOKkka.js";import"./index-B7ki2Uzk.js";import"./index-D-Mha1DF.js";import"./index-DrFu-skq.js";import"./PaymentMethods-CBXk2f9N.js";import"./useCheckoutContext-L3zhltsm.js";/* empty css */import"./CheckoutPage-DvHYA1Jd.js";import"./CustomerInfo-BqCSWi4I.js";import"./ValidateInput-np1-zwvJ.js";import"./DeliveryAddress-TRtlNz2v.js";function i(o){const n={a:"a",blockquote:"blockquote",code:"code",h1:"h1",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...r(),...o.components};return e.jsxs(e.Fragment,{children:[e.jsx(c,{title:"Documentation/Guide"}),`
|
|
2
|
+
`,e.jsx(n.h1,{id:"getting-started-guide",children:"Getting Started Guide"}),`
|
|
3
|
+
`,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"@clickaroo/checkout-ui"})," is a comprehensive checkout page component library designed for React applications, providing a complete checkout flow solution. The library includes core features such as customer information collection, delivery address management, payment method selection, and integrates seamlessly with payment systems."]}),`
|
|
4
|
+
`,e.jsx(n.p,{children:"This guide will walk you through different ways to integrate the checkout components into your React application, from the simplest all-in-one solution to fully customized implementations."}),`
|
|
5
|
+
`,e.jsxs(n.blockquote,{children:[`
|
|
6
|
+
`,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"Note"}),": If you're new to this library, we recommend starting with the ",e.jsx(n.a,{href:"./?path=/docs/documentation-quickstart--docs",children:"Quick Start Guide"})," which covers installation, basic usage with ",e.jsx(n.code,{children:"CheckoutPage"}),", and event callbacks."]}),`
|
|
7
|
+
`]}),`
|
|
8
|
+
`,e.jsx(n.h3,{id:"quick-integration-with-checkoutpage",children:"Quick Integration with CheckoutPage"}),`
|
|
9
|
+
`,e.jsxs(n.p,{children:["The simplest way to integrate is using the ",e.jsx(n.code,{children:"CheckoutPage"})," component, which includes the complete checkout flow. With this single component, you can quickly integrate a full-featured checkout experience."]}),`
|
|
10
|
+
`,e.jsxs(n.p,{children:["👉 See the ",e.jsx(n.a,{href:"./?path=/docs/documentation-quickstart--docs#use-checkout-all-in-one",children:"Use Checkout All in One"})," section in the Quick Start Guide for detailed instructions and examples."]}),`
|
|
11
|
+
`,e.jsx(n.h3,{id:"payment-only-integration",children:"Payment-Only Integration"}),`
|
|
12
|
+
`,e.jsxs(n.p,{children:["If you only need payment functionality and have already collected customer and address information elsewhere in your application, you can use the ",e.jsx(n.code,{children:"PaymentMethods"})," component independently."]}),`
|
|
13
|
+
`,e.jsx(t,{of:s}),`
|
|
14
|
+
`,e.jsx(n.h4,{id:"props",children:"Props"}),`
|
|
15
|
+
`,e.jsx(d,{of:s}),`
|
|
16
|
+
`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-tsx",children:`import { CheckoutProvider, PaymentMethods } from '@clickaroo/checkout-ui';
|
|
17
|
+
|
|
18
|
+
function PaymentOnly() {
|
|
19
|
+
const cart = [
|
|
20
|
+
{
|
|
21
|
+
sku: "TEST001",
|
|
22
|
+
offerPricePoint: "OPP-TEST001",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
sku: "TEST002",
|
|
26
|
+
offerPricePoint: "OPP-TEST002",
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<CheckoutProvider cart={cart}>
|
|
32
|
+
<PaymentMethods />
|
|
33
|
+
</CheckoutProvider>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
`})}),`
|
|
37
|
+
`,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"Important Notes:"}),`
|
|
38
|
+
The `,e.jsx(n.code,{children:"PaymentMethods"})," component must be wrapped in a ",e.jsx(n.code,{children:"CheckoutProvider"}),". See ",e.jsx(n.a,{href:"./?path=/docs/components-customcheckout--customcheckout-english#using-checkoutprovider",children:"CheckoutProvider Props"})," for all available configuration options."]}),`
|
|
39
|
+
`,e.jsx(n.p,{children:"To complete the full payment flow (including order submission), you'll need to use the APIs and hooks provided by the library:"}),`
|
|
40
|
+
`,e.jsxs(n.ol,{children:[`
|
|
41
|
+
`,e.jsxs(n.li,{children:["Update customer and address information using ",e.jsx(n.code,{children:"updateCustomerInfo"})," and ",e.jsx(n.code,{children:"updateDeliveryAddress"})," from ",e.jsx(n.code,{children:"useCheckoutContext"})," hook"]}),`
|
|
42
|
+
`,e.jsxs(n.li,{children:["Use the ",e.jsx(n.code,{children:"useOrderSubmission"})," hook to handle order submission"]}),`
|
|
43
|
+
`,e.jsxs(n.li,{children:["Create a custom submit button that calls ",e.jsx(n.code,{children:"submitOrder()"})," from the ",e.jsx(n.code,{children:"useOrderSubmission"})," hook when clicked"]}),`
|
|
44
|
+
`]}),`
|
|
45
|
+
`,e.jsxs(n.p,{children:["For a complete implementation example, see the ",e.jsx(n.a,{href:"./?path=/docs/documentation-apis--docs",children:"APIs documentation"})," section on ",e.jsx(n.code,{children:"useOrderSubmission"}),"."]}),`
|
|
46
|
+
`,e.jsx(n.h3,{id:"custom-checkout",children:"Custom Checkout"}),`
|
|
47
|
+
`,e.jsx(n.p,{children:"You can build a custom checkout page by mixing and matching the library's built-in components with your own custom components. This gives you full control over the layout, styling, and user experience while leveraging the library's functionality."}),`
|
|
48
|
+
`,e.jsx(t,{of:a}),`
|
|
49
|
+
`,e.jsxs(n.p,{children:["You can replace some built-in components with your own custom implementations, but ",e.jsxs(n.strong,{children:[e.jsx(n.code,{children:"PaymentMethods"})," must always be used from the library"]})," as it contains critical payment logic that cannot be customized."]}),`
|
|
50
|
+
`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-tsx",children:`import {
|
|
51
|
+
CheckoutProvider,
|
|
52
|
+
PaymentMethods,
|
|
53
|
+
useCheckoutContext,
|
|
54
|
+
useOrderSubmission
|
|
55
|
+
} from '@clickaroo/checkout-ui';
|
|
56
|
+
|
|
57
|
+
function CustomCheckout() {
|
|
58
|
+
const cart = [{ sku: "TEST001", offerPricePoint: "OPP-TEST001" }];
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
// All components must be wrapped in CheckoutProvider
|
|
62
|
+
<CheckoutProvider cart={cart}>
|
|
63
|
+
<MyCustomCustomerInfo />
|
|
64
|
+
<MyCustomDeliveryAddress />
|
|
65
|
+
<PaymentMethods /> {/* Required - cannot be customized */}
|
|
66
|
+
<MyCustomSubmitButton />
|
|
67
|
+
</CheckoutProvider>
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Use hooks to build custom components
|
|
72
|
+
function MyCustomCustomerInfo() {
|
|
73
|
+
const { customerInfo, updateCustomerInfo } = useCheckoutContext();
|
|
74
|
+
// use hook to update form data
|
|
75
|
+
updateCustomerInfo({ firstName: 'xxx', lastName: 'xxx', ...})
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function MyCustomDeliveryAddress() {
|
|
79
|
+
const { deliveryAddress, updateDeliveryAddress } = useCheckoutContext();
|
|
80
|
+
// Your custom form implementation
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function MyCustomSubmitButton() {
|
|
84
|
+
const { isFormValid } = useCheckoutContext();
|
|
85
|
+
// use hook to handle order submission
|
|
86
|
+
const { isSubmitting, submitOrder } = useOrderSubmission();
|
|
87
|
+
// Your custom button implementation
|
|
88
|
+
}
|
|
89
|
+
`})}),`
|
|
90
|
+
`,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"Important Notes:"})," All components must be wrapped in CheckoutProvider. See ",e.jsx(n.a,{href:"./?path=/docs/components-customcheckout--customcheckout-english#using-checkoutprovider",children:"CheckoutProvider Props"})," for all available configuration options."]}),`
|
|
91
|
+
`,e.jsxs(n.p,{children:["For a complete implementation example, see the ",e.jsx(n.a,{href:"./?path=/docs/components-customcheckout--customcheckout-english",children:"CustomCheckout documentation"}),"."]}),`
|
|
92
|
+
`,e.jsx(n.h3,{id:"apis-and-hooks",children:"APIs and Hooks"}),`
|
|
93
|
+
`,e.jsx(n.p,{children:"As mentioned above, the component library provides HTTP APIs and React Hooks for more granular control and advanced use cases."}),`
|
|
94
|
+
`,e.jsx(n.h4,{id:"http-apis",children:"HTTP APIs"}),`
|
|
95
|
+
`,e.jsxs(n.ul,{children:[`
|
|
96
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"getPricePointInfo"})})," - Get price point information (supports single or multiple price points)"]}),`
|
|
97
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"createOrder"})})," - Create an order with the provided order data"]}),`
|
|
98
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"getOrderDetail"})})," - Get detailed information about an order by order code"]}),`
|
|
99
|
+
`]}),`
|
|
100
|
+
`,e.jsx(n.h4,{id:"react-hooks",children:"React Hooks"}),`
|
|
101
|
+
`,e.jsxs(n.ul,{children:[`
|
|
102
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"useCheckoutContext"})})," - Access checkout state and update functions (customer info, delivery address, form validation)"]}),`
|
|
103
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"useOrderSubmission"})})," - Handle order submission with loading states and error handling"]}),`
|
|
104
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"useOrderDetail"})})," - Fetch order details"]}),`
|
|
105
|
+
`,e.jsxs(n.li,{children:[e.jsx(n.strong,{children:e.jsx(n.code,{children:"usePricePointInfo"})})," - Get price point information"]}),`
|
|
106
|
+
`]}),`
|
|
107
|
+
`,e.jsxs(n.p,{children:["For detailed API documentation and hook usage examples, see the ",e.jsx(n.a,{href:"./?path=/docs/documentation-apis--docs",children:"APIs Documentation"}),"."]})]})}function I(o={}){const{wrapper:n}={...r(),...o.components};return n?e.jsx(n,{...o,children:e.jsx(i,{...o})}):i(o)}export{I as default};
|