@bunnyapp/components 1.8.0-beta.55 → 1.8.0-beta.56
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/README.md +154 -1
- package/dist/cjs/index.js +65 -32
- package/dist/cjs/types/src/components/Checkout/Checkout.d.ts +6 -40
- package/dist/cjs/types/src/components/Checkout/Checkout.stories.d.ts +15 -0
- package/dist/cjs/types/src/components/Checkout/CheckoutContent.d.ts +11 -0
- package/dist/cjs/types/src/components/Checkout/components/CheckoutFlowForm.d.ts +4 -0
- package/dist/cjs/types/src/components/Checkout/graphql/fragments/Checkout_QuoteFragment.d.ts +22 -0
- package/dist/cjs/types/src/components/{Signup/components/SignupForm/fragments/SignupForm_AccountFragment.d.ts → Checkout/graphql/fragments/useCheckoutAccount_AccountFragment.d.ts} +6 -9
- package/dist/cjs/types/src/components/Checkout/graphql/mutations/accountUpdate.d.ts +84 -0
- package/dist/cjs/types/src/components/Checkout/graphql/mutations/contactUpdate.d.ts +40 -0
- package/dist/cjs/types/src/components/Checkout/graphql/mutations/quoteAddCoupon.d.ts +11 -0
- package/dist/cjs/types/src/components/Checkout/graphql/mutations/quoteChangeUpdate.d.ts +7 -0
- package/dist/cjs/types/src/components/Checkout/graphql/mutations/quoteCompose.d.ts +9 -0
- package/dist/cjs/types/src/components/Checkout/graphql/mutations/quoteRemoveCoupon.d.ts +11 -0
- package/dist/cjs/types/src/components/Checkout/graphql/mutations/quoteSetDocumentTemplate.d.ts +8 -0
- package/dist/cjs/types/src/components/Checkout/graphql/queries/getCheckoutAccount.d.ts +10 -0
- package/dist/cjs/types/src/components/Checkout/graphql/queries/getCheckoutQuote.d.ts +10 -0
- package/dist/cjs/types/src/components/Checkout/hooks/useCheckoutAccount.d.ts +21 -0
- package/dist/cjs/types/src/components/Checkout/hooks/useCheckoutCoupon.d.ts +20 -0
- package/dist/cjs/types/src/components/Checkout/hooks/useCheckoutQuote.d.ts +22 -0
- package/dist/cjs/types/src/components/Checkout/hooks/useCheckoutSubmit.d.ts +13 -0
- package/dist/cjs/types/src/components/Checkout/hooks/useSetCheckoutQuoteQueryData.d.ts +4 -0
- package/dist/cjs/types/src/components/Checkout/index.d.ts +4 -0
- package/dist/cjs/types/src/components/Checkout/utils/accountDefaultValues.d.ts +7 -0
- package/dist/cjs/types/src/components/Checkout/utils/storeNewPaymentMethod.d.ts +8 -0
- package/dist/cjs/types/src/components/CheckoutShared/appearance/CheckoutAppearanceProvider.d.ts +14 -0
- package/dist/cjs/types/src/components/CheckoutShared/appearance/adapters/stripe.d.ts +9 -0
- package/dist/cjs/types/src/components/CheckoutShared/appearance/appearance.types.test.d.ts +3 -0
- package/dist/cjs/types/src/components/CheckoutShared/appearance/index.d.ts +3 -0
- package/dist/cjs/types/src/components/CheckoutShared/appearance/resolveAppearance.d.ts +21 -0
- package/dist/cjs/types/src/components/CheckoutShared/appearance/ruleGroups.d.ts +17 -0
- package/dist/cjs/types/src/components/CheckoutShared/appearance/rules.d.ts +27 -0
- package/dist/cjs/types/src/components/CheckoutShared/appearance/rulesToCss.d.ts +5 -0
- package/dist/cjs/types/src/components/CheckoutShared/appearance/scripts/dumpAppearance.d.ts +1 -0
- package/dist/cjs/types/src/components/CheckoutShared/appearance/types.d.ts +144 -0
- package/dist/cjs/types/src/components/CheckoutShared/appearance/variables.d.ts +29 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutFooter.d.ts +4 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/CardBrandIcons.d.ts +2 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/CheckoutFields.d.ts +9 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/CheckoutForm.d.ts +10 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/DemoPayCardBox.d.ts +6 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/DemoPayCardBox.rules.d.ts +30 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/Field.d.ts +24 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/Field.rules.d.ts +44 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/PayButton.d.ts +8 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/PaymentFields.d.ts +7 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/PaymentTile.d.ts +10 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/PaymentTile.rules.d.ts +53 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/PluginTiles.d.ts +4 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/SavedPaymentMethodTiles.d.ts +4 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutForm/StripePaymentElement.d.ts +8 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutLoadingOverlay.d.ts +6 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutRoot.d.ts +28 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutScreen.d.ts +27 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutScreen.rules.d.ts +125 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutSplitScreenContainer.d.ts +10 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutStripeElements.d.ts +13 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutSummary/CheckoutCouponEditor.d.ts +8 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutSummary/CheckoutQuoteDocument.d.ts +15 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutSummary/CheckoutReceipt.d.ts +13 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutSummary/CheckoutSummary.d.ts +12 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutSummary/components/CheckoutSummaryLineItem.d.ts +10 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutSummary/components/CheckoutSummaryLineItems.d.ts +7 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutSummary/components/CheckoutSummaryTotals.d.ts +24 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutSummary/components/SummaryDisclosure.d.ts +10 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutSummary/components/SummaryHeader.d.ts +4 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/CheckoutSummary/components/SummaryLayout.d.ts +16 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/SuccessDisplay/SuccessDisplay.d.ts +8 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/controls/Button.d.ts +24 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/controls/Button.rules.d.ts +96 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/controls/Select.d.ts +17 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/controls/Select.rules.d.ts +55 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/controls/Spinner.d.ts +4 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/controls/TextInput.d.ts +7 -0
- package/dist/cjs/types/src/components/CheckoutShared/components/controls/TextInput.rules.d.ts +68 -0
- package/dist/cjs/types/src/components/CheckoutShared/contexts/CheckoutConfigContext.d.ts +69 -0
- package/dist/cjs/types/src/components/CheckoutShared/contexts/CheckoutFieldsContext.d.ts +6 -0
- package/dist/cjs/types/src/components/CheckoutShared/contexts/CheckoutFormContext.d.ts +7 -0
- package/dist/cjs/types/src/components/CheckoutShared/contexts/CheckoutPaymentMethodsContext.d.ts +37 -0
- package/dist/cjs/types/src/components/CheckoutShared/contexts/CheckoutPricingContext.d.ts +23 -0
- package/dist/cjs/types/src/components/CheckoutShared/contexts/CheckoutResultContext.d.ts +20 -0
- package/dist/cjs/types/src/components/CheckoutShared/graphql/fragments/CheckoutQuoteDocument_QuoteFragment.d.ts +14 -0
- package/dist/cjs/types/src/components/CheckoutShared/graphql/fragments/CheckoutReceipt_QuoteFragment.d.ts +31 -0
- package/dist/cjs/types/src/components/CheckoutShared/graphql/fragments/CheckoutResult_QuoteFragment.d.ts +15 -0
- package/dist/cjs/types/src/components/CheckoutShared/graphql/fragments/CheckoutSummaryLineItems_QuoteFragment.d.ts +23 -0
- package/dist/cjs/types/src/components/{Signup/components/CheckoutSummary → CheckoutShared/graphql}/fragments/CheckoutSummary_PriceListFragment.d.ts +5 -12
- package/dist/cjs/types/src/components/CheckoutShared/graphql/fragments/CheckoutSummary_QuoteFragment.d.ts +20 -0
- package/dist/cjs/types/src/components/CheckoutShared/graphql/fragments/SavedPaymentMethodTiles_PaymentMethodFragment.d.ts +16 -0
- package/dist/cjs/types/src/components/CheckoutShared/graphql/fragments/SuccessDisplay_PaymentMethodFragment.d.ts +14 -0
- package/dist/cjs/types/src/components/CheckoutShared/graphql/fragments/SuccessDisplay_PriceListFragment.d.ts +11 -0
- package/dist/cjs/types/src/components/CheckoutShared/graphql/fragments/SuccessDisplay_QuoteFragment.d.ts +18 -0
- package/dist/cjs/types/src/components/CheckoutShared/graphql/fragments/useCheckoutPriceList_PriceListFragment.d.ts +15 -0
- package/dist/cjs/types/src/components/CheckoutShared/graphql/mutations/priceListAmountDuePreview.d.ts +53 -0
- package/dist/cjs/types/src/components/CheckoutShared/graphql/mutations/taxationRequiredAccountFields.d.ts +10 -0
- package/dist/{esm/types/src/components/Signup → cjs/types/src/components/CheckoutShared/graphql}/queries/getPriceList.d.ts +1 -1
- package/dist/cjs/types/src/components/CheckoutShared/hooks/useAmountDuePreview.d.ts +33 -0
- package/dist/cjs/types/src/components/CheckoutShared/hooks/useCheckoutBillingDetails.d.ts +3 -0
- package/dist/cjs/types/src/components/CheckoutShared/hooks/useCheckoutFieldValue.d.ts +3 -0
- package/dist/cjs/types/src/components/CheckoutShared/hooks/useCheckoutFormSubmit.d.ts +16 -0
- package/dist/cjs/types/src/components/CheckoutShared/hooks/useCheckoutPriceList.d.ts +14 -0
- package/dist/cjs/types/src/components/CheckoutShared/hooks/useFocusFirstField.d.ts +2 -0
- package/dist/cjs/types/src/components/CheckoutShared/hooks/useNewPaymentMethod.d.ts +10 -0
- package/dist/cjs/types/src/components/CheckoutShared/hooks/useStripePaymentMethodId.d.ts +9 -0
- package/dist/cjs/types/src/components/CheckoutShared/hooks/useTaxRequiredFields.d.ts +9 -0
- package/dist/cjs/types/src/components/CheckoutShared/stories/themes.d.ts +44 -0
- package/dist/cjs/types/src/components/CheckoutShared/utils/amountPaid.d.ts +7 -0
- package/dist/cjs/types/src/components/CheckoutShared/utils/asPluginData.d.ts +6 -0
- package/dist/cjs/types/src/components/CheckoutShared/utils/billingDetails.d.ts +8 -0
- package/dist/cjs/types/src/components/CheckoutShared/utils/compactValues.d.ts +6 -0
- package/dist/cjs/types/src/components/CheckoutShared/utils/nextBillingDate.d.ts +8 -0
- package/dist/cjs/types/src/components/CheckoutShared/utils/planName.d.ts +6 -0
- package/dist/cjs/types/src/components/CheckoutShared/utils/quoteCharges.d.ts +25 -0
- package/dist/cjs/types/src/components/CheckoutShared/utils/resolveCheckoutFields.d.ts +16 -0
- package/dist/cjs/types/src/components/CheckoutShared/utils/validateDemoPayCard.d.ts +5 -0
- package/dist/cjs/types/src/components/DocumentTemplatePreview.d.ts +3 -1
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/DemoPayCardCvc.d.ts +2 -1
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/DemoPayCardNumber.d.ts +2 -1
- package/dist/cjs/types/src/components/PaymentForm/DemoPay/DemoPayExpiry.d.ts +2 -1
- package/dist/cjs/types/src/components/PaymentForm/Stripe/stripeLoader.d.ts +12 -0
- package/dist/cjs/types/src/components/PaymentForm/Stripe/stripeUtils.d.ts +9 -3
- package/dist/cjs/types/src/components/PaymentForm/components/CouponEditor.d.ts +16 -0
- package/dist/cjs/types/src/components/Quote/queries/getFormattedQuote.d.ts +1 -1
- package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFieldsFragment.d.ts +4 -4
- package/dist/cjs/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +2 -2
- package/dist/cjs/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_QuoteFragment.d.ts +1 -1
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +1 -1
- package/dist/cjs/types/src/components/QuoteProvider/hooks/useSelectedPriceListQuoteChange.d.ts +1 -1
- package/dist/cjs/types/src/components/Signup/Signup.d.ts +4 -35
- package/dist/cjs/types/src/components/Signup/Signup.stories.d.ts +4 -0
- package/dist/cjs/types/src/components/Signup/SignupContent.d.ts +7 -2
- package/dist/cjs/types/src/components/Signup/components/SignupCheckoutForm.d.ts +2 -0
- package/dist/cjs/types/src/components/Signup/graphql/mutations/quoteAccountSignup.d.ts +76 -0
- package/dist/cjs/types/src/components/Signup/hooks/useSignupCheckout.d.ts +11 -0
- package/dist/cjs/types/src/components/Signup/index.d.ts +2 -5
- package/dist/cjs/types/src/components/Subscriptions/AddonSubscriptionCards.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutPrice.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/PriceListCardDesktop.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCardButton.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/Upgrade/fragments/UpgradeContent_QuoteFragment.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/context/upgradingSubscriptionContext.d.ts +4 -4
- package/dist/cjs/types/src/components/Subscriptions/fragments/Subscriptions_SubscriptionFragment.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/fragments/UpgradingSubscriptionContext_SubscriptionFragment.d.ts +2 -2
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/fragments/QuantityDrawer_QuoteFragment.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/quantityChangeDrawer/utils/utils.d.ts +3 -3
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeTotal.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeUnitPrice.d.ts +2 -2
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktopRow.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/SubscriptionCardHeader.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/components/SubscriptionCardActions.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/components/SubscriptionStatusText.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardMobile/SubscriptionCardMobile.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +2 -2
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/utils/canSubscriptionUpgradeFromTrial.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/utils/canSubscriptionUpgradeFromTrialExpired.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/utils/sortSubscriptionCharges.d.ts +1 -1
- package/dist/cjs/types/src/components/Subscriptions/tieredDisplayDropdown/util.d.ts +1 -1
- package/dist/cjs/types/src/components/{Checkout → UpgradeCheckout}/QuoteCheckout.d.ts +4 -4
- package/dist/cjs/types/src/components/UpgradeCheckout/UpgradeCheckout.d.ts +41 -0
- package/dist/cjs/types/src/components/index.d.ts +4 -1
- package/dist/cjs/types/src/components/priceListPricing/PricingTooltip.d.ts +7 -2
- package/dist/cjs/types/src/components/priceListPricing/components/ChargePriceTiers.d.ts +1 -1
- package/dist/cjs/types/src/graphql/mutations/checkout.d.ts +1 -1
- package/dist/cjs/types/src/hooks/useHasTaxPlugin.d.ts +1 -0
- package/dist/cjs/types/src/hooks/usePaymentMethod.d.ts +41 -0
- package/dist/cjs/types/src/mocks/checkoutHandlers.d.ts +3 -0
- package/dist/cjs/types/src/mocks/handlers.d.ts +1 -1
- package/dist/cjs/types/src/utils/QueryKeyFactory.d.ts +26 -5
- package/dist/cjs/types/src/utils/chargeUtils.d.ts +1 -1
- package/dist/cjs/types/src/utils/couponUtils.d.ts +2 -2
- package/dist/cjs/types/src/utils/priceListUtils/priceListPriceText.d.ts +1 -1
- package/dist/esm/index.js +65 -32
- package/dist/esm/types/src/components/Checkout/Checkout.d.ts +6 -40
- package/dist/esm/types/src/components/Checkout/Checkout.stories.d.ts +15 -0
- package/dist/esm/types/src/components/Checkout/CheckoutContent.d.ts +11 -0
- package/dist/esm/types/src/components/Checkout/components/CheckoutFlowForm.d.ts +4 -0
- package/dist/esm/types/src/components/Checkout/graphql/fragments/Checkout_QuoteFragment.d.ts +22 -0
- package/dist/esm/types/src/components/{Signup/components/SignupForm/fragments/SignupForm_AccountFragment.d.ts → Checkout/graphql/fragments/useCheckoutAccount_AccountFragment.d.ts} +6 -9
- package/dist/esm/types/src/components/Checkout/graphql/mutations/accountUpdate.d.ts +84 -0
- package/dist/esm/types/src/components/Checkout/graphql/mutations/contactUpdate.d.ts +40 -0
- package/dist/esm/types/src/components/Checkout/graphql/mutations/quoteAddCoupon.d.ts +11 -0
- package/dist/esm/types/src/components/Checkout/graphql/mutations/quoteChangeUpdate.d.ts +7 -0
- package/dist/esm/types/src/components/Checkout/graphql/mutations/quoteCompose.d.ts +9 -0
- package/dist/esm/types/src/components/Checkout/graphql/mutations/quoteRemoveCoupon.d.ts +11 -0
- package/dist/esm/types/src/components/Checkout/graphql/mutations/quoteSetDocumentTemplate.d.ts +8 -0
- package/dist/esm/types/src/components/Checkout/graphql/queries/getCheckoutAccount.d.ts +10 -0
- package/dist/esm/types/src/components/Checkout/graphql/queries/getCheckoutQuote.d.ts +10 -0
- package/dist/esm/types/src/components/Checkout/hooks/useCheckoutAccount.d.ts +21 -0
- package/dist/esm/types/src/components/Checkout/hooks/useCheckoutCoupon.d.ts +20 -0
- package/dist/esm/types/src/components/Checkout/hooks/useCheckoutQuote.d.ts +22 -0
- package/dist/esm/types/src/components/Checkout/hooks/useCheckoutSubmit.d.ts +13 -0
- package/dist/esm/types/src/components/Checkout/hooks/useSetCheckoutQuoteQueryData.d.ts +4 -0
- package/dist/esm/types/src/components/Checkout/index.d.ts +4 -0
- package/dist/esm/types/src/components/Checkout/utils/accountDefaultValues.d.ts +7 -0
- package/dist/esm/types/src/components/Checkout/utils/storeNewPaymentMethod.d.ts +8 -0
- package/dist/esm/types/src/components/CheckoutShared/appearance/CheckoutAppearanceProvider.d.ts +14 -0
- package/dist/esm/types/src/components/CheckoutShared/appearance/adapters/stripe.d.ts +9 -0
- package/dist/esm/types/src/components/CheckoutShared/appearance/appearance.types.test.d.ts +3 -0
- package/dist/esm/types/src/components/CheckoutShared/appearance/index.d.ts +3 -0
- package/dist/esm/types/src/components/CheckoutShared/appearance/resolveAppearance.d.ts +21 -0
- package/dist/esm/types/src/components/CheckoutShared/appearance/ruleGroups.d.ts +17 -0
- package/dist/esm/types/src/components/CheckoutShared/appearance/rules.d.ts +27 -0
- package/dist/esm/types/src/components/CheckoutShared/appearance/rulesToCss.d.ts +5 -0
- package/dist/esm/types/src/components/CheckoutShared/appearance/scripts/dumpAppearance.d.ts +1 -0
- package/dist/esm/types/src/components/CheckoutShared/appearance/types.d.ts +144 -0
- package/dist/esm/types/src/components/CheckoutShared/appearance/variables.d.ts +29 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutFooter.d.ts +4 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/CardBrandIcons.d.ts +2 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/CheckoutFields.d.ts +9 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/CheckoutForm.d.ts +10 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/DemoPayCardBox.d.ts +6 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/DemoPayCardBox.rules.d.ts +30 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/Field.d.ts +24 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/Field.rules.d.ts +44 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/PayButton.d.ts +8 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/PaymentFields.d.ts +7 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/PaymentTile.d.ts +10 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/PaymentTile.rules.d.ts +53 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/PluginTiles.d.ts +4 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/SavedPaymentMethodTiles.d.ts +4 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutForm/StripePaymentElement.d.ts +8 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutLoadingOverlay.d.ts +6 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutRoot.d.ts +28 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutScreen.d.ts +27 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutScreen.rules.d.ts +125 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSplitScreenContainer.d.ts +10 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutStripeElements.d.ts +13 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSummary/CheckoutCouponEditor.d.ts +8 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSummary/CheckoutQuoteDocument.d.ts +15 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSummary/CheckoutReceipt.d.ts +13 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSummary/CheckoutSummary.d.ts +12 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSummary/components/CheckoutSummaryLineItem.d.ts +10 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSummary/components/CheckoutSummaryLineItems.d.ts +7 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSummary/components/CheckoutSummaryTotals.d.ts +24 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSummary/components/SummaryDisclosure.d.ts +10 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSummary/components/SummaryHeader.d.ts +4 -0
- package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSummary/components/SummaryLayout.d.ts +16 -0
- package/dist/esm/types/src/components/CheckoutShared/components/SuccessDisplay/SuccessDisplay.d.ts +8 -0
- package/dist/esm/types/src/components/CheckoutShared/components/controls/Button.d.ts +24 -0
- package/dist/esm/types/src/components/CheckoutShared/components/controls/Button.rules.d.ts +96 -0
- package/dist/esm/types/src/components/CheckoutShared/components/controls/Select.d.ts +17 -0
- package/dist/esm/types/src/components/CheckoutShared/components/controls/Select.rules.d.ts +55 -0
- package/dist/esm/types/src/components/CheckoutShared/components/controls/Spinner.d.ts +4 -0
- package/dist/esm/types/src/components/CheckoutShared/components/controls/TextInput.d.ts +7 -0
- package/dist/esm/types/src/components/CheckoutShared/components/controls/TextInput.rules.d.ts +68 -0
- package/dist/esm/types/src/components/CheckoutShared/contexts/CheckoutConfigContext.d.ts +69 -0
- package/dist/esm/types/src/components/CheckoutShared/contexts/CheckoutFieldsContext.d.ts +6 -0
- package/dist/esm/types/src/components/CheckoutShared/contexts/CheckoutFormContext.d.ts +7 -0
- package/dist/esm/types/src/components/CheckoutShared/contexts/CheckoutPaymentMethodsContext.d.ts +37 -0
- package/dist/esm/types/src/components/CheckoutShared/contexts/CheckoutPricingContext.d.ts +23 -0
- package/dist/esm/types/src/components/CheckoutShared/contexts/CheckoutResultContext.d.ts +20 -0
- package/dist/esm/types/src/components/CheckoutShared/graphql/fragments/CheckoutQuoteDocument_QuoteFragment.d.ts +14 -0
- package/dist/esm/types/src/components/CheckoutShared/graphql/fragments/CheckoutReceipt_QuoteFragment.d.ts +31 -0
- package/dist/esm/types/src/components/CheckoutShared/graphql/fragments/CheckoutResult_QuoteFragment.d.ts +15 -0
- package/dist/esm/types/src/components/CheckoutShared/graphql/fragments/CheckoutSummaryLineItems_QuoteFragment.d.ts +23 -0
- package/dist/esm/types/src/components/{Signup/components/CheckoutSummary → CheckoutShared/graphql}/fragments/CheckoutSummary_PriceListFragment.d.ts +5 -12
- package/dist/esm/types/src/components/CheckoutShared/graphql/fragments/CheckoutSummary_QuoteFragment.d.ts +20 -0
- package/dist/esm/types/src/components/CheckoutShared/graphql/fragments/SavedPaymentMethodTiles_PaymentMethodFragment.d.ts +16 -0
- package/dist/esm/types/src/components/CheckoutShared/graphql/fragments/SuccessDisplay_PaymentMethodFragment.d.ts +14 -0
- package/dist/esm/types/src/components/CheckoutShared/graphql/fragments/SuccessDisplay_PriceListFragment.d.ts +11 -0
- package/dist/esm/types/src/components/CheckoutShared/graphql/fragments/SuccessDisplay_QuoteFragment.d.ts +18 -0
- package/dist/esm/types/src/components/CheckoutShared/graphql/fragments/useCheckoutPriceList_PriceListFragment.d.ts +15 -0
- package/dist/esm/types/src/components/CheckoutShared/graphql/mutations/priceListAmountDuePreview.d.ts +53 -0
- package/dist/esm/types/src/components/CheckoutShared/graphql/mutations/taxationRequiredAccountFields.d.ts +10 -0
- package/dist/{cjs/types/src/components/Signup → esm/types/src/components/CheckoutShared/graphql}/queries/getPriceList.d.ts +1 -1
- package/dist/esm/types/src/components/CheckoutShared/hooks/useAmountDuePreview.d.ts +33 -0
- package/dist/esm/types/src/components/CheckoutShared/hooks/useCheckoutBillingDetails.d.ts +3 -0
- package/dist/esm/types/src/components/CheckoutShared/hooks/useCheckoutFieldValue.d.ts +3 -0
- package/dist/esm/types/src/components/CheckoutShared/hooks/useCheckoutFormSubmit.d.ts +16 -0
- package/dist/esm/types/src/components/CheckoutShared/hooks/useCheckoutPriceList.d.ts +14 -0
- package/dist/esm/types/src/components/CheckoutShared/hooks/useFocusFirstField.d.ts +2 -0
- package/dist/esm/types/src/components/CheckoutShared/hooks/useNewPaymentMethod.d.ts +10 -0
- package/dist/esm/types/src/components/CheckoutShared/hooks/useStripePaymentMethodId.d.ts +9 -0
- package/dist/esm/types/src/components/CheckoutShared/hooks/useTaxRequiredFields.d.ts +9 -0
- package/dist/esm/types/src/components/CheckoutShared/stories/themes.d.ts +44 -0
- package/dist/esm/types/src/components/CheckoutShared/utils/amountPaid.d.ts +7 -0
- package/dist/esm/types/src/components/CheckoutShared/utils/asPluginData.d.ts +6 -0
- package/dist/esm/types/src/components/CheckoutShared/utils/billingDetails.d.ts +8 -0
- package/dist/esm/types/src/components/CheckoutShared/utils/compactValues.d.ts +6 -0
- package/dist/esm/types/src/components/CheckoutShared/utils/nextBillingDate.d.ts +8 -0
- package/dist/esm/types/src/components/CheckoutShared/utils/planName.d.ts +6 -0
- package/dist/esm/types/src/components/CheckoutShared/utils/quoteCharges.d.ts +25 -0
- package/dist/esm/types/src/components/CheckoutShared/utils/resolveCheckoutFields.d.ts +16 -0
- package/dist/esm/types/src/components/CheckoutShared/utils/validateDemoPayCard.d.ts +5 -0
- package/dist/esm/types/src/components/DocumentTemplatePreview.d.ts +3 -1
- package/dist/esm/types/src/components/PaymentForm/DemoPay/DemoPayCardCvc.d.ts +2 -1
- package/dist/esm/types/src/components/PaymentForm/DemoPay/DemoPayCardNumber.d.ts +2 -1
- package/dist/esm/types/src/components/PaymentForm/DemoPay/DemoPayExpiry.d.ts +2 -1
- package/dist/esm/types/src/components/PaymentForm/Stripe/stripeLoader.d.ts +12 -0
- package/dist/esm/types/src/components/PaymentForm/Stripe/stripeUtils.d.ts +9 -3
- package/dist/esm/types/src/components/PaymentForm/components/CouponEditor.d.ts +16 -0
- package/dist/esm/types/src/components/Quote/queries/getFormattedQuote.d.ts +1 -1
- package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFieldsFragment.d.ts +4 -4
- package/dist/esm/types/src/components/QuoteProvider/fragments/quoteFragment.d.ts +2 -2
- package/dist/esm/types/src/components/QuoteProvider/fragments/useQuantityEditableCharges_QuoteFragment.d.ts +1 -1
- package/dist/esm/types/src/components/QuoteProvider/hooks/useQuoteCreate.d.ts +1 -1
- package/dist/esm/types/src/components/QuoteProvider/hooks/useSelectedPriceListQuoteChange.d.ts +1 -1
- package/dist/esm/types/src/components/Signup/Signup.d.ts +4 -35
- package/dist/esm/types/src/components/Signup/Signup.stories.d.ts +4 -0
- package/dist/esm/types/src/components/Signup/SignupContent.d.ts +7 -2
- package/dist/esm/types/src/components/Signup/components/SignupCheckoutForm.d.ts +2 -0
- package/dist/esm/types/src/components/Signup/graphql/mutations/quoteAccountSignup.d.ts +76 -0
- package/dist/esm/types/src/components/Signup/hooks/useSignupCheckout.d.ts +11 -0
- package/dist/esm/types/src/components/Signup/index.d.ts +2 -5
- package/dist/esm/types/src/components/Subscriptions/AddonSubscriptionCards.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/checkoutBar/CheckoutPrice.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/priceListCardDesktop/PriceListCardDesktop.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/priceListCard/PriceListCardButton.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/Upgrade/fragments/UpgradeContent_QuoteFragment.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/context/upgradingSubscriptionContext.d.ts +4 -4
- package/dist/esm/types/src/components/Subscriptions/fragments/Subscriptions_SubscriptionFragment.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/fragments/UpgradingSubscriptionContext_SubscriptionFragment.d.ts +2 -2
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/fragments/QuantityDrawer_QuoteFragment.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/quantityChangeDrawer/utils/utils.d.ts +3 -3
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeTotal.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeUnitPrice.d.ts +2 -2
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionsList.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktopRow.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/SubscriptionCardHeader.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/components/SubscriptionCardActions.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardHeader/components/SubscriptionStatusText.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardMobile/SubscriptionCardMobile.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionUtils.d.ts +2 -2
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/utils/canSubscriptionUpgradeFromTrial.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/utils/canSubscriptionUpgradeFromTrialExpired.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/subscriptionsList/utils/sortSubscriptionCharges.d.ts +1 -1
- package/dist/esm/types/src/components/Subscriptions/tieredDisplayDropdown/util.d.ts +1 -1
- package/dist/esm/types/src/components/{Checkout → UpgradeCheckout}/QuoteCheckout.d.ts +4 -4
- package/dist/esm/types/src/components/UpgradeCheckout/UpgradeCheckout.d.ts +41 -0
- package/dist/esm/types/src/components/index.d.ts +4 -1
- package/dist/esm/types/src/components/priceListPricing/PricingTooltip.d.ts +7 -2
- package/dist/esm/types/src/components/priceListPricing/components/ChargePriceTiers.d.ts +1 -1
- package/dist/esm/types/src/graphql/mutations/checkout.d.ts +1 -1
- package/dist/esm/types/src/hooks/useHasTaxPlugin.d.ts +1 -0
- package/dist/esm/types/src/hooks/usePaymentMethod.d.ts +41 -0
- package/dist/esm/types/src/mocks/checkoutHandlers.d.ts +3 -0
- package/dist/esm/types/src/mocks/handlers.d.ts +1 -1
- package/dist/esm/types/src/utils/QueryKeyFactory.d.ts +26 -5
- package/dist/esm/types/src/utils/chargeUtils.d.ts +1 -1
- package/dist/esm/types/src/utils/couponUtils.d.ts +2 -2
- package/dist/esm/types/src/utils/priceListUtils/priceListPriceText.d.ts +1 -1
- package/dist/index.d.ts +724 -50
- package/package.json +1 -2
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/CheckoutSummary.d.ts +0 -9
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/components/CheckoutSummaryTotals.d.ts +0 -11
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_QuoteFragment.d.ts +0 -30
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/hooks/sortQuoteChangeCharges.d.ts +0 -14
- package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/totalsUtils.d.ts +0 -9
- package/dist/cjs/types/src/components/Signup/components/InitialSignupFormFields.d.ts +0 -46
- package/dist/cjs/types/src/components/Signup/components/LoadingOverlay.d.ts +0 -4
- package/dist/cjs/types/src/components/Signup/components/PriceListDisplay.d.ts +0 -29
- package/dist/cjs/types/src/components/Signup/components/PurchaseSuccessDisplay.d.ts +0 -6
- package/dist/cjs/types/src/components/Signup/components/QuoteCreateButton.d.ts +0 -6
- package/dist/cjs/types/src/components/Signup/components/SelfServiceBuyWarning.d.ts +0 -14
- package/dist/cjs/types/src/components/Signup/components/SignupForm/SignupForm.d.ts +0 -7
- package/dist/cjs/types/src/components/Signup/components/SignupForm/components/ExistingAccountForm.d.ts +0 -25
- package/dist/cjs/types/src/components/Signup/components/SignupForm/components/ExistingAccountLoadedEffect.d.ts +0 -29
- package/dist/cjs/types/src/components/Signup/components/SignupForm/components/NewAccountForm.d.ts +0 -6
- package/dist/cjs/types/src/components/Signup/components/SignupForm/hooks/useExistingAccount.d.ts +0 -15
- package/dist/cjs/types/src/components/Signup/components/SignupPaidPaymentForm.d.ts +0 -5
- package/dist/cjs/types/src/components/Signup/components/SignupPaymentForm.d.ts +0 -15
- package/dist/cjs/types/src/components/Signup/components/SignupSplitScreenContainer.d.ts +0 -6
- package/dist/cjs/types/src/components/Signup/components/SuccessDisplay/SuccessDisplay.d.ts +0 -10
- package/dist/cjs/types/src/components/Signup/components/SuccessDisplay/components/SignupSuccessDisplay.d.ts +0 -6
- package/dist/cjs/types/src/components/Signup/components/SuccessDisplay/components/ViewPortalSubscription.d.ts +0 -5
- package/dist/cjs/types/src/components/Signup/consts.d.ts +0 -1
- package/dist/cjs/types/src/components/Signup/contexts/SignupCallbacksContext.d.ts +0 -17
- package/dist/cjs/types/src/components/Signup/contexts/SignupFormOptionsContext.d.ts +0 -24
- package/dist/cjs/types/src/components/Signup/fragments/QuoteAcceptPage_PriceListFragment.d.ts +0 -9
- package/dist/cjs/types/src/components/Signup/fragments/SignupPaymentForm_QuoteFragment.d.ts +0 -13
- package/dist/cjs/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +0 -23
- package/dist/cjs/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +0 -31
- package/dist/cjs/types/src/components/Signup/hooks/useAccountDetailsUpdate.d.ts +0 -10
- package/dist/cjs/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +0 -4
- package/dist/cjs/types/src/components/Signup/hooks/useApplySignupFormDefaults.d.ts +0 -9
- package/dist/cjs/types/src/components/Signup/hooks/useQuoteAccountSignupMutation.d.ts +0 -29
- package/dist/cjs/types/src/components/Signup/hooks/useQuoteRecalculateTaxes.d.ts +0 -4
- package/dist/cjs/types/src/components/Signup/hooks/useSetSignupQuoteQueryData.d.ts +0 -5
- package/dist/cjs/types/src/components/Signup/hooks/useSignupQuoteQueryData.d.ts +0 -12
- package/dist/cjs/types/src/components/Signup/mutations/contactUpdate.d.ts +0 -12
- package/dist/cjs/types/src/components/Signup/mutations/quoteAccountSignup.d.ts +0 -34
- package/dist/cjs/types/src/components/Signup/mutations/quoteChangeUpdate.d.ts +0 -12
- package/dist/cjs/types/src/components/Signup/mutations/quoteRecalculateTaxes.d.ts +0 -11
- package/dist/cjs/types/src/components/Signup/queries/getAccountByCode.d.ts +0 -8
- package/dist/cjs/types/src/components/Signup/queries/getAccountForSignupCompose.d.ts +0 -20
- package/dist/cjs/types/src/components/Signup/queries/getCurrentUserAccountForSignup.d.ts +0 -14
- package/dist/cjs/types/src/components/Signup/queries/getSignupQuote.d.ts +0 -10
- package/dist/cjs/types/src/components/Signup/signup-quote/SignupQuote.d.ts +0 -2
- package/dist/cjs/types/src/components/Signup/signup-quote/SignupQuoteProvider.d.ts +0 -9
- package/dist/cjs/types/src/components/Signup/signup-quote/fragments/SignupQuote_QuoteFragment.d.ts +0 -14
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/CheckoutSummary.d.ts +0 -9
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/components/CheckoutSummaryTotals.d.ts +0 -11
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_QuoteFragment.d.ts +0 -30
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/hooks/sortQuoteChangeCharges.d.ts +0 -14
- package/dist/esm/types/src/components/Signup/components/CheckoutSummary/totalsUtils.d.ts +0 -9
- package/dist/esm/types/src/components/Signup/components/InitialSignupFormFields.d.ts +0 -46
- package/dist/esm/types/src/components/Signup/components/LoadingOverlay.d.ts +0 -4
- package/dist/esm/types/src/components/Signup/components/PriceListDisplay.d.ts +0 -29
- package/dist/esm/types/src/components/Signup/components/PurchaseSuccessDisplay.d.ts +0 -6
- package/dist/esm/types/src/components/Signup/components/QuoteCreateButton.d.ts +0 -6
- package/dist/esm/types/src/components/Signup/components/SelfServiceBuyWarning.d.ts +0 -14
- package/dist/esm/types/src/components/Signup/components/SignupForm/SignupForm.d.ts +0 -7
- package/dist/esm/types/src/components/Signup/components/SignupForm/components/ExistingAccountForm.d.ts +0 -25
- package/dist/esm/types/src/components/Signup/components/SignupForm/components/ExistingAccountLoadedEffect.d.ts +0 -29
- package/dist/esm/types/src/components/Signup/components/SignupForm/components/NewAccountForm.d.ts +0 -6
- package/dist/esm/types/src/components/Signup/components/SignupForm/hooks/useExistingAccount.d.ts +0 -15
- package/dist/esm/types/src/components/Signup/components/SignupPaidPaymentForm.d.ts +0 -5
- package/dist/esm/types/src/components/Signup/components/SignupPaymentForm.d.ts +0 -15
- package/dist/esm/types/src/components/Signup/components/SignupSplitScreenContainer.d.ts +0 -6
- package/dist/esm/types/src/components/Signup/components/SuccessDisplay/SuccessDisplay.d.ts +0 -10
- package/dist/esm/types/src/components/Signup/components/SuccessDisplay/components/SignupSuccessDisplay.d.ts +0 -6
- package/dist/esm/types/src/components/Signup/components/SuccessDisplay/components/ViewPortalSubscription.d.ts +0 -5
- package/dist/esm/types/src/components/Signup/consts.d.ts +0 -1
- package/dist/esm/types/src/components/Signup/contexts/SignupCallbacksContext.d.ts +0 -17
- package/dist/esm/types/src/components/Signup/contexts/SignupFormOptionsContext.d.ts +0 -24
- package/dist/esm/types/src/components/Signup/fragments/QuoteAcceptPage_PriceListFragment.d.ts +0 -9
- package/dist/esm/types/src/components/Signup/fragments/SignupPaymentForm_QuoteFragment.d.ts +0 -13
- package/dist/esm/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +0 -23
- package/dist/esm/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +0 -31
- package/dist/esm/types/src/components/Signup/hooks/useAccountDetailsUpdate.d.ts +0 -10
- package/dist/esm/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +0 -4
- package/dist/esm/types/src/components/Signup/hooks/useApplySignupFormDefaults.d.ts +0 -9
- package/dist/esm/types/src/components/Signup/hooks/useQuoteAccountSignupMutation.d.ts +0 -29
- package/dist/esm/types/src/components/Signup/hooks/useQuoteRecalculateTaxes.d.ts +0 -4
- package/dist/esm/types/src/components/Signup/hooks/useSetSignupQuoteQueryData.d.ts +0 -5
- package/dist/esm/types/src/components/Signup/hooks/useSignupQuoteQueryData.d.ts +0 -12
- package/dist/esm/types/src/components/Signup/mutations/contactUpdate.d.ts +0 -12
- package/dist/esm/types/src/components/Signup/mutations/quoteAccountSignup.d.ts +0 -34
- package/dist/esm/types/src/components/Signup/mutations/quoteChangeUpdate.d.ts +0 -12
- package/dist/esm/types/src/components/Signup/mutations/quoteRecalculateTaxes.d.ts +0 -11
- package/dist/esm/types/src/components/Signup/queries/getAccountByCode.d.ts +0 -8
- package/dist/esm/types/src/components/Signup/queries/getAccountForSignupCompose.d.ts +0 -20
- package/dist/esm/types/src/components/Signup/queries/getCurrentUserAccountForSignup.d.ts +0 -14
- package/dist/esm/types/src/components/Signup/queries/getSignupQuote.d.ts +0 -10
- package/dist/esm/types/src/components/Signup/signup-quote/SignupQuote.d.ts +0 -2
- package/dist/esm/types/src/components/Signup/signup-quote/SignupQuoteProvider.d.ts +0 -9
- package/dist/esm/types/src/components/Signup/signup-quote/fragments/SignupQuote_QuoteFragment.d.ts +0 -14
- /package/dist/cjs/types/src/components/{Signup → CheckoutShared}/components/Logo.d.ts +0 -0
- /package/dist/cjs/types/src/components/{Signup → CheckoutShared}/components/SuccessDisplay/components/SuccessIcon.d.ts +0 -0
- /package/dist/cjs/types/src/components/{Signup → CheckoutShared}/utils/createPortalReturnUrl.d.ts +0 -0
- /package/dist/cjs/types/src/components/{Checkout → UpgradeCheckout}/QuoteCheckoutPaymentForm.d.ts +0 -0
- /package/dist/cjs/types/src/components/{Checkout → UpgradeCheckout}/QuoteIsLoadingIndicator.d.ts +0 -0
- /package/dist/cjs/types/src/components/{Checkout → UpgradeCheckout}/checkoutUtils.d.ts +0 -0
- /package/dist/esm/types/src/components/{Signup → CheckoutShared}/components/Logo.d.ts +0 -0
- /package/dist/esm/types/src/components/{Signup → CheckoutShared}/components/SuccessDisplay/components/SuccessIcon.d.ts +0 -0
- /package/dist/esm/types/src/components/{Signup → CheckoutShared}/utils/createPortalReturnUrl.d.ts +0 -0
- /package/dist/esm/types/src/components/{Checkout → UpgradeCheckout}/QuoteCheckoutPaymentForm.d.ts +0 -0
- /package/dist/esm/types/src/components/{Checkout → UpgradeCheckout}/QuoteIsLoadingIndicator.d.ts +0 -0
- /package/dist/esm/types/src/components/{Checkout → UpgradeCheckout}/checkoutUtils.d.ts +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FragmentOf } from 'gql.tada';
|
|
2
|
+
import { CheckoutQuoteDocument_QuoteFragment } from '../../graphql/fragments/CheckoutQuoteDocument_QuoteFragment';
|
|
3
|
+
/**
|
|
4
|
+
* The quote PDF under the summary, when the quote was created with a document template (Checkout's
|
|
5
|
+
* `documentTemplateId` prop). Renders nothing otherwise. Fetched with the provider's token (Checkout's
|
|
6
|
+
* portal session). The PDF shows a spinner while it loads and
|
|
7
|
+
* nothing if it can't be fetched; Fullscreen and Download appear once it has rendered.
|
|
8
|
+
*
|
|
9
|
+
* `live` re-fetches the PDF whenever the quote changes (a coupon applied before paying); the receipt
|
|
10
|
+
* shows a checked-out quote, which no longer changes.
|
|
11
|
+
*/
|
|
12
|
+
export default function CheckoutQuoteDocument({ quote: maskedQuote, live, }: {
|
|
13
|
+
quote: FragmentOf<typeof CheckoutQuoteDocument_QuoteFragment>;
|
|
14
|
+
live?: boolean;
|
|
15
|
+
}): import("react").JSX.Element | null;
|
package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSummary/CheckoutReceipt.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FragmentOf } from 'gql.tada';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import { CheckoutReceipt_QuoteFragment } from '../../graphql/fragments/CheckoutReceipt_QuoteFragment';
|
|
4
|
+
import { CheckoutSummary_PriceListFragment } from '../../graphql/fragments/CheckoutSummary_PriceListFragment';
|
|
5
|
+
/** The left column after the checkout: a receipt of the quote that was checked out, with the API's totals. */
|
|
6
|
+
export default function CheckoutReceipt({ priceList: maskedPriceList, quote: maskedQuote, collapsible, quoteDocument, }: {
|
|
7
|
+
priceList: FragmentOf<typeof CheckoutSummary_PriceListFragment>;
|
|
8
|
+
quote: FragmentOf<typeof CheckoutReceipt_QuoteFragment>;
|
|
9
|
+
/** Mobile: collapse everything below the header into a plan + amount row. */
|
|
10
|
+
collapsible: boolean;
|
|
11
|
+
/** The quote PDF, under the totals (inside the disclosure on mobile). */
|
|
12
|
+
quoteDocument?: ReactNode;
|
|
13
|
+
}): import("react").JSX.Element;
|
package/dist/esm/types/src/components/CheckoutShared/components/CheckoutSummary/CheckoutSummary.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FragmentOf } from 'gql.tada';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { CheckoutSummary_PriceListFragment } from '../../graphql/fragments/CheckoutSummary_PriceListFragment';
|
|
4
|
+
/** The left column before the checkout: what's due today, line items and the API's totals for the previewed quote. */
|
|
5
|
+
export default function CheckoutSummary({ priceList: maskedPriceList, isTrial, collapsible, quoteDocument, }: {
|
|
6
|
+
priceList: FragmentOf<typeof CheckoutSummary_PriceListFragment>;
|
|
7
|
+
isTrial: boolean;
|
|
8
|
+
/** Mobile: collapse everything below the header into a plan + amount row. */
|
|
9
|
+
collapsible: boolean;
|
|
10
|
+
/** The quote PDF, under the totals (inside the disclosure on mobile). */
|
|
11
|
+
quoteDocument?: ReactNode;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { PricingTooltip_PriceListChargeFragment } from '@/components/priceListPricing/PricingTooltip';
|
|
2
|
+
import type { FragmentOf } from 'gql.tada';
|
|
3
|
+
/** Name on the left; the amount on the right, underlined to show the charge's pricing on hover. */
|
|
4
|
+
export default function CheckoutSummaryLineItem({ name, amount: value, priceListCharge, currencyId, }: {
|
|
5
|
+
name: string;
|
|
6
|
+
amount: number;
|
|
7
|
+
/** Describes the charge's pricing on hover. */
|
|
8
|
+
priceListCharge: FragmentOf<typeof PricingTooltip_PriceListChargeFragment> | null | undefined;
|
|
9
|
+
currencyId: string;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FragmentOf } from 'gql.tada';
|
|
2
|
+
import { CheckoutSummaryLineItems_QuoteFragment } from '../../../graphql/fragments/CheckoutSummaryLineItems_QuoteFragment';
|
|
3
|
+
/** One row per charge on the quote; the coupon's own charge is shown in the totals instead. */
|
|
4
|
+
export default function CheckoutSummaryLineItems({ quote: maskedQuote, currencyId, }: {
|
|
5
|
+
quote: FragmentOf<typeof CheckoutSummaryLineItems_QuoteFragment>;
|
|
6
|
+
currencyId: string;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
type Props = {
|
|
3
|
+
/** Sum of the line items. */
|
|
4
|
+
subtotal: number;
|
|
5
|
+
discountAmount: number;
|
|
6
|
+
/** Set when a coupon is applied; the Discount row is shown only then. */
|
|
7
|
+
couponCode: string | undefined;
|
|
8
|
+
/** The Tax row is hidden when undefined. */
|
|
9
|
+
taxAmount: number | undefined;
|
|
10
|
+
/** A taxation plugin needs more of the address before taxes can be calculated. */
|
|
11
|
+
taxNeedsAddress?: boolean;
|
|
12
|
+
/** subtotal - discountAmount + tax. */
|
|
13
|
+
total: number;
|
|
14
|
+
currencyId: string;
|
|
15
|
+
totalLabel: string;
|
|
16
|
+
/** Shown in the coupon slot while no coupon is applied (the "Have a coupon code?" editor). */
|
|
17
|
+
couponEditor?: ReactNode;
|
|
18
|
+
/** When set, the Discount row gets a remove button. */
|
|
19
|
+
onRemoveCoupon?: () => void;
|
|
20
|
+
isRemovingCoupon?: boolean;
|
|
21
|
+
};
|
|
22
|
+
/** Divider → Subtotal → Discount / coupon editor → Tax → Divider → Total. */
|
|
23
|
+
export declare function CheckoutSummaryTotals({ subtotal, discountAmount, couponCode, taxAmount, taxNeedsAddress, total, currencyId, totalLabel, couponEditor, onRemoveCoupon, isRemovingCoupon, }: Props): import("react").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Mobile: the summary collapses to one row (plan name + amount) that expands to show the line
|
|
4
|
+
* items and totals.
|
|
5
|
+
*/
|
|
6
|
+
export default function SummaryDisclosure({ title, amount, children, }: {
|
|
7
|
+
title: ReactNode;
|
|
8
|
+
amount: ReactNode;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The left column's shape, shared by the summary and the receipt: header, then either the headline
|
|
4
|
+
* block (title, amount, caption) over the details, or on mobile a disclosure row that expands to them.
|
|
5
|
+
*/
|
|
6
|
+
export default function SummaryLayout({ header, title, disclosureTitle, headline, headlineSuffix, caption, collapsible, children, }: {
|
|
7
|
+
header: ReactNode;
|
|
8
|
+
title: ReactNode;
|
|
9
|
+
/** The plain-text title for the collapsed mobile row. */
|
|
10
|
+
disclosureTitle: string;
|
|
11
|
+
headline: ReactNode;
|
|
12
|
+
headlineSuffix?: string;
|
|
13
|
+
caption?: string;
|
|
14
|
+
collapsible: boolean;
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
}): import("react").JSX.Element;
|
package/dist/esm/types/src/components/CheckoutShared/components/SuccessDisplay/SuccessDisplay.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FragmentOf } from 'gql.tada';
|
|
2
|
+
import { CheckoutResult } from '../../contexts/CheckoutResultContext';
|
|
3
|
+
import { SuccessDisplay_PriceListFragment } from '../../graphql/fragments/SuccessDisplay_PriceListFragment';
|
|
4
|
+
/** The right column after the checkout: confirmation, payment details and what to do next. */
|
|
5
|
+
export default function SuccessDisplay({ result, priceList: maskedPriceList, }: {
|
|
6
|
+
result: CheckoutResult;
|
|
7
|
+
priceList: FragmentOf<typeof SuccessDisplay_PriceListFragment>;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
declare const VARIANT_CLASS: {
|
|
3
|
+
/** The filled main action, styled by the appearance's `.Button` rules. */
|
|
4
|
+
primary: string;
|
|
5
|
+
/** A bordered secondary action. */
|
|
6
|
+
plain: string;
|
|
7
|
+
/** Reads as a link in the text. */
|
|
8
|
+
link: string;
|
|
9
|
+
/** A small square holding only an icon; give it an `aria-label`. */
|
|
10
|
+
icon: string;
|
|
11
|
+
};
|
|
12
|
+
type Props = Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'type' | 'disabled' | 'onClick' | 'aria-label'> & {
|
|
13
|
+
variant?: keyof typeof VARIANT_CLASS;
|
|
14
|
+
/** Shows a spinner in place of the icon and ignores clicks, without looking disabled. */
|
|
15
|
+
loading?: boolean;
|
|
16
|
+
icon?: ReactNode;
|
|
17
|
+
/** Renders a link that looks like the button. */
|
|
18
|
+
href?: string;
|
|
19
|
+
className?: string;
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
};
|
|
22
|
+
/** A native button (or a link, given `href`). */
|
|
23
|
+
export default function Button({ variant, loading, icon, href, className, children, type, onClick, ...props }: Props): import("react").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { ResolvedVariables } from '../../appearance/variables';
|
|
2
|
+
export declare function buttonRules(v: ResolvedVariables): {
|
|
3
|
+
internal: {
|
|
4
|
+
'.ButtonBase': {
|
|
5
|
+
display: string;
|
|
6
|
+
alignItems: string;
|
|
7
|
+
justifyContent: string;
|
|
8
|
+
gap: string;
|
|
9
|
+
boxSizing: string;
|
|
10
|
+
margin: string;
|
|
11
|
+
padding: string;
|
|
12
|
+
fontFamily: string;
|
|
13
|
+
fontSize: string;
|
|
14
|
+
lineHeight: string;
|
|
15
|
+
textDecoration: string;
|
|
16
|
+
cursor: string;
|
|
17
|
+
transition: string;
|
|
18
|
+
};
|
|
19
|
+
'.ButtonBase:focus-visible': {
|
|
20
|
+
outline: string;
|
|
21
|
+
outlineOffset: string;
|
|
22
|
+
};
|
|
23
|
+
'.ButtonBase:disabled': {
|
|
24
|
+
cursor: string;
|
|
25
|
+
};
|
|
26
|
+
'.ButtonBase--loading': {
|
|
27
|
+
opacity: string;
|
|
28
|
+
cursor: string;
|
|
29
|
+
pointerEvents: string;
|
|
30
|
+
};
|
|
31
|
+
'.ButtonBase.Compact': {
|
|
32
|
+
padding: string;
|
|
33
|
+
};
|
|
34
|
+
'.ButtonPlain': {
|
|
35
|
+
border: string;
|
|
36
|
+
borderRadius: string;
|
|
37
|
+
backgroundColor: string;
|
|
38
|
+
color: string;
|
|
39
|
+
};
|
|
40
|
+
'.ButtonPlain:hover': {
|
|
41
|
+
borderColor: string;
|
|
42
|
+
color: string;
|
|
43
|
+
};
|
|
44
|
+
'.ButtonPlain:disabled': {
|
|
45
|
+
borderColor: string;
|
|
46
|
+
backgroundColor: string;
|
|
47
|
+
color: string;
|
|
48
|
+
};
|
|
49
|
+
'.ButtonLink': {
|
|
50
|
+
minHeight: string;
|
|
51
|
+
padding: string;
|
|
52
|
+
border: string;
|
|
53
|
+
background: string;
|
|
54
|
+
color: string;
|
|
55
|
+
};
|
|
56
|
+
'.ButtonIcon': {
|
|
57
|
+
width: string;
|
|
58
|
+
height: string;
|
|
59
|
+
marginRight: string;
|
|
60
|
+
padding: string;
|
|
61
|
+
border: string;
|
|
62
|
+
borderRadius: string;
|
|
63
|
+
background: string;
|
|
64
|
+
color: string;
|
|
65
|
+
};
|
|
66
|
+
'.ButtonIcon:hover': {
|
|
67
|
+
backgroundColor: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
shared: {};
|
|
71
|
+
block: {
|
|
72
|
+
/**
|
|
73
|
+
* The primary action (the pay button). Bunny only. Sized like `.Input`: change its height through `padding`.
|
|
74
|
+
* @default filled with `colorPrimary`, `10px 16px` padding
|
|
75
|
+
*/
|
|
76
|
+
'.Button': {
|
|
77
|
+
border: string;
|
|
78
|
+
borderRadius: string;
|
|
79
|
+
backgroundColor: string;
|
|
80
|
+
color: string;
|
|
81
|
+
};
|
|
82
|
+
/** The primary button under the pointer. @default `colorPrimary`'s hover shade */
|
|
83
|
+
'.Button:hover': {
|
|
84
|
+
backgroundColor: string;
|
|
85
|
+
};
|
|
86
|
+
/** The primary button while pressed. @default `colorPrimary`'s pressed shade */
|
|
87
|
+
'.Button:active': {
|
|
88
|
+
backgroundColor: string;
|
|
89
|
+
};
|
|
90
|
+
/** The primary button when disabled. @default `rgba(113, 125, 148, 0.1)` fill */
|
|
91
|
+
'.Button:disabled': {
|
|
92
|
+
backgroundColor: string;
|
|
93
|
+
color: string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
type Option = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* A select with a menu of our own, so the open list is styled by the appearance too (a native
|
|
8
|
+
* select's list is drawn by the browser). The closed control is a text input under the same
|
|
9
|
+
* `.Input` rules as the others, with a chevron; typing in it filters the options by label or
|
|
10
|
+
* value. Works as the child of a `Form.Item`, like `TextInput`.
|
|
11
|
+
*/
|
|
12
|
+
declare const Select: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "onChange"> & {
|
|
13
|
+
options: Option[];
|
|
14
|
+
value?: string;
|
|
15
|
+
onChange?: (value: string) => void;
|
|
16
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
17
|
+
export default Select;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ResolvedVariables } from '../../appearance/variables';
|
|
2
|
+
export declare function selectRules(v: ResolvedVariables): {
|
|
3
|
+
internal: {
|
|
4
|
+
'.Input.Select': {
|
|
5
|
+
paddingRight: string;
|
|
6
|
+
backgroundImage: string;
|
|
7
|
+
backgroundRepeat: string;
|
|
8
|
+
backgroundPosition: string;
|
|
9
|
+
cursor: string;
|
|
10
|
+
};
|
|
11
|
+
'.Menu': {
|
|
12
|
+
position: string;
|
|
13
|
+
zIndex: string;
|
|
14
|
+
top: string;
|
|
15
|
+
left: string;
|
|
16
|
+
right: string;
|
|
17
|
+
maxHeight: string;
|
|
18
|
+
overflowY: string;
|
|
19
|
+
margin: string;
|
|
20
|
+
padding: string;
|
|
21
|
+
listStyle: string;
|
|
22
|
+
border: string;
|
|
23
|
+
borderRadius: string;
|
|
24
|
+
backgroundColor: string;
|
|
25
|
+
boxShadow: string;
|
|
26
|
+
};
|
|
27
|
+
'.Menu[data-placement="top"]': {
|
|
28
|
+
top: string;
|
|
29
|
+
bottom: string;
|
|
30
|
+
};
|
|
31
|
+
'.Option': {
|
|
32
|
+
padding: string;
|
|
33
|
+
borderRadius: string;
|
|
34
|
+
lineHeight: string;
|
|
35
|
+
color: string;
|
|
36
|
+
overflow: string;
|
|
37
|
+
textOverflow: string;
|
|
38
|
+
whiteSpace: string;
|
|
39
|
+
cursor: string;
|
|
40
|
+
};
|
|
41
|
+
'.Option[data-active="true"]': {
|
|
42
|
+
backgroundColor: string;
|
|
43
|
+
};
|
|
44
|
+
'.Option[aria-selected="true"]': {
|
|
45
|
+
fontWeight: string;
|
|
46
|
+
};
|
|
47
|
+
'.MenuEmpty': {
|
|
48
|
+
padding: string;
|
|
49
|
+
lineHeight: string;
|
|
50
|
+
color: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
shared: {};
|
|
54
|
+
block: {};
|
|
55
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A native text input styled by the appearance's `.Input` rules. Takes what `Form.Item` gives its
|
|
4
|
+
* child (`id`, `value`, `onChange`, `aria-invalid`, a ref to focus), so it works as one unchanged.
|
|
5
|
+
*/
|
|
6
|
+
declare const TextInput: import("react").ForwardRefExoticComponent<InputHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement>>;
|
|
7
|
+
export default TextInput;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { RuleContext } from '../../appearance/ruleGroups';
|
|
2
|
+
import type { ResolvedVariables } from '../../appearance/variables';
|
|
3
|
+
export declare function textInputRules(v: ResolvedVariables, { isMobile }: RuleContext): {
|
|
4
|
+
internal: {
|
|
5
|
+
'.InputBase': {
|
|
6
|
+
display: string;
|
|
7
|
+
boxSizing: string;
|
|
8
|
+
width: string;
|
|
9
|
+
margin: string;
|
|
10
|
+
fontFamily: string;
|
|
11
|
+
outline: string;
|
|
12
|
+
appearance: string;
|
|
13
|
+
};
|
|
14
|
+
'.InputBase:disabled': {
|
|
15
|
+
cursor: string;
|
|
16
|
+
};
|
|
17
|
+
'.Input.Compact': {
|
|
18
|
+
padding: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
shared: {
|
|
22
|
+
/**
|
|
23
|
+
* Text inputs and the country select, on Bunny's fields and the payment provider's alike. There is no
|
|
24
|
+
* `height`: vertical padding + `lineHeight` + borders make it (44px by default), so raise the padding to grow both.
|
|
25
|
+
* @default `10px 12px` padding, `20px` line, `borderWidth` solid `colorBorder`
|
|
26
|
+
*/
|
|
27
|
+
'.Input': {
|
|
28
|
+
border: string;
|
|
29
|
+
borderRadius: string;
|
|
30
|
+
padding: string;
|
|
31
|
+
fontSize: string;
|
|
32
|
+
lineHeight: string;
|
|
33
|
+
color: string;
|
|
34
|
+
backgroundColor: string;
|
|
35
|
+
boxShadow: string;
|
|
36
|
+
transition: string;
|
|
37
|
+
};
|
|
38
|
+
/** A text input under the pointer. Forwarded to the payment provider. @default `colorPrimary`'s hover shade border */
|
|
39
|
+
'.Input:hover': {
|
|
40
|
+
borderColor: string;
|
|
41
|
+
};
|
|
42
|
+
/** A focused text input. Forwarded to the payment provider. @default `colorPrimary` border and `focusBoxShadow` */
|
|
43
|
+
'.Input:focus': {
|
|
44
|
+
borderColor: string;
|
|
45
|
+
boxShadow: string;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* A text input that failed validation. Forwarded to the payment provider. The default clears the focus ring:
|
|
49
|
+
* set `boxShadow` to give it one.
|
|
50
|
+
* @default `colorDanger` border, no shadow
|
|
51
|
+
*/
|
|
52
|
+
'.Input--invalid': {
|
|
53
|
+
borderColor: string;
|
|
54
|
+
boxShadow: string;
|
|
55
|
+
};
|
|
56
|
+
/** A disabled text input. Forwarded to the payment provider. */
|
|
57
|
+
'.Input:disabled': {
|
|
58
|
+
borderColor: string;
|
|
59
|
+
color: string;
|
|
60
|
+
backgroundColor: string;
|
|
61
|
+
};
|
|
62
|
+
/** Placeholder text. Forwarded to the payment provider. @default `colorTextPlaceholder` */
|
|
63
|
+
'.Input::placeholder': {
|
|
64
|
+
color: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
block: {};
|
|
68
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/** Every value the checkout form can hold. Only `email` is shown by default. */
|
|
2
|
+
export type CheckoutFormValues = {
|
|
3
|
+
email: string;
|
|
4
|
+
billingCountry: string;
|
|
5
|
+
billingZip?: string;
|
|
6
|
+
/** The payer's name on the card or bank account, Stripe only. Never sent to the API. */
|
|
7
|
+
nameOnCard?: string;
|
|
8
|
+
firstName?: string;
|
|
9
|
+
lastName?: string;
|
|
10
|
+
accountName?: string;
|
|
11
|
+
billingStreet?: string;
|
|
12
|
+
billingCity?: string;
|
|
13
|
+
billingState?: string;
|
|
14
|
+
taxNumber?: string;
|
|
15
|
+
};
|
|
16
|
+
export type CheckoutDefaultValues = Partial<Omit<CheckoutFormValues, 'nameOnCard'>>;
|
|
17
|
+
/**
|
|
18
|
+
* Optional fields to show and require. Email is always shown; the taxation plugin can add country,
|
|
19
|
+
* state or others on top of these (see `resolveCheckoutFields`).
|
|
20
|
+
*/
|
|
21
|
+
export type RequiredBillingDetailsFlags = {
|
|
22
|
+
firstName?: boolean;
|
|
23
|
+
lastName?: boolean;
|
|
24
|
+
accountName?: boolean;
|
|
25
|
+
billingStreet?: boolean;
|
|
26
|
+
billingCity?: boolean;
|
|
27
|
+
billingState?: boolean;
|
|
28
|
+
billingZip?: boolean;
|
|
29
|
+
taxNumber?: boolean;
|
|
30
|
+
};
|
|
31
|
+
/** Fields that can be disabled. Same keys as `CheckoutDefaultValues`. */
|
|
32
|
+
export type CheckoutDisabledFields = Partial<Record<keyof CheckoutDefaultValues, boolean>>;
|
|
33
|
+
/**
|
|
34
|
+
* Customer-facing form configuration for the Signup and Checkout components.
|
|
35
|
+
* All options are optional. Add new form options here rather than as new props on the components.
|
|
36
|
+
*/
|
|
37
|
+
export type CheckoutFormOptions = {
|
|
38
|
+
/** The default form values */
|
|
39
|
+
defaultValues?: CheckoutDefaultValues;
|
|
40
|
+
/** Which optional account fields to show and require */
|
|
41
|
+
requiredBillingDetails?: RequiredBillingDetailsFlags;
|
|
42
|
+
/**
|
|
43
|
+
* Fields the user cannot edit. Provide a default value for each disabled field:
|
|
44
|
+
* a required disabled field without a value blocks the checkout.
|
|
45
|
+
*/
|
|
46
|
+
disabledFields?: CheckoutDisabledFields;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Customer-facing callbacks fired by the Signup and Checkout components during their lifecycle.
|
|
50
|
+
* All callbacks are optional. Add new events here rather than as new props on the components.
|
|
51
|
+
*/
|
|
52
|
+
export type CheckoutCallbacks = {
|
|
53
|
+
/** The subscription was checked out (paid, or free / trial). */
|
|
54
|
+
onPaymentSuccess?: () => void;
|
|
55
|
+
};
|
|
56
|
+
/** Everything the consumer configured, as given to the flow's root. Static for the life of the flow. */
|
|
57
|
+
export type CheckoutConfig = {
|
|
58
|
+
priceListCode: string;
|
|
59
|
+
/** If trial is allowed on the price list, enables the trial for this checkout. */
|
|
60
|
+
enableTrial: boolean;
|
|
61
|
+
/** A coupon code to pre-apply. */
|
|
62
|
+
defaultCouponCode: string | undefined;
|
|
63
|
+
form: CheckoutFormOptions;
|
|
64
|
+
callbacks: CheckoutCallbacks;
|
|
65
|
+
};
|
|
66
|
+
export declare const CheckoutConfigProvider: ({ value, children }: {
|
|
67
|
+
value: CheckoutConfig;
|
|
68
|
+
children?: import("react").ReactNode;
|
|
69
|
+
}) => import("react").JSX.Element, useCheckoutConfig: () => CheckoutConfig;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CheckoutFields } from '../utils/resolveCheckoutFields';
|
|
2
|
+
/** The resolved field rules from `useTaxRequiredFields`, for the form's field components. */
|
|
3
|
+
export declare const CheckoutFieldsProvider: ({ value, children }: {
|
|
4
|
+
value: CheckoutFields;
|
|
5
|
+
children?: import("react").ReactNode;
|
|
6
|
+
}) => import("react").JSX.Element, useCheckoutFields: () => CheckoutFields;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FormInstance } from 'antd/es/form';
|
|
2
|
+
import type { CheckoutFormValues } from './CheckoutConfigContext';
|
|
3
|
+
/** The antd form instance, so the summary and the flow's hooks can watch and validate the fields. */
|
|
4
|
+
export declare const CheckoutFormProvider: ({ value, children }: {
|
|
5
|
+
value: FormInstance<CheckoutFormValues>;
|
|
6
|
+
children?: import("react").ReactNode;
|
|
7
|
+
}) => import("react").JSX.Element, useCheckoutForm: () => FormInstance<CheckoutFormValues>;
|
package/dist/esm/types/src/components/CheckoutShared/contexts/CheckoutPaymentMethodsContext.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { FragmentOf } from 'gql.tada';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { SavedPaymentMethodTiles_PaymentMethodFragment } from '../graphql/fragments/SavedPaymentMethodTiles_PaymentMethodFragment';
|
|
4
|
+
import { CheckoutPaymentPlugin } from '../utils/asPluginData';
|
|
5
|
+
export declare const STRIPE_FRONTEND = "StripePayment";
|
|
6
|
+
export declare const DEMO_PAY_FRONTEND = "DemoPayPayment";
|
|
7
|
+
export type CheckoutSavedPaymentMethod = FragmentOf<typeof SavedPaymentMethodTiles_PaymentMethodFragment> & {
|
|
8
|
+
id: string;
|
|
9
|
+
};
|
|
10
|
+
type CheckoutPaymentMethodsValue = {
|
|
11
|
+
plugins: CheckoutPaymentPlugin[];
|
|
12
|
+
stripePlugin: CheckoutPaymentPlugin | undefined;
|
|
13
|
+
/** The highlighted plugin: the one chosen, or the one owning the selected saved payment method. */
|
|
14
|
+
selectedPlugin: CheckoutPaymentPlugin | undefined;
|
|
15
|
+
selectedPluginName: string | undefined;
|
|
16
|
+
/** Choose a plugin and pay with a new card on it. */
|
|
17
|
+
setSelectedPluginId: (id: string) => void;
|
|
18
|
+
/** Payment methods already stored on the account, if the flow has one. */
|
|
19
|
+
savedPaymentMethods: CheckoutSavedPaymentMethod[];
|
|
20
|
+
selectedSavedPaymentMethod: CheckoutSavedPaymentMethod | undefined;
|
|
21
|
+
setSelectedSavedPaymentMethodId: (id: string) => void;
|
|
22
|
+
/** Drop the saved payment method and pay with a new card on the highlighted plugin. */
|
|
23
|
+
selectNewPaymentMethod: () => void;
|
|
24
|
+
};
|
|
25
|
+
declare const useCheckoutPaymentMethods: () => CheckoutPaymentMethodsValue;
|
|
26
|
+
/**
|
|
27
|
+
* Payment plugins the checkout form has a payment form for, plus the account's saved payment methods
|
|
28
|
+
* when there is an account. The form shows them as two sections: which plugin, then which saved
|
|
29
|
+
* method (or a new card). By default the account's default (or first) saved method is selected,
|
|
30
|
+
* otherwise a new card on the first plugin. Selecting a saved method highlights the plugin it
|
|
31
|
+
* belongs to; selecting a plugin switches to a new card on it.
|
|
32
|
+
*/
|
|
33
|
+
export declare function CheckoutPaymentMethodsProvider({ savedPaymentMethods, children, }: {
|
|
34
|
+
savedPaymentMethods?: CheckoutSavedPaymentMethod[];
|
|
35
|
+
children: ReactNode;
|
|
36
|
+
}): import("react").JSX.Element;
|
|
37
|
+
export { useCheckoutPaymentMethods };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { AmountDuePreview } from '../hooks/useAmountDuePreview';
|
|
2
|
+
/**
|
|
3
|
+
* What is due before the checkout and the coupon on it, as the summary, the form and the Pay button
|
|
4
|
+
* need them. Each flow keeps the coupon its own way (Signup locally, Checkout on its quote); both
|
|
5
|
+
* price it through the same preview.
|
|
6
|
+
*/
|
|
7
|
+
export type CheckoutPricingState = {
|
|
8
|
+
/** The latest preview; its quote carries the line items. */
|
|
9
|
+
preview: AmountDuePreview | undefined;
|
|
10
|
+
/** Something is due today, so a payment method is needed. */
|
|
11
|
+
needsPayment: boolean;
|
|
12
|
+
/** A recalculation (billing details, coupon, trial) is in flight or still debouncing. */
|
|
13
|
+
isPending: boolean;
|
|
14
|
+
hasResolvedOnce: boolean;
|
|
15
|
+
couponCode: string | undefined;
|
|
16
|
+
setCouponCode: (code: string | undefined) => void;
|
|
17
|
+
isApplyingCoupon: boolean;
|
|
18
|
+
isRemovingCoupon: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare const CheckoutPricingProvider: ({ value, children }: {
|
|
21
|
+
value: CheckoutPricingState;
|
|
22
|
+
children?: import("react").ReactNode;
|
|
23
|
+
}) => import("react").JSX.Element, useCheckoutPricing: () => CheckoutPricingState;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { FragmentOf } from 'gql.tada';
|
|
2
|
+
import { CheckoutResult_QuoteFragment } from '../graphql/fragments/CheckoutResult_QuoteFragment';
|
|
3
|
+
import { SuccessDisplay_PaymentMethodFragment } from '../graphql/fragments/SuccessDisplay_PaymentMethodFragment';
|
|
4
|
+
export type CheckoutResult = {
|
|
5
|
+
portalSessionToken: string;
|
|
6
|
+
quote: FragmentOf<typeof CheckoutResult_QuoteFragment>;
|
|
7
|
+
/** The email the account was created with; the invoice is sent there. */
|
|
8
|
+
email: string;
|
|
9
|
+
/**
|
|
10
|
+
* The payment method that was charged, when the flow can read it (Checkout, from the account's
|
|
11
|
+
* stored methods); null when nothing was charged (trial, free, 100% coupon). Signup leaves it out:
|
|
12
|
+
* its token can't read payment methods.
|
|
13
|
+
*/
|
|
14
|
+
paymentMethod?: FragmentOf<typeof SuccessDisplay_PaymentMethodFragment> | null;
|
|
15
|
+
};
|
|
16
|
+
/** Set once the flow has checked out; drives the success screen. */
|
|
17
|
+
export declare const CheckoutResultProvider: ({ initialValue, children, }: {
|
|
18
|
+
initialValue?: unknown;
|
|
19
|
+
children?: import("react").ReactNode;
|
|
20
|
+
}) => import("react").JSX.Element, useCheckoutResult: () => [CheckoutResult | null, import("react").Dispatch<import("react").SetStateAction<CheckoutResult | null>>];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the quote PDF under the summary needs: which quote, whether it has a document template, and
|
|
3
|
+
* what changes when the quote does (so the PDF is fetched again after a coupon is applied).
|
|
4
|
+
*/
|
|
5
|
+
export declare const CheckoutQuoteDocument_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
6
|
+
id: string | null;
|
|
7
|
+
documentTemplateId: string | null;
|
|
8
|
+
updatedAt: unknown;
|
|
9
|
+
amount: number;
|
|
10
|
+
}, {}, {
|
|
11
|
+
fragment: "CheckoutQuoteDocument_QuoteFragment";
|
|
12
|
+
on: "Quote";
|
|
13
|
+
masked: true;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** The checked-out quote as the receipt shows it: line items and the API's totals. */
|
|
2
|
+
export declare const CheckoutReceipt_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
3
|
+
[$tada.fragmentRefs]: {
|
|
4
|
+
CheckoutSummaryLineItems_QuoteFragment: "Quote";
|
|
5
|
+
};
|
|
6
|
+
subtotal: number;
|
|
7
|
+
taxAmount: number;
|
|
8
|
+
amountDue: number | null;
|
|
9
|
+
currencyId: string;
|
|
10
|
+
invoiceUntil: unknown;
|
|
11
|
+
quoteChanges: {
|
|
12
|
+
id: string | null;
|
|
13
|
+
isTrial: boolean;
|
|
14
|
+
trialEndDate: unknown;
|
|
15
|
+
charges: {
|
|
16
|
+
id: string | null;
|
|
17
|
+
subtotal: number | null;
|
|
18
|
+
coupon: {
|
|
19
|
+
couponCode: string;
|
|
20
|
+
} | null;
|
|
21
|
+
}[];
|
|
22
|
+
}[] | null;
|
|
23
|
+
invoices: {
|
|
24
|
+
id: string | null;
|
|
25
|
+
amount: number;
|
|
26
|
+
}[] | null;
|
|
27
|
+
}, {}, {
|
|
28
|
+
fragment: "CheckoutReceipt_QuoteFragment";
|
|
29
|
+
on: "Quote";
|
|
30
|
+
masked: true;
|
|
31
|
+
}>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** The checked-out quote, as the receipt, its quote PDF and the success panel need it. */
|
|
2
|
+
export declare const CheckoutResult_QuoteFragment: import("gql.tada").TadaDocumentNode<{
|
|
3
|
+
[$tada.fragmentRefs]: {
|
|
4
|
+
CheckoutReceipt_QuoteFragment: "Quote";
|
|
5
|
+
} & {
|
|
6
|
+
SuccessDisplay_QuoteFragment: "Quote";
|
|
7
|
+
} & {
|
|
8
|
+
CheckoutQuoteDocument_QuoteFragment: "Quote";
|
|
9
|
+
};
|
|
10
|
+
id: string | null;
|
|
11
|
+
}, {}, {
|
|
12
|
+
fragment: "CheckoutResult_QuoteFragment";
|
|
13
|
+
on: "Quote";
|
|
14
|
+
masked: true;
|
|
15
|
+
}>;
|