@bunnyapp/components 1.8.2 → 1.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/README.md +51 -0
  2. package/dist/cjs/index.js +151 -30957
  3. package/dist/cjs/types/src/components/BillingDetails/BillingDetails.d.ts +2 -5
  4. package/dist/cjs/types/src/components/BillingDetails/BillingDetails.stories.d.ts +2 -4
  5. package/dist/cjs/types/src/components/BunnyProvider/BunnyProvider.d.ts +2 -1
  6. package/dist/cjs/types/src/components/BunnyProvider/contexts/BunnyProviderCallbacksProvider.d.ts +2 -0
  7. package/dist/cjs/types/src/components/Invoice/Invoice.stories.d.ts +1 -1
  8. package/dist/cjs/types/src/components/PaymentForm/PaymentForm.d.ts +4 -6
  9. package/dist/cjs/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Collapsible.d.ts +7 -0
  10. package/dist/cjs/types/src/components/PaymentForm/constants.d.ts +1 -0
  11. package/dist/cjs/types/src/components/PaymentForm/context/CallbacksContext.d.ts +1 -1
  12. package/dist/cjs/types/src/components/Quote/Quote.stories.d.ts +1 -1
  13. package/dist/cjs/types/src/components/Quote/components/QuoteButtons.d.ts +5 -0
  14. package/dist/cjs/types/src/components/Quotes/Quotes.stories.d.ts +1 -1
  15. package/dist/cjs/types/src/components/Signup/Signup.d.ts +4 -9
  16. package/dist/cjs/types/src/components/Signup/Signup.stories.d.ts +1 -2
  17. package/dist/cjs/types/src/components/Signup/SignupContent.d.ts +1 -1
  18. package/dist/cjs/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_QuoteFragment.d.ts +0 -2
  19. package/dist/cjs/types/src/components/Signup/components/LoadingOverlay.d.ts +4 -0
  20. package/dist/cjs/types/src/components/Signup/components/PriceListDisplay.d.ts +11 -1
  21. package/dist/cjs/types/src/components/Signup/components/QuoteCreateButton.d.ts +1 -4
  22. package/dist/cjs/types/src/components/Signup/consts.d.ts +1 -0
  23. package/dist/cjs/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +0 -1
  24. package/dist/cjs/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +3 -2
  25. package/dist/cjs/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +1 -10
  26. package/dist/cjs/types/src/components/Signup/hooks/useQuoteAccountSignupMutation.d.ts +1 -4
  27. package/dist/cjs/types/src/components/Signup/hooks/useSignupQuoteQueryData.d.ts +8 -1
  28. package/dist/cjs/types/src/components/Signup/queries/getSignupQuote.d.ts +10 -0
  29. package/dist/cjs/types/src/components/Signup/signup-quote/SignupQuote.d.ts +1 -1
  30. package/dist/cjs/types/src/components/Subscriptions/Subscriptions.stories.d.ts +1 -1
  31. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/GridTemplateColumnsWrapper.d.ts +2 -1
  32. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/PlanFeatures.d.ts +8 -0
  33. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/components/FeatureGroup.d.ts +9 -0
  34. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/components/FeatureTitle.d.ts +6 -0
  35. package/dist/cjs/types/src/components/Subscriptions/Upgrade/Upgrade.stories.d.ts +12 -0
  36. package/dist/cjs/types/src/components/Subscriptions/fragments/Subscriptions_SubscriptionFragment.d.ts +0 -2
  37. package/dist/cjs/types/src/components/Subscriptions/queries/getSubscriptionChargeHistograms.d.ts +16 -0
  38. package/dist/cjs/types/src/components/Subscriptions/queries/getSubscriptions.d.ts +0 -184
  39. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeUnitPrice.d.ts +3 -0
  40. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/SubscriptionListSkeleton.d.ts +4 -0
  41. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktopRow.d.ts +2 -10
  42. package/dist/cjs/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/UsageCell.d.ts +8 -0
  43. package/dist/cjs/types/src/components/Transactions/Transactions.stories.d.ts +1 -1
  44. package/dist/cjs/types/src/hooks/useAllErrorFormats.d.ts +2 -1
  45. package/dist/cjs/types/src/hooks/useIsExpired.d.ts +2 -1
  46. package/dist/cjs/types/src/hooks/useIsVisible.d.ts +4 -0
  47. package/dist/cjs/types/src/utils/QueryKeyFactory.d.ts +9 -1
  48. package/dist/esm/index.js +151 -30944
  49. package/dist/esm/types/src/components/BillingDetails/BillingDetails.d.ts +2 -5
  50. package/dist/esm/types/src/components/BillingDetails/BillingDetails.stories.d.ts +2 -4
  51. package/dist/esm/types/src/components/BunnyProvider/BunnyProvider.d.ts +2 -1
  52. package/dist/esm/types/src/components/BunnyProvider/contexts/BunnyProviderCallbacksProvider.d.ts +2 -0
  53. package/dist/esm/types/src/components/Invoice/Invoice.stories.d.ts +1 -1
  54. package/dist/esm/types/src/components/PaymentForm/PaymentForm.d.ts +4 -6
  55. package/dist/esm/types/src/components/PaymentForm/components/PaymentMethodDetails/components/Collapsible.d.ts +7 -0
  56. package/dist/esm/types/src/components/PaymentForm/constants.d.ts +1 -0
  57. package/dist/esm/types/src/components/PaymentForm/context/CallbacksContext.d.ts +1 -1
  58. package/dist/esm/types/src/components/Quote/Quote.stories.d.ts +1 -1
  59. package/dist/esm/types/src/components/Quote/components/QuoteButtons.d.ts +5 -0
  60. package/dist/esm/types/src/components/Quotes/Quotes.stories.d.ts +1 -1
  61. package/dist/esm/types/src/components/Signup/Signup.d.ts +4 -9
  62. package/dist/esm/types/src/components/Signup/Signup.stories.d.ts +1 -2
  63. package/dist/esm/types/src/components/Signup/SignupContent.d.ts +1 -1
  64. package/dist/esm/types/src/components/Signup/components/CheckoutSummary/fragments/CheckoutSummary_QuoteFragment.d.ts +0 -2
  65. package/dist/esm/types/src/components/Signup/components/LoadingOverlay.d.ts +4 -0
  66. package/dist/esm/types/src/components/Signup/components/PriceListDisplay.d.ts +11 -1
  67. package/dist/esm/types/src/components/Signup/components/QuoteCreateButton.d.ts +1 -4
  68. package/dist/esm/types/src/components/Signup/consts.d.ts +1 -0
  69. package/dist/esm/types/src/components/Signup/fragments/Signup_PriceListFragment.d.ts +0 -1
  70. package/dist/esm/types/src/components/Signup/fragments/Signup_QuoteFragment.d.ts +3 -2
  71. package/dist/esm/types/src/components/Signup/hooks/useApplyDefaultCoupon.d.ts +1 -10
  72. package/dist/esm/types/src/components/Signup/hooks/useQuoteAccountSignupMutation.d.ts +1 -4
  73. package/dist/esm/types/src/components/Signup/hooks/useSignupQuoteQueryData.d.ts +8 -1
  74. package/dist/esm/types/src/components/Signup/queries/getSignupQuote.d.ts +10 -0
  75. package/dist/esm/types/src/components/Signup/signup-quote/SignupQuote.d.ts +1 -1
  76. package/dist/esm/types/src/components/Subscriptions/Subscriptions.stories.d.ts +1 -1
  77. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/GridTemplateColumnsWrapper.d.ts +2 -1
  78. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/PlanFeatures.d.ts +8 -0
  79. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/components/FeatureGroup.d.ts +9 -0
  80. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/components/FeatureTitle.d.ts +6 -0
  81. package/dist/esm/types/src/components/Subscriptions/Upgrade/Upgrade.stories.d.ts +12 -0
  82. package/dist/esm/types/src/components/Subscriptions/fragments/Subscriptions_SubscriptionFragment.d.ts +0 -2
  83. package/dist/esm/types/src/components/Subscriptions/queries/getSubscriptionChargeHistograms.d.ts +16 -0
  84. package/dist/esm/types/src/components/Subscriptions/queries/getSubscriptions.d.ts +0 -184
  85. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionChargeUnitPrice.d.ts +3 -0
  86. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/SubscriptionListSkeleton.d.ts +4 -0
  87. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/SubscriptionCardDesktopRow.d.ts +2 -10
  88. package/dist/esm/types/src/components/Subscriptions/subscriptionsList/subscriptionCardDesktop/UsageCell.d.ts +8 -0
  89. package/dist/esm/types/src/components/Transactions/Transactions.stories.d.ts +1 -1
  90. package/dist/esm/types/src/hooks/useAllErrorFormats.d.ts +2 -1
  91. package/dist/esm/types/src/hooks/useIsExpired.d.ts +2 -1
  92. package/dist/esm/types/src/hooks/useIsVisible.d.ts +4 -0
  93. package/dist/esm/types/src/utils/QueryKeyFactory.d.ts +9 -1
  94. package/dist/index.d.ts +12 -19
  95. package/package.json +19 -15
  96. package/dist/cjs/types/src/components/Signup/fragments/useApplyDefaultCoupon_QuoteFragment.d.ts +0 -9
  97. package/dist/cjs/types/src/components/Signup/hooks/useQuoteAccountSignupOnExit.d.ts +0 -46
  98. package/dist/esm/types/src/components/Signup/fragments/useApplyDefaultCoupon_QuoteFragment.d.ts +0 -9
  99. package/dist/esm/types/src/components/Signup/hooks/useQuoteAccountSignupOnExit.d.ts +0 -46
@@ -1,16 +1,13 @@
1
1
  import '../../styles/index.less';
2
- import { ShadowType } from '../../types/shadowType';
3
- declare const BillingDetails: ({ className, countryListFilter, hideBillingDetailsForm, hidePaymentMethodForm, isCardEnabled, isUpgradeFromTrial, shadow, onSavePaymentMethod, onPaymentMethodRemoved, }: {
4
- className?: string;
2
+ declare const BillingDetails: ({ countryListFilter, hideBillingDetailsForm, hidePaymentMethodForm, isUpgradeFromTrial, style, onSavePaymentMethod, onPaymentMethodRemoved, }: {
5
3
  countryListFilter?: (country: {
6
4
  value: string;
7
5
  label: string;
8
6
  }) => boolean;
9
7
  hideBillingDetailsForm?: boolean;
10
8
  hidePaymentMethodForm?: boolean;
11
- isCardEnabled?: boolean;
12
9
  isUpgradeFromTrial?: boolean;
13
- shadow?: ShadowType;
10
+ style?: React.CSSProperties;
14
11
  onSavePaymentMethod?: (paymentMethodId: string) => void;
15
12
  onPaymentMethodRemoved?: (paymentMethodId: string) => void;
16
13
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,14 +1,12 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
1
+ import type { Meta, StoryObj } from "@storybook/react-vite";
2
2
  import BillingDetails from "./BillingDetails";
3
3
  declare const meta: Meta<typeof BillingDetails>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Default: Story;
7
- export declare const NoShadow: Story;
8
- export declare const CustomClassName: Story;
9
- export declare const NoCard: Story;
10
7
  export declare const Mobile: Story;
11
8
  export declare const DarkMode: Story;
12
9
  export declare const HidePaymentMethodForm: Story;
13
10
  export declare const HideBillingDetailsForm: Story;
14
11
  export declare const HideBothForms: Story;
12
+ export declare const PrideTheme: Story;
@@ -7,7 +7,7 @@ export type BunnyContextValues = {
7
7
  onTokenExpired?: () => void;
8
8
  };
9
9
  export declare const BunnyContext: import("react").Context<BunnyContextValues>;
10
- declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token, onTokenExpired, onUserUnavailable, onInvalidOrMissingAuthorization, suppressUserUnavailableErrorNotification, configProviderProps, }: {
10
+ declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token, onTokenExpired, onUserUnavailable, onInvalidOrMissingAuthorization, suppressUserUnavailableErrorNotification, disableErrorNotifications, configProviderProps, }: {
11
11
  children: React.ReactNode;
12
12
  darkMode?: boolean;
13
13
  queryClient?: QueryClient;
@@ -17,6 +17,7 @@ declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token
17
17
  onUserUnavailable?: () => void;
18
18
  onInvalidOrMissingAuthorization?: () => void;
19
19
  suppressUserUnavailableErrorNotification?: boolean;
20
+ disableErrorNotifications?: boolean;
20
21
  configProviderProps?: ThemeConfig | undefined;
21
22
  }): import("react/jsx-runtime").JSX.Element;
22
23
  export default BunnyProvider;
@@ -3,11 +3,13 @@ declare const BunnyProviderCallbacksProvider: ({ value, children }: {
3
3
  onUserUnavailable?: () => void;
4
4
  onInvalidOrMissingAuthorization?: () => void;
5
5
  suppressUserUnavailableErrorNotification?: boolean;
6
+ disableErrorNotifications?: boolean;
6
7
  };
7
8
  children?: import("react").ReactNode;
8
9
  }) => import("react/jsx-runtime").JSX.Element, useBunnyProviderCallbacks: () => {
9
10
  onUserUnavailable?: () => void;
10
11
  onInvalidOrMissingAuthorization?: () => void;
11
12
  suppressUserUnavailableErrorNotification?: boolean;
13
+ disableErrorNotifications?: boolean;
12
14
  };
13
15
  export { BunnyProviderCallbacksProvider, useBunnyProviderCallbacks };
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import Invoice from './Invoice';
3
3
  declare const meta: Meta<typeof Invoice>;
4
4
  export default meta;
@@ -19,7 +19,7 @@ export declare const PaymentForm_InvoiceFragment: import("gql.tada").TadaDocumen
19
19
  on: "Invoice";
20
20
  masked: true;
21
21
  }>;
22
- declare function PaymentFormRoot({ currencyId: accountCurrencyId, invoice: maskedInvoice, quote: maskedQuote, paymentHold, onPaymentSuccess, onPaymentHoldSuccess, paymentHoldPrecondition, accountId, onSavePaymentMethod, onPaymentMethodRemoved, onSetDefaultPaymentMethod, customCheckoutFunction, children, }: {
22
+ declare function PaymentFormRoot({ currencyId: accountCurrencyId, invoice: maskedInvoice, quote: maskedQuote, paymentHold, onPaymentSuccess, onPaymentHoldSuccess, checkoutPrecondition, accountId, onSavePaymentMethod, onPaymentMethodRemoved, onSetDefaultPaymentMethod, customCheckoutFunction, children, }: {
23
23
  currencyId?: string;
24
24
  invoice?: FragmentOf<typeof PaymentForm_InvoiceFragment>;
25
25
  quote?: FragmentOf<typeof PaymentForm_QuoteFragment>;
@@ -29,17 +29,15 @@ declare function PaymentFormRoot({ currencyId: accountCurrencyId, invoice: maske
29
29
  };
30
30
  onPaymentSuccess?: (response: any) => void;
31
31
  onPaymentHoldSuccess?: (response: any) => void;
32
- /**
33
- * If provided, the payment hold will only go through if this condition returns true.
34
- */
35
- paymentHoldPrecondition?: () => boolean | Promise<boolean>;
32
+ /** Precondition that must pass before checking out free/trial/paid/payment-hold quotes. */
33
+ checkoutPrecondition?: () => boolean | Promise<boolean>;
36
34
  onSavePaymentMethod?: (response: any) => void;
37
35
  onPaymentMethodRemoved?: (paymentMethod: PaymentMethodFragment) => void;
38
36
  onSetDefaultPaymentMethod?: () => void;
39
37
  accountId?: string;
40
38
  customCheckoutFunction?: (pluginId: string, paymentMethodId: string) => Promise<any>;
41
39
  children?: ReactNode | ((state: PaymentFormRenderState) => ReactNode);
42
- }): import("react/jsx-runtime").JSX.Element;
40
+ }): import("react/jsx-runtime").JSX.Element | null;
43
41
  type PaymentFormProps = ComponentProps<typeof PaymentFormRoot>;
44
42
  export type PaymentFormRenderState = {
45
43
  hasPaymentMethods: boolean;
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ type CollapsibleProps = {
3
+ open: boolean;
4
+ children: ReactNode;
5
+ };
6
+ export declare function Collapsible({ open, children }: CollapsibleProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1 @@
1
+ export declare const PAYMENT_FORM_GAP = "bunny-gap-2";
@@ -5,7 +5,7 @@ export type PaymentCallbacksContextValue = {
5
5
  onPaymentMethodRemoved: ((paymentMethod: PaymentMethodFragment) => void) | undefined;
6
6
  onSavePaymentMethod: ((response: any) => void) | undefined;
7
7
  onPaymentHoldSuccess: ((response: any) => void) | undefined;
8
- paymentHoldPrecondition: (() => boolean | Promise<boolean>) | undefined;
8
+ checkoutPrecondition: (() => boolean | Promise<boolean>) | undefined;
9
9
  };
10
10
  declare const PaymentFormCallbacksProvider: ({ value, children }: {
11
11
  value: PaymentCallbacksContextValue;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import Quote from './Quote';
3
3
  declare const meta: Meta<typeof Quote>;
4
4
  export default meta;
@@ -6,6 +6,11 @@ export declare const QuoteButtons_FormattedQuoteFragment: import("gql.tada").Tad
6
6
  amount: number;
7
7
  expiresAt: unknown;
8
8
  state: "APPROVED" | "REJECTED" | "DRAFT" | "SHARED" | "VIEWED" | "ACCEPTED" | "IN_APPROVAL" | "UNDONE";
9
+ quote: {
10
+ entity: {
11
+ tzIdentifier: string | null;
12
+ };
13
+ };
9
14
  }, {}, {
10
15
  fragment: "QuoteButtons_FormattedQuoteFragment";
11
16
  on: "FormattedQuote";
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import Quotes from './Quotes';
3
3
  declare const meta: Meta<typeof Quotes>;
4
4
  export default meta;
@@ -1,16 +1,9 @@
1
1
  import type { FormInstance } from "antd/es/form";
2
- import { ShadowType } from '../../types/shadowType';
3
2
  import { type DefaultSignupValues, InitialSignupFormData, type RequiredBillingDetailsFlags } from "./components/InitialSignupFormFields";
4
3
  export type SignupProps = {
5
4
  priceListCode: string;
6
5
  /** If trial is allowed on priceList, enableTrial will enable the trial for the signup */
7
6
  enableTrial?: boolean;
8
- /** The URL to redirect to after the signup is complete */
9
- returnUrl?: string;
10
- /** A custom class name to apply to the component */
11
- className?: string;
12
- /** The shadow level to apply to the component */
13
- shadow?: ShadowType;
14
7
  /** A custom style to apply to the component */
15
8
  style?: React.CSSProperties;
16
9
  /** The default form values to use for the signup */
@@ -19,8 +12,10 @@ export type SignupProps = {
19
12
  paymentRequiredToAcceptQuote?: boolean;
20
13
  /** The document template ID to apply to the quote for the signup */
21
14
  documentTemplateId?: string;
22
- /** Which account billing fields to show and require. Omit for legacy behavior (country required only). */
15
+ /** Which account billing fields to show and require */
23
16
  requiredBillingDetails?: RequiredBillingDetailsFlags;
17
+ /** A default coupon code to pre-apply to the checkout */
18
+ defaultCouponCode?: string;
24
19
  };
25
20
  declare const useSignupPortalSessionToken: () => [string | undefined, import("react").Dispatch<import("react").SetStateAction<string | undefined>>];
26
21
  declare const useSignupAccountId: () => [string | undefined, import("react").Dispatch<import("react").SetStateAction<string | undefined>>];
@@ -30,5 +25,5 @@ declare const useSignupOptions: () => {
30
25
  enableTrial: boolean;
31
26
  paymentRequiredToAcceptQuote?: boolean;
32
27
  };
33
- export default function Signup({ priceListCode, enableTrial, returnUrl, className, shadow, style, defaultFormValues, paymentRequiredToAcceptQuote, documentTemplateId, requiredBillingDetails, }: SignupProps): import("react/jsx-runtime").JSX.Element;
28
+ export default function Signup({ priceListCode, enableTrial, style, defaultFormValues, paymentRequiredToAcceptQuote, documentTemplateId, requiredBillingDetails, defaultCouponCode, }: SignupProps): import("react/jsx-runtime").JSX.Element;
34
29
  export { useSignupAccountId, useSignupForm, useSignupOptions, useSignupPortalSessionToken, useSignupPurchaseSucceeded };
@@ -1,9 +1,8 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import Signup from './Signup';
3
3
  declare const meta: Meta<typeof Signup>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Default: Story;
7
7
  export declare const Mobile: Story;
8
- export declare const CustomClassName: Story;
9
8
  export declare const DarkMode: Story;
@@ -1,2 +1,2 @@
1
1
  import type { SignupProps } from './Signup';
2
- export declare function SignupContent({ priceListCode, defaultFormValues, documentTemplateId, requiredBillingDetails, returnUrl: returnUrlProp, }: SignupProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function SignupContent({ priceListCode, defaultFormValues, documentTemplateId, requiredBillingDetails, style, defaultCouponCode, }: SignupProps): import("react/jsx-runtime").JSX.Element;
@@ -21,8 +21,6 @@ export declare const CheckoutSummary_QuoteFragment: import("gql.tada").TadaDocum
21
21
  }[];
22
22
  }[] | null;
23
23
  [$tada.fragmentRefs]: {
24
- useApplyDefaultCoupon_QuoteFragment: "Quote";
25
- } & {
26
24
  canApplyCoupons_QuoteFragment: "Quote";
27
25
  };
28
26
  }, {}, {
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export default function LoadingOverlay({ style }: {
3
+ style?: React.CSSProperties;
4
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -14,6 +14,16 @@ export declare const PriceListDisplay_PriceListFragment: import("gql.tada").Tada
14
14
  on: "PriceList";
15
15
  masked: true;
16
16
  }>;
17
- export default function PriceListDisplay({ priceList: maskedPriceList }: {
17
+ export declare const PriceListDisplay_QuoteFragment: import("gql.tada").TadaDocumentNode<{
18
+ quoteChanges: {
19
+ isTrial: boolean;
20
+ }[] | null;
21
+ }, {}, {
22
+ fragment: "PriceListDisplay_QuoteFragment";
23
+ on: "Quote";
24
+ masked: true;
25
+ }>;
26
+ export default function PriceListDisplay({ priceList: maskedPriceList, quote: maskedQuote, }: {
18
27
  priceList: FragmentOf<typeof PriceListDisplay_PriceListFragment> | undefined | null;
28
+ quote?: FragmentOf<typeof PriceListDisplay_QuoteFragment> | undefined | null;
19
29
  }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,9 +1,6 @@
1
1
  type QuoteCreateButtonProps = {
2
2
  priceListCode: string;
3
- priceList: {
4
- trialAllowed?: boolean;
5
- } | null | undefined;
6
3
  documentTemplateId?: string;
7
4
  };
8
- export default function QuoteCreateButton({ priceListCode, priceList, documentTemplateId, }: QuoteCreateButtonProps): import("react/jsx-runtime").JSX.Element;
5
+ export default function QuoteCreateButton({ priceListCode, documentTemplateId, }: QuoteCreateButtonProps): import("react/jsx-runtime").JSX.Element;
9
6
  export {};
@@ -0,0 +1 @@
1
+ export declare const SIGNUP_BACKGROUND_COLOR = "#f8fafc";
@@ -16,7 +16,6 @@ export declare const Signup_PriceListFragment: import("gql.tada").TadaDocumentNo
16
16
  } | null;
17
17
  code: string | null;
18
18
  currencyId: string;
19
- trialAllowed: boolean;
20
19
  }, {}, {
21
20
  fragment: "Signup_PriceListFragment";
22
21
  on: "PriceList";
@@ -1,7 +1,5 @@
1
1
  export declare const Signup_QuoteFragment: import("gql.tada").TadaDocumentNode<{
2
2
  [$tada.fragmentRefs]: {
3
- useApplyDefaultCoupon_QuoteFragment: "Quote";
4
- } & {
5
3
  CheckoutSummary_QuoteFragment: "Quote";
6
4
  } & {
7
5
  PaymentForm_QuoteFragment: "Quote";
@@ -9,12 +7,15 @@ export declare const Signup_QuoteFragment: import("gql.tada").TadaDocumentNode<{
9
7
  SignupPaymentForm_QuoteFragment: "Quote";
10
8
  } & {
11
9
  SignupQuote_QuoteFragment: "Quote";
10
+ } & {
11
+ PriceListDisplay_QuoteFragment: "Quote";
12
12
  };
13
13
  state: "APPROVED" | "REJECTED" | "DRAFT" | "SHARED" | "VIEWED" | "ACCEPTED" | "IN_APPROVAL" | "UNDONE";
14
14
  id: string | null;
15
15
  accountId: string;
16
16
  currencyId: string;
17
17
  amountDue: number | null;
18
+ amount: number;
18
19
  payToAccept: boolean | null;
19
20
  quoteChanges: {
20
21
  id: string | null;
@@ -1,13 +1,4 @@
1
- import { FragmentOf } from 'gql.tada';
2
- import { useApplyDefaultCoupon_QuoteFragment } from '../fragments/useApplyDefaultCoupon_QuoteFragment';
3
- /**
4
- * Applies a default coupon code once when quoteChangeId is available.
5
- * Uses a ref to ensure coupon code is only applied once.
6
- */
7
- export default function useApplyDefaultCoupon({ couponCode, quoteChangeId, quote: maskedQuote, activeCouponsExist, addCoupon, }: {
1
+ export default function useApplyDefaultCoupon({ couponCode, addCoupon, }: {
8
2
  couponCode: string | undefined;
9
- quoteChangeId: string | undefined;
10
- quote: FragmentOf<typeof useApplyDefaultCoupon_QuoteFragment> | undefined | null;
11
- activeCouponsExist: boolean;
12
3
  addCoupon: (code: string) => void;
13
4
  }): void;
@@ -4,14 +4,11 @@ import { Signup_QuoteFragment } from '../fragments/Signup_QuoteFragment';
4
4
  export type UseQuoteAccountSignupMutationOptions = {
5
5
  priceListCode: string;
6
6
  enableTrial: boolean;
7
- priceList: {
8
- trialAllowed?: boolean;
9
- } | null | undefined;
10
7
  paymentRequiredToAcceptQuote?: boolean;
11
8
  documentTemplateId?: string;
12
9
  onQuoteAccountSignupSuccess: (portalSessionToken: string, accountId: string, quote: FragmentOf<typeof Signup_QuoteFragment> | null) => void;
13
10
  };
14
- export declare function useQuoteAccountSignupMutation({ priceListCode, enableTrial, priceList, paymentRequiredToAcceptQuote, documentTemplateId, onQuoteAccountSignupSuccess, }: UseQuoteAccountSignupMutationOptions): import("@tanstack/react-query").UseMutationResult<{
11
+ export declare function useQuoteAccountSignupMutation({ priceListCode, enableTrial, paymentRequiredToAcceptQuote, documentTemplateId, onQuoteAccountSignupSuccess, }: UseQuoteAccountSignupMutationOptions): import("@tanstack/react-query").UseMutationResult<{
15
12
  account: {
16
13
  id: string;
17
14
  } | null;
@@ -2,4 +2,11 @@ import { ResultOf } from 'gql.tada';
2
2
  import { Signup_QuoteFragment } from '../fragments/Signup_QuoteFragment';
3
3
  export declare const useSignupQuoteQueryData: ({ tokenOverride, }: {
4
4
  tokenOverride?: string;
5
- }) => ResultOf<typeof Signup_QuoteFragment> | undefined;
5
+ }) => {
6
+ data: ResultOf<typeof Signup_QuoteFragment> | undefined;
7
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<{
8
+ [$tada.fragmentRefs]: {
9
+ Signup_QuoteFragment: "Quote";
10
+ };
11
+ } | undefined, Error>>;
12
+ };
@@ -0,0 +1,10 @@
1
+ declare const getSignupQuote: ({ id, token, apiHost, }: {
2
+ id: string;
3
+ token?: string;
4
+ apiHost: string;
5
+ }) => Promise<{
6
+ [$tada.fragmentRefs]: {
7
+ Signup_QuoteFragment: "Quote";
8
+ };
9
+ } | null>;
10
+ export default getSignupQuote;
@@ -1,2 +1,2 @@
1
- declare const SignupQuote: () => import("react/jsx-runtime").JSX.Element | null;
1
+ declare const SignupQuote: () => import("react/jsx-runtime").JSX.Element;
2
2
  export default SignupQuote;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import Subscriptions from './Subscriptions';
3
3
  declare const meta: Meta<typeof Subscriptions>;
4
4
  export default meta;
@@ -1,7 +1,8 @@
1
- export declare function GridTemplateColumnsWrapper({ children, className, everythingInPlus, plansToDisplay, }: {
1
+ export declare function GridTemplateColumnsWrapper({ children, className, everythingInPlus, plansToDisplay, style, }: {
2
2
  children: React.ReactNode;
3
3
  className?: string;
4
4
  everythingInPlus: boolean;
5
5
  plansToDisplay: number;
6
+ style?: React.CSSProperties;
6
7
  }): import("react/jsx-runtime").JSX.Element;
7
8
  export default GridTemplateColumnsWrapper;
@@ -0,0 +1,8 @@
1
+ import Feature from '@/types/Feature';
2
+ import PriceList from '@/types/PriceList';
3
+ export declare const PlanFeatures: ({ displayPriceLists, features, plansToDisplay, }: {
4
+ displayPriceLists: PriceList[];
5
+ plansToDisplay: number;
6
+ features?: Feature[];
7
+ }) => import("react/jsx-runtime").JSX.Element;
8
+ export default PlanFeatures;
@@ -0,0 +1,9 @@
1
+ import Feature from '@/types/Feature';
2
+ import PriceList from '@/types/PriceList';
3
+ declare const FeatureGroup: ({ features, displayPriceLists, plansToDisplay, groupIndex, }: {
4
+ features: Feature[];
5
+ displayPriceLists: PriceList[];
6
+ plansToDisplay: number;
7
+ groupIndex: number;
8
+ }) => import("react/jsx-runtime").JSX.Element;
9
+ export default FeatureGroup;
@@ -0,0 +1,6 @@
1
+ import Feature from '@/types/Feature';
2
+ declare const FeatureTitle: ({ isFeatureGroup, feature, }: {
3
+ isFeatureGroup: boolean;
4
+ feature: Feature;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ export default FeatureTitle;
@@ -0,0 +1,12 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import Upgrade from './Upgrade';
3
+ declare const meta: Meta<typeof Upgrade>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const Mobile: Story;
8
+ export declare const DarkMode: Story;
9
+ export declare const NoShadow: Story;
10
+ export declare const CustomClassName: Story;
11
+ export declare const DefaultBillingPeriodAnnual: Story;
12
+ export declare const PrideTheme: Story;
@@ -2,8 +2,6 @@ export declare const Subscriptions_SubscriptionFragment: import("gql.tada").Tada
2
2
  state: "ACTIVE" | "TRIAL" | "CANCELED" | "EXPIRED" | "TRIAL_EXPIRED" | "PENDING";
3
3
  id: string;
4
4
  [$tada.fragmentRefs]: {
5
- UpgradingSubscriptionContext_SubscriptionFragment: "Subscription";
6
- } & {
7
5
  SubscriptionsListContainer_SubscriptionFragment: "Subscription";
8
6
  } & {
9
7
  CanShowQuantitiesInput_SubscriptionFragment: "Subscription";
@@ -0,0 +1,16 @@
1
+ export declare const getSubscriptionChargeHistograms: ({ id, apiHost, token, }: {
2
+ id: string;
3
+ apiHost: string;
4
+ token?: string;
5
+ }) => Promise<{
6
+ subscription: {
7
+ chargeReport: {
8
+ priceListChargeId: string | null;
9
+ histogram: {
10
+ [$tada.fragmentRefs]: {
11
+ FeatureUsageGraph_HistogramFragment: "Histogram";
12
+ };
13
+ } | null;
14
+ }[] | null;
15
+ } | null;
16
+ }>;
@@ -5,190 +5,6 @@ export declare const getSubscriptions: ({ apiHost, isInPreviewMode, token, }: {
5
5
  }) => Promise<{
6
6
  subscriptions: {
7
7
  nodes: ({
8
- addonSubscriptions: {
9
- id: string;
10
- priceList: {
11
- id: string;
12
- } | null;
13
- plan: {
14
- id: string;
15
- } | null;
16
- }[] | null;
17
- cancellationDate: unknown;
18
- currencyId: string;
19
- endDate: unknown;
20
- evergreen: boolean;
21
- id: string;
22
- period: string;
23
- account: {
24
- id: string;
25
- };
26
- daysLeftInTrial: number | null;
27
- plan: {
28
- id: string;
29
- name: string;
30
- selfServiceBuy: boolean | null;
31
- selfServiceCancel: boolean | null;
32
- selfServiceRenew: boolean | null;
33
- } | null;
34
- priceList: {
35
- id: string;
36
- periodMonths: number | null;
37
- name: string;
38
- plan: {
39
- id: string;
40
- addon: boolean | null;
41
- addonPlans: {
42
- id: string;
43
- }[] | null;
44
- } | null;
45
- } | null;
46
- product: {
47
- id: string;
48
- name: string;
49
- showProductNameOnLineItem: boolean | null;
50
- } | null;
51
- startDate: unknown;
52
- trialEndDate: unknown;
53
- trialPeriod: string;
54
- trialStartDate: unknown;
55
- trialExpirationAction: "ACTIVATE" | "CANCEL" | null;
56
- charges: {
57
- priceListCharge: {
58
- priceListChargeTiers: {
59
- price: number | null;
60
- starts: number | null;
61
- }[] | null;
62
- featureAddon: boolean | null;
63
- id: string;
64
- } | null;
65
- amount: number | null;
66
- billingPeriod: "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL" | "ONCE" | null;
67
- chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
68
- discount: number | null;
69
- discountedPrice: string | null;
70
- endDate: unknown;
71
- expired: boolean;
72
- feature: {
73
- name: string;
74
- } | null;
75
- id: string | null;
76
- isAmendment: boolean;
77
- isRamp: boolean;
78
- kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "PERCENTAGE_DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
79
- name: string | null;
80
- periodPrice: number | null;
81
- price: string | null;
82
- priceDecimals: number | null;
83
- priceListChargeId: string | null;
84
- priceTiers: {
85
- starts: number | null;
86
- price: number | null;
87
- }[] | null;
88
- pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
89
- quantity: number | null;
90
- selfServiceQuantity: boolean | null;
91
- startDate: unknown;
92
- trial: boolean;
93
- }[] | null;
94
- chargeReport: {
95
- [$tada.fragmentRefs]: {
96
- CanShowQuantitiesInput_SubscriptionChargeFragment: "Undefined Fragment";
97
- };
98
- priceListCharge: {
99
- priceListChargeTiers: {
100
- price: number | null;
101
- starts: number | null;
102
- }[] | null;
103
- featureAddon: boolean | null;
104
- id: string;
105
- code: string | null;
106
- } | null;
107
- histogram: {
108
- feature: {
109
- id: string;
110
- name: string;
111
- };
112
- periodRange: string;
113
- dataInterval: "MONTHLY" | "QUARTERLY" | "DAILY" | "SEMIANNUALLY" | "YEARLY";
114
- data: {
115
- periodStart: unknown;
116
- periodEnd: unknown;
117
- intervals: {
118
- intervalStart: unknown;
119
- intervalUsage: number;
120
- }[];
121
- intervalsTotal: number;
122
- }[] | null;
123
- } | null;
124
- amount: number | null;
125
- billingPeriod: "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL" | "ONCE" | null;
126
- chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
127
- discount: number | null;
128
- discountedPrice: string | null;
129
- endDate: unknown;
130
- expired: boolean;
131
- feature: {
132
- name: string;
133
- } | null;
134
- id: string | null;
135
- isAmendment: boolean;
136
- isRamp: boolean;
137
- kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "PERCENTAGE_DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
138
- name: string | null;
139
- periodPrice: number | null;
140
- price: string | null;
141
- priceDecimals: number | null;
142
- priceListChargeId: string | null;
143
- priceTiers: {
144
- starts: number | null;
145
- price: number | null;
146
- }[] | null;
147
- pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
148
- quantity: number | null;
149
- selfServiceQuantity: boolean | null;
150
- startDate: unknown;
151
- trial: boolean;
152
- }[] | null;
153
- currentCharges: {
154
- priceListCharge: {
155
- priceListChargeTiers: {
156
- price: number | null;
157
- starts: number | null;
158
- }[] | null;
159
- featureAddon: boolean | null;
160
- id: string;
161
- code: string | null;
162
- } | null;
163
- amount: number | null;
164
- billingPeriod: "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL" | "ONCE" | null;
165
- chargeType: "ONE_TIME" | "RECURRING" | "USAGE" | null;
166
- discount: number | null;
167
- discountedPrice: string | null;
168
- endDate: unknown;
169
- expired: boolean;
170
- feature: {
171
- name: string;
172
- } | null;
173
- id: string | null;
174
- isAmendment: boolean;
175
- isRamp: boolean;
176
- kind: "SUBSCRIBE" | "UPDATE" | "RENEW" | "REINSTATE" | "UNSUBSCRIBE" | "ADJUSTMENT" | "COUPON" | "DISCOUNT" | "PERCENTAGE_DISCOUNT" | "CREDIT" | "PRICE_UPDATE" | "QUANTITY_UPDATE" | "FREE_PERIOD_DISCOUNT" | "ACTIVATE" | null;
177
- name: string | null;
178
- periodPrice: number | null;
179
- price: string | null;
180
- priceDecimals: number | null;
181
- priceListChargeId: string | null;
182
- priceTiers: {
183
- starts: number | null;
184
- price: number | null;
185
- }[] | null;
186
- pricingModel: "FLAT" | "TIERED" | "VOLUME" | "BANDS" | null;
187
- quantity: number | null;
188
- selfServiceQuantity: boolean | null;
189
- startDate: unknown;
190
- trial: boolean;
191
- }[] | null;
192
8
  [$tada.fragmentRefs]: {
193
9
  Subscriptions_SubscriptionFragment: "Subscription";
194
10
  };