@solvapay/react 2.1.1 → 2.2.0-preview-e3e546693c002c32f128d83bf6c5fe76ac182a79

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.
@@ -1,12 +1,13 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React, { Ref } from 'react';
3
- import { b as Plan, y as Product, r as UseTopupAmountSelectorReturn, x as PurchaseInfo, T as TopupFormProps, c as SaveAutoRechargeResponse, t as AutoRechargeConfig } from '../shared-D0hmT1qU.cjs';
4
- export { D as BootstrapPlanLike, E as CheckoutStep, O as SuccessMeta } from '../shared-D0hmT1qU.cjs';
3
+ import { b as Plan, z as Product, s as UseTopupAmountSelectorReturn, y as PurchaseInfo, T as TopupFormProps, c as SaveAutoRechargeResponse, u as AutoRechargeConfig } from '../useUsage-CTgRBvFK.cjs';
4
+ export { B as BootstrapPlanLike, E as CheckoutStep, O as SuccessMeta } from '../useUsage-CTgRBvFK.cjs';
5
5
  import { TaxBreakdown, BusinessDetailsInput } from '@solvapay/core';
6
- import { A as AutoRechargeInputPayload, I as AmountInputUnit, J as AutoRechargeFormState, l as PaywallStructuredContent, U as UsageSnapshot } from '../index-SylJb9Rh.cjs';
7
- export { K as ActivationFlow, L as ActivationFlowActivateButton, N as ActivationFlowActivated, O as ActivationFlowAmountPicker, Q as ActivationFlowContinueButton, R as ActivationFlowError, S as ActivationFlowLoading, T as ActivationFlowRetrying, V as ActivationFlowRoot, m as ActivationFlowStep, W as ActivationFlowSummary, B as BalanceBadge, n as CancelPlanButton, p as CheckoutStatus, q as CheckoutSteps, X as CheckoutStepsAmountContinueButton, Y as CheckoutStepsAmountPicker, Z as CheckoutStepsBackLink, _ as CheckoutStepsIfStep, $ as CheckoutStepsPayment, a0 as CheckoutStepsPlanContinueButton, a1 as CheckoutStepsPlanGrid, a2 as CheckoutStepsRoot, a3 as CheckoutStepsStepHeading, a4 as CheckoutStepsStepMessage, a5 as CheckoutStepsSuccess, M as MandateText, t as MandateTextProps, a6 as PaymentForm, j as PaymentFormBusinessDetails, c as PaymentFormCardElement, a as PaymentFormCustomerFields, h as PaymentFormError, i as PaymentFormLegalFooter, g as PaymentFormLoading, d as PaymentFormMandateText, b as PaymentFormPaymentElement, a7 as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, k as PaymentFormTaxSummary, e as PaymentFormTermsCheckbox, u as PlanBadge, v as ProductBadge, w as PurchaseGate, a8 as PurchaseGateAllowed, a9 as PurchaseGateBlocked, aa as PurchaseGateError, ab as PurchaseGateLoading, ac as PurchaseGateRoot, ad as useActivationFlow, G as useCheckoutStepsContext, ae as usePurchaseGate } from '../index-SylJb9Rh.cjs';
6
+ import { A as AutoRechargeInputPayload, F as AmountInputUnit, G as AutoRechargeFormState, l as PaywallStructuredContent } from '../index-BJGjKUtC.cjs';
7
+ export { H as ActivationFlow, I as ActivationFlowActivateButton, J as ActivationFlowActivated, K as ActivationFlowAmountPicker, L as ActivationFlowContinueButton, N as ActivationFlowError, O as ActivationFlowLoading, Q as ActivationFlowRetrying, R as ActivationFlowRoot, m as ActivationFlowStep, S as ActivationFlowSummary, B as BalanceBadge, n as CancelPlanButton, p as CheckoutStatus, q as CheckoutSteps, T as CheckoutStepsAmountContinueButton, V as CheckoutStepsAmountPicker, W as CheckoutStepsBackLink, X as CheckoutStepsIfStep, Y as CheckoutStepsPayment, Z as CheckoutStepsPlanContinueButton, _ as CheckoutStepsPlanGrid, $ as CheckoutStepsRoot, a0 as CheckoutStepsStepHeading, a1 as CheckoutStepsStepMessage, a2 as CheckoutStepsSuccess, M as MandateText, t as MandateTextProps, a3 as PaymentForm, j as PaymentFormBusinessDetails, c as PaymentFormCardElement, a as PaymentFormCustomerFields, h as PaymentFormError, i as PaymentFormLegalFooter, g as PaymentFormLoading, d as PaymentFormMandateText, b as PaymentFormPaymentElement, a4 as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, k as PaymentFormTaxSummary, e as PaymentFormTermsCheckbox, u as PlanBadge, v as ProductBadge, w as PurchaseGate, a5 as PurchaseGateAllowed, a6 as PurchaseGateBlocked, a7 as PurchaseGateError, a8 as PurchaseGateLoading, a9 as PurchaseGateRoot, aa as useActivationFlow, E as useCheckoutStepsContext, ab as usePurchaseGate } from '../index-BJGjKUtC.cjs';
8
8
  import { PaymentElement } from '@stripe/react-stripe-js';
9
9
  import { Stripe, StripeElements } from '@stripe/stripe-js';
10
+ export { a as UsageMeter, B as UsageMeterBar, b as UsageMeterClassNames, E as UsageMeterEmpty, L as UsageMeterLabel, c as UsageMeterLoading, P as UsageMeterPercentage, R as UsageMeterResetsIn, d as UsageMeterRoot, U as UsageMeterRootProps, u as useUsageMeter } from '../UsageMeter-rga6cyfB.cjs';
10
11
  import '../adapters/auth.cjs';
11
12
 
12
13
  type PlanPricingOption = {
@@ -612,6 +613,12 @@ declare const TopupFormBusinessDetails: {
612
613
  readonly Country: React.ForwardRefExoticComponent<React.SelectHTMLAttributes<HTMLSelectElement> & {
613
614
  asChild?: boolean;
614
615
  } & React.RefAttributes<HTMLSelectElement>>;
616
+ readonly State: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
617
+ asChild?: boolean;
618
+ } & React.RefAttributes<HTMLInputElement>>;
619
+ readonly PostalCode: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
620
+ asChild?: boolean;
621
+ } & React.RefAttributes<HTMLInputElement>>;
615
622
  readonly TaxId: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
616
623
  asChild?: boolean;
617
624
  } & React.RefAttributes<HTMLInputElement>>;
@@ -672,6 +679,12 @@ declare const TopupForm: {
672
679
  readonly Country: React.ForwardRefExoticComponent<React.SelectHTMLAttributes<HTMLSelectElement> & {
673
680
  asChild?: boolean;
674
681
  } & React.RefAttributes<HTMLSelectElement>>;
682
+ readonly State: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
683
+ asChild?: boolean;
684
+ } & React.RefAttributes<HTMLInputElement>>;
685
+ readonly PostalCode: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
686
+ asChild?: boolean;
687
+ } & React.RefAttributes<HTMLInputElement>>;
675
688
  readonly TaxId: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
676
689
  asChild?: boolean;
677
690
  } & React.RefAttributes<HTMLInputElement>>;
@@ -972,7 +985,7 @@ interface PaywallNoticeRootProps extends Omit<React.HTMLAttributes<HTMLDivElemen
972
985
  classNames?: PaywallNoticeClassNames;
973
986
  asChild?: boolean;
974
987
  }
975
- declare const Root$1: React.ForwardRefExoticComponent<PaywallNoticeRootProps & React.RefAttributes<HTMLDivElement>>;
988
+ declare const Root: React.ForwardRefExoticComponent<PaywallNoticeRootProps & React.RefAttributes<HTMLDivElement>>;
976
989
  declare const Heading: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
977
990
  asChild?: boolean;
978
991
  } & React.RefAttributes<HTMLHeadingElement>>;
@@ -1050,74 +1063,4 @@ declare const PaywallNotice: React.ForwardRefExoticComponent<PaywallNoticeRootPr
1050
1063
 
1051
1064
  declare function usePaywallNotice(): PaywallNoticeContextValue;
1052
1065
 
1053
- /**
1054
- * `<UsageMeter>` compound primitive — renders the authenticated customer's
1055
- * usage against their plan quota.
1056
- *
1057
- * Composes `useUsage()` internally so integrators only render the leaf
1058
- * primitives they care about. Leaves render `null` when the active plan
1059
- * isn't usage-based, so dropping the compound into any account page is
1060
- * safe.
1061
- *
1062
- * State:
1063
- * - root / bar `data-state="safe" | "warning" | "critical" | "loading"`
1064
- * - root `data-solvapay-usage-meter`
1065
- * - bar `data-solvapay-usage-meter-bar`
1066
- */
1067
-
1068
- type UsageMeterState = 'safe' | 'warning' | 'critical' | 'loading';
1069
- interface UsageMeterContextValue {
1070
- usage: UsageSnapshot | null;
1071
- loading: boolean;
1072
- error: Error | null;
1073
- percentUsed: number | null;
1074
- isApproachingLimit: boolean;
1075
- isAtLimit: boolean;
1076
- isUnlimited: boolean;
1077
- state: UsageMeterState;
1078
- warningAt: number;
1079
- criticalAt: number;
1080
- }
1081
- interface UsageMeterClassNames {
1082
- root?: string;
1083
- bar?: string;
1084
- label?: string;
1085
- percentage?: string;
1086
- resetsIn?: string;
1087
- loading?: string;
1088
- empty?: string;
1089
- error?: string;
1090
- }
1091
- interface UsageMeterRootProps extends React.HTMLAttributes<HTMLDivElement> {
1092
- /** Percent at which the bar flips to `data-state="warning"`. Default 75. */
1093
- warningAt?: number;
1094
- /** Percent at which the bar flips to `data-state="critical"`. Default 90. */
1095
- criticalAt?: number;
1096
- classNames?: UsageMeterClassNames;
1097
- asChild?: boolean;
1098
- /**
1099
- * Override the usage snapshot rather than reading from `useUsage`.
1100
- * Mostly useful for tests / Storybook demos.
1101
- */
1102
- usageOverride?: UsageSnapshot | null;
1103
- }
1104
- declare const Root: React.ForwardRefExoticComponent<UsageMeterRootProps & React.RefAttributes<HTMLDivElement>>;
1105
- declare const Bar: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
1106
- declare const Label: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
1107
- declare const Percentage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
1108
- declare const ResetsIn: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
1109
- declare const Loading: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
1110
- declare const Empty: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
1111
- declare const UsageMeter: React.ForwardRefExoticComponent<UsageMeterRootProps & React.RefAttributes<HTMLDivElement>> & {
1112
- Root: React.ForwardRefExoticComponent<UsageMeterRootProps & React.RefAttributes<HTMLDivElement>>;
1113
- Bar: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
1114
- Label: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
1115
- Percentage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
1116
- ResetsIn: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
1117
- Loading: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
1118
- Empty: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
1119
- };
1120
-
1121
- declare function useUsageMeter(): UsageMeterContextValue;
1122
-
1123
- export { AmountPicker, AmountPickerConfirm, AmountPickerCustom, AmountPickerOption, AmountPickerRoot, AutoRecharge, AutoRechargeActions, AutoRechargeAmountField, AutoRechargeBody, AutoRechargeCancelButton, AutoRechargeCard, AutoRechargeCardHeading, AutoRechargeCardSetup, AutoRechargeCardSummary, AutoRechargeContent, AutoRechargeDescription, AutoRechargeDisableButton, AutoRechargeEnableQuestion, AutoRechargeEnableRow, AutoRechargeEnableSentence, AutoRechargeEnableSwitch, AutoRechargeError, AutoRechargeFields, AutoRechargeFormState, AutoRechargeHeader, AutoRechargeHint, AutoRechargeInputPayload, AutoRechargeLoading, AutoRechargeMaxMonthlySpendField, AutoRechargeMonthlySpend, AutoRechargeOverlay, AutoRechargeRoot, AutoRechargeSaveButton, AutoRechargeSetup, AutoRechargeStatus, AutoRechargeStatusMessage, AutoRechargeSummary, AutoRechargeThresholdField, AutoRechargeTitle, AutoRechargeTopupField, AutoRechargeTrigger, AutoRechargeUnitToggle, AutoRechargeValidationError, CancelledPlanNotice, CancelledPlanNoticeAccessUntil, CancelledPlanNoticeCancelledOn, CancelledPlanNoticeDaysRemaining, CancelledPlanNoticeExpires, CancelledPlanNoticeHeading, CancelledPlanNoticeReactivateButton, CancelledPlanNoticeReason, CancelledPlanNoticeRoot, CheckoutSummary, CheckoutSummaryPlan, CheckoutSummaryPrice, CheckoutSummaryProduct, CheckoutSummaryRoot, CheckoutSummarySubtotal, CheckoutSummaryTax, CheckoutSummaryTaxNote, CheckoutSummaryTaxTreatmentNote, CheckoutSummaryTotal, CheckoutSummaryTrial, CreditGate, CreditGateError, CreditGateHeading, CreditGateLoading, CreditGateRoot, CreditGateSubheading, CreditGateTopup, LegalFooter, type LegalFooterProps, PaywallNotice, Balance as PaywallNoticeBalance, type PaywallNoticeClassNames, EmbeddedCheckout as PaywallNoticeEmbeddedCheckout, Heading as PaywallNoticeHeading, HostedCheckoutLink as PaywallNoticeHostedCheckoutLink, Message as PaywallNoticeMessage, Plans as PaywallNoticePlans, ProductContext as PaywallNoticeProductContext, Retry as PaywallNoticeRetry, Root$1 as PaywallNoticeRoot, type PaywallNoticeRootProps, PlanSelector, PlanSelectorCard, PlanSelectorCardBadge, PlanSelectorCardCurrency, PlanSelectorCardInterval, PlanSelectorCardName, PlanSelectorCardPrice, PlanSelectorCurrencySwitcher, PlanSelectorError, PlanSelectorGrid, PlanSelectorHeading, PlanSelectorLoading, PlanSelectorRoot, Slot, Slottable, TopupForm, TopupFormBusinessDetails, TopupFormError, TopupFormLegalFooter, TopupFormLoading, TopupFormPaymentElement, TopupFormRoot, TopupFormSubmitButton, TopupFormSummary, UsageMeter, Bar as UsageMeterBar, type UsageMeterClassNames, Empty as UsageMeterEmpty, Label as UsageMeterLabel, Loading as UsageMeterLoading, Percentage as UsageMeterPercentage, ResetsIn as UsageMeterResetsIn, Root as UsageMeterRoot, type UsageMeterRootProps, composeEventHandlers, composeRefs, setRef, useAmountPicker, useAmountPickerCopy, useAutoRechargeForm, useCancelledPlanNotice, useCheckoutSummary, useCreditGate, usePaywallNotice, usePlanSelector, useTopupForm, useUsageMeter };
1066
+ export { AmountPicker, AmountPickerConfirm, AmountPickerCustom, AmountPickerOption, AmountPickerRoot, AutoRecharge, AutoRechargeActions, AutoRechargeAmountField, AutoRechargeBody, AutoRechargeCancelButton, AutoRechargeCard, AutoRechargeCardHeading, AutoRechargeCardSetup, AutoRechargeCardSummary, AutoRechargeContent, AutoRechargeDescription, AutoRechargeDisableButton, AutoRechargeEnableQuestion, AutoRechargeEnableRow, AutoRechargeEnableSentence, AutoRechargeEnableSwitch, AutoRechargeError, AutoRechargeFields, AutoRechargeFormState, AutoRechargeHeader, AutoRechargeHint, AutoRechargeInputPayload, AutoRechargeLoading, AutoRechargeMaxMonthlySpendField, AutoRechargeMonthlySpend, AutoRechargeOverlay, AutoRechargeRoot, AutoRechargeSaveButton, AutoRechargeSetup, AutoRechargeStatus, AutoRechargeStatusMessage, AutoRechargeSummary, AutoRechargeThresholdField, AutoRechargeTitle, AutoRechargeTopupField, AutoRechargeTrigger, AutoRechargeUnitToggle, AutoRechargeValidationError, CancelledPlanNotice, CancelledPlanNoticeAccessUntil, CancelledPlanNoticeCancelledOn, CancelledPlanNoticeDaysRemaining, CancelledPlanNoticeExpires, CancelledPlanNoticeHeading, CancelledPlanNoticeReactivateButton, CancelledPlanNoticeReason, CancelledPlanNoticeRoot, CheckoutSummary, CheckoutSummaryPlan, CheckoutSummaryPrice, CheckoutSummaryProduct, CheckoutSummaryRoot, CheckoutSummarySubtotal, CheckoutSummaryTax, CheckoutSummaryTaxNote, CheckoutSummaryTaxTreatmentNote, CheckoutSummaryTotal, CheckoutSummaryTrial, CreditGate, CreditGateError, CreditGateHeading, CreditGateLoading, CreditGateRoot, CreditGateSubheading, CreditGateTopup, LegalFooter, type LegalFooterProps, PaywallNotice, Balance as PaywallNoticeBalance, type PaywallNoticeClassNames, EmbeddedCheckout as PaywallNoticeEmbeddedCheckout, Heading as PaywallNoticeHeading, HostedCheckoutLink as PaywallNoticeHostedCheckoutLink, Message as PaywallNoticeMessage, Plans as PaywallNoticePlans, ProductContext as PaywallNoticeProductContext, Retry as PaywallNoticeRetry, Root as PaywallNoticeRoot, type PaywallNoticeRootProps, PlanSelector, PlanSelectorCard, PlanSelectorCardBadge, PlanSelectorCardCurrency, PlanSelectorCardInterval, PlanSelectorCardName, PlanSelectorCardPrice, PlanSelectorCurrencySwitcher, PlanSelectorError, PlanSelectorGrid, PlanSelectorHeading, PlanSelectorLoading, PlanSelectorRoot, Slot, Slottable, TopupForm, TopupFormBusinessDetails, TopupFormError, TopupFormLegalFooter, TopupFormLoading, TopupFormPaymentElement, TopupFormRoot, TopupFormSubmitButton, TopupFormSummary, composeEventHandlers, composeRefs, setRef, useAmountPicker, useAmountPickerCopy, useAutoRechargeForm, useCancelledPlanNotice, useCheckoutSummary, useCreditGate, usePaywallNotice, usePlanSelector, useTopupForm };
@@ -1,12 +1,13 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React, { Ref } from 'react';
3
- import { b as Plan, y as Product, r as UseTopupAmountSelectorReturn, x as PurchaseInfo, T as TopupFormProps, c as SaveAutoRechargeResponse, t as AutoRechargeConfig } from '../shared-CUl6mTC1.js';
4
- export { D as BootstrapPlanLike, E as CheckoutStep, O as SuccessMeta } from '../shared-CUl6mTC1.js';
3
+ import { b as Plan, z as Product, s as UseTopupAmountSelectorReturn, y as PurchaseInfo, T as TopupFormProps, c as SaveAutoRechargeResponse, u as AutoRechargeConfig } from '../useUsage-CMqxEF9d.js';
4
+ export { B as BootstrapPlanLike, E as CheckoutStep, O as SuccessMeta } from '../useUsage-CMqxEF9d.js';
5
5
  import { TaxBreakdown, BusinessDetailsInput } from '@solvapay/core';
6
- import { A as AutoRechargeInputPayload, I as AmountInputUnit, J as AutoRechargeFormState, l as PaywallStructuredContent, U as UsageSnapshot } from '../index-CBWGkBqF.js';
7
- export { K as ActivationFlow, L as ActivationFlowActivateButton, N as ActivationFlowActivated, O as ActivationFlowAmountPicker, Q as ActivationFlowContinueButton, R as ActivationFlowError, S as ActivationFlowLoading, T as ActivationFlowRetrying, V as ActivationFlowRoot, m as ActivationFlowStep, W as ActivationFlowSummary, B as BalanceBadge, n as CancelPlanButton, p as CheckoutStatus, q as CheckoutSteps, X as CheckoutStepsAmountContinueButton, Y as CheckoutStepsAmountPicker, Z as CheckoutStepsBackLink, _ as CheckoutStepsIfStep, $ as CheckoutStepsPayment, a0 as CheckoutStepsPlanContinueButton, a1 as CheckoutStepsPlanGrid, a2 as CheckoutStepsRoot, a3 as CheckoutStepsStepHeading, a4 as CheckoutStepsStepMessage, a5 as CheckoutStepsSuccess, M as MandateText, t as MandateTextProps, a6 as PaymentForm, j as PaymentFormBusinessDetails, c as PaymentFormCardElement, a as PaymentFormCustomerFields, h as PaymentFormError, i as PaymentFormLegalFooter, g as PaymentFormLoading, d as PaymentFormMandateText, b as PaymentFormPaymentElement, a7 as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, k as PaymentFormTaxSummary, e as PaymentFormTermsCheckbox, u as PlanBadge, v as ProductBadge, w as PurchaseGate, a8 as PurchaseGateAllowed, a9 as PurchaseGateBlocked, aa as PurchaseGateError, ab as PurchaseGateLoading, ac as PurchaseGateRoot, ad as useActivationFlow, G as useCheckoutStepsContext, ae as usePurchaseGate } from '../index-CBWGkBqF.js';
6
+ import { A as AutoRechargeInputPayload, F as AmountInputUnit, G as AutoRechargeFormState, l as PaywallStructuredContent } from '../index-PsjS_d7V.js';
7
+ export { H as ActivationFlow, I as ActivationFlowActivateButton, J as ActivationFlowActivated, K as ActivationFlowAmountPicker, L as ActivationFlowContinueButton, N as ActivationFlowError, O as ActivationFlowLoading, Q as ActivationFlowRetrying, R as ActivationFlowRoot, m as ActivationFlowStep, S as ActivationFlowSummary, B as BalanceBadge, n as CancelPlanButton, p as CheckoutStatus, q as CheckoutSteps, T as CheckoutStepsAmountContinueButton, V as CheckoutStepsAmountPicker, W as CheckoutStepsBackLink, X as CheckoutStepsIfStep, Y as CheckoutStepsPayment, Z as CheckoutStepsPlanContinueButton, _ as CheckoutStepsPlanGrid, $ as CheckoutStepsRoot, a0 as CheckoutStepsStepHeading, a1 as CheckoutStepsStepMessage, a2 as CheckoutStepsSuccess, M as MandateText, t as MandateTextProps, a3 as PaymentForm, j as PaymentFormBusinessDetails, c as PaymentFormCardElement, a as PaymentFormCustomerFields, h as PaymentFormError, i as PaymentFormLegalFooter, g as PaymentFormLoading, d as PaymentFormMandateText, b as PaymentFormPaymentElement, a4 as PaymentFormRoot, f as PaymentFormSubmitButton, P as PaymentFormSummary, k as PaymentFormTaxSummary, e as PaymentFormTermsCheckbox, u as PlanBadge, v as ProductBadge, w as PurchaseGate, a5 as PurchaseGateAllowed, a6 as PurchaseGateBlocked, a7 as PurchaseGateError, a8 as PurchaseGateLoading, a9 as PurchaseGateRoot, aa as useActivationFlow, E as useCheckoutStepsContext, ab as usePurchaseGate } from '../index-PsjS_d7V.js';
8
8
  import { PaymentElement } from '@stripe/react-stripe-js';
9
9
  import { Stripe, StripeElements } from '@stripe/stripe-js';
10
+ export { a as UsageMeter, B as UsageMeterBar, b as UsageMeterClassNames, E as UsageMeterEmpty, L as UsageMeterLabel, c as UsageMeterLoading, P as UsageMeterPercentage, R as UsageMeterResetsIn, d as UsageMeterRoot, U as UsageMeterRootProps, u as useUsageMeter } from '../UsageMeter-BhxNHeRM.js';
10
11
  import '../adapters/auth.js';
11
12
 
12
13
  type PlanPricingOption = {
@@ -612,6 +613,12 @@ declare const TopupFormBusinessDetails: {
612
613
  readonly Country: React.ForwardRefExoticComponent<React.SelectHTMLAttributes<HTMLSelectElement> & {
613
614
  asChild?: boolean;
614
615
  } & React.RefAttributes<HTMLSelectElement>>;
616
+ readonly State: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
617
+ asChild?: boolean;
618
+ } & React.RefAttributes<HTMLInputElement>>;
619
+ readonly PostalCode: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
620
+ asChild?: boolean;
621
+ } & React.RefAttributes<HTMLInputElement>>;
615
622
  readonly TaxId: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
616
623
  asChild?: boolean;
617
624
  } & React.RefAttributes<HTMLInputElement>>;
@@ -672,6 +679,12 @@ declare const TopupForm: {
672
679
  readonly Country: React.ForwardRefExoticComponent<React.SelectHTMLAttributes<HTMLSelectElement> & {
673
680
  asChild?: boolean;
674
681
  } & React.RefAttributes<HTMLSelectElement>>;
682
+ readonly State: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
683
+ asChild?: boolean;
684
+ } & React.RefAttributes<HTMLInputElement>>;
685
+ readonly PostalCode: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
686
+ asChild?: boolean;
687
+ } & React.RefAttributes<HTMLInputElement>>;
675
688
  readonly TaxId: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
676
689
  asChild?: boolean;
677
690
  } & React.RefAttributes<HTMLInputElement>>;
@@ -972,7 +985,7 @@ interface PaywallNoticeRootProps extends Omit<React.HTMLAttributes<HTMLDivElemen
972
985
  classNames?: PaywallNoticeClassNames;
973
986
  asChild?: boolean;
974
987
  }
975
- declare const Root$1: React.ForwardRefExoticComponent<PaywallNoticeRootProps & React.RefAttributes<HTMLDivElement>>;
988
+ declare const Root: React.ForwardRefExoticComponent<PaywallNoticeRootProps & React.RefAttributes<HTMLDivElement>>;
976
989
  declare const Heading: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
977
990
  asChild?: boolean;
978
991
  } & React.RefAttributes<HTMLHeadingElement>>;
@@ -1050,74 +1063,4 @@ declare const PaywallNotice: React.ForwardRefExoticComponent<PaywallNoticeRootPr
1050
1063
 
1051
1064
  declare function usePaywallNotice(): PaywallNoticeContextValue;
1052
1065
 
1053
- /**
1054
- * `<UsageMeter>` compound primitive — renders the authenticated customer's
1055
- * usage against their plan quota.
1056
- *
1057
- * Composes `useUsage()` internally so integrators only render the leaf
1058
- * primitives they care about. Leaves render `null` when the active plan
1059
- * isn't usage-based, so dropping the compound into any account page is
1060
- * safe.
1061
- *
1062
- * State:
1063
- * - root / bar `data-state="safe" | "warning" | "critical" | "loading"`
1064
- * - root `data-solvapay-usage-meter`
1065
- * - bar `data-solvapay-usage-meter-bar`
1066
- */
1067
-
1068
- type UsageMeterState = 'safe' | 'warning' | 'critical' | 'loading';
1069
- interface UsageMeterContextValue {
1070
- usage: UsageSnapshot | null;
1071
- loading: boolean;
1072
- error: Error | null;
1073
- percentUsed: number | null;
1074
- isApproachingLimit: boolean;
1075
- isAtLimit: boolean;
1076
- isUnlimited: boolean;
1077
- state: UsageMeterState;
1078
- warningAt: number;
1079
- criticalAt: number;
1080
- }
1081
- interface UsageMeterClassNames {
1082
- root?: string;
1083
- bar?: string;
1084
- label?: string;
1085
- percentage?: string;
1086
- resetsIn?: string;
1087
- loading?: string;
1088
- empty?: string;
1089
- error?: string;
1090
- }
1091
- interface UsageMeterRootProps extends React.HTMLAttributes<HTMLDivElement> {
1092
- /** Percent at which the bar flips to `data-state="warning"`. Default 75. */
1093
- warningAt?: number;
1094
- /** Percent at which the bar flips to `data-state="critical"`. Default 90. */
1095
- criticalAt?: number;
1096
- classNames?: UsageMeterClassNames;
1097
- asChild?: boolean;
1098
- /**
1099
- * Override the usage snapshot rather than reading from `useUsage`.
1100
- * Mostly useful for tests / Storybook demos.
1101
- */
1102
- usageOverride?: UsageSnapshot | null;
1103
- }
1104
- declare const Root: React.ForwardRefExoticComponent<UsageMeterRootProps & React.RefAttributes<HTMLDivElement>>;
1105
- declare const Bar: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
1106
- declare const Label: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
1107
- declare const Percentage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
1108
- declare const ResetsIn: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
1109
- declare const Loading: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
1110
- declare const Empty: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
1111
- declare const UsageMeter: React.ForwardRefExoticComponent<UsageMeterRootProps & React.RefAttributes<HTMLDivElement>> & {
1112
- Root: React.ForwardRefExoticComponent<UsageMeterRootProps & React.RefAttributes<HTMLDivElement>>;
1113
- Bar: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
1114
- Label: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
1115
- Percentage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
1116
- ResetsIn: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
1117
- Loading: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
1118
- Empty: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
1119
- };
1120
-
1121
- declare function useUsageMeter(): UsageMeterContextValue;
1122
-
1123
- export { AmountPicker, AmountPickerConfirm, AmountPickerCustom, AmountPickerOption, AmountPickerRoot, AutoRecharge, AutoRechargeActions, AutoRechargeAmountField, AutoRechargeBody, AutoRechargeCancelButton, AutoRechargeCard, AutoRechargeCardHeading, AutoRechargeCardSetup, AutoRechargeCardSummary, AutoRechargeContent, AutoRechargeDescription, AutoRechargeDisableButton, AutoRechargeEnableQuestion, AutoRechargeEnableRow, AutoRechargeEnableSentence, AutoRechargeEnableSwitch, AutoRechargeError, AutoRechargeFields, AutoRechargeFormState, AutoRechargeHeader, AutoRechargeHint, AutoRechargeInputPayload, AutoRechargeLoading, AutoRechargeMaxMonthlySpendField, AutoRechargeMonthlySpend, AutoRechargeOverlay, AutoRechargeRoot, AutoRechargeSaveButton, AutoRechargeSetup, AutoRechargeStatus, AutoRechargeStatusMessage, AutoRechargeSummary, AutoRechargeThresholdField, AutoRechargeTitle, AutoRechargeTopupField, AutoRechargeTrigger, AutoRechargeUnitToggle, AutoRechargeValidationError, CancelledPlanNotice, CancelledPlanNoticeAccessUntil, CancelledPlanNoticeCancelledOn, CancelledPlanNoticeDaysRemaining, CancelledPlanNoticeExpires, CancelledPlanNoticeHeading, CancelledPlanNoticeReactivateButton, CancelledPlanNoticeReason, CancelledPlanNoticeRoot, CheckoutSummary, CheckoutSummaryPlan, CheckoutSummaryPrice, CheckoutSummaryProduct, CheckoutSummaryRoot, CheckoutSummarySubtotal, CheckoutSummaryTax, CheckoutSummaryTaxNote, CheckoutSummaryTaxTreatmentNote, CheckoutSummaryTotal, CheckoutSummaryTrial, CreditGate, CreditGateError, CreditGateHeading, CreditGateLoading, CreditGateRoot, CreditGateSubheading, CreditGateTopup, LegalFooter, type LegalFooterProps, PaywallNotice, Balance as PaywallNoticeBalance, type PaywallNoticeClassNames, EmbeddedCheckout as PaywallNoticeEmbeddedCheckout, Heading as PaywallNoticeHeading, HostedCheckoutLink as PaywallNoticeHostedCheckoutLink, Message as PaywallNoticeMessage, Plans as PaywallNoticePlans, ProductContext as PaywallNoticeProductContext, Retry as PaywallNoticeRetry, Root$1 as PaywallNoticeRoot, type PaywallNoticeRootProps, PlanSelector, PlanSelectorCard, PlanSelectorCardBadge, PlanSelectorCardCurrency, PlanSelectorCardInterval, PlanSelectorCardName, PlanSelectorCardPrice, PlanSelectorCurrencySwitcher, PlanSelectorError, PlanSelectorGrid, PlanSelectorHeading, PlanSelectorLoading, PlanSelectorRoot, Slot, Slottable, TopupForm, TopupFormBusinessDetails, TopupFormError, TopupFormLegalFooter, TopupFormLoading, TopupFormPaymentElement, TopupFormRoot, TopupFormSubmitButton, TopupFormSummary, UsageMeter, Bar as UsageMeterBar, type UsageMeterClassNames, Empty as UsageMeterEmpty, Label as UsageMeterLabel, Loading as UsageMeterLoading, Percentage as UsageMeterPercentage, ResetsIn as UsageMeterResetsIn, Root as UsageMeterRoot, type UsageMeterRootProps, composeEventHandlers, composeRefs, setRef, useAmountPicker, useAmountPickerCopy, useAutoRechargeForm, useCancelledPlanNotice, useCheckoutSummary, useCreditGate, usePaywallNotice, usePlanSelector, useTopupForm, useUsageMeter };
1066
+ export { AmountPicker, AmountPickerConfirm, AmountPickerCustom, AmountPickerOption, AmountPickerRoot, AutoRecharge, AutoRechargeActions, AutoRechargeAmountField, AutoRechargeBody, AutoRechargeCancelButton, AutoRechargeCard, AutoRechargeCardHeading, AutoRechargeCardSetup, AutoRechargeCardSummary, AutoRechargeContent, AutoRechargeDescription, AutoRechargeDisableButton, AutoRechargeEnableQuestion, AutoRechargeEnableRow, AutoRechargeEnableSentence, AutoRechargeEnableSwitch, AutoRechargeError, AutoRechargeFields, AutoRechargeFormState, AutoRechargeHeader, AutoRechargeHint, AutoRechargeInputPayload, AutoRechargeLoading, AutoRechargeMaxMonthlySpendField, AutoRechargeMonthlySpend, AutoRechargeOverlay, AutoRechargeRoot, AutoRechargeSaveButton, AutoRechargeSetup, AutoRechargeStatus, AutoRechargeStatusMessage, AutoRechargeSummary, AutoRechargeThresholdField, AutoRechargeTitle, AutoRechargeTopupField, AutoRechargeTrigger, AutoRechargeUnitToggle, AutoRechargeValidationError, CancelledPlanNotice, CancelledPlanNoticeAccessUntil, CancelledPlanNoticeCancelledOn, CancelledPlanNoticeDaysRemaining, CancelledPlanNoticeExpires, CancelledPlanNoticeHeading, CancelledPlanNoticeReactivateButton, CancelledPlanNoticeReason, CancelledPlanNoticeRoot, CheckoutSummary, CheckoutSummaryPlan, CheckoutSummaryPrice, CheckoutSummaryProduct, CheckoutSummaryRoot, CheckoutSummarySubtotal, CheckoutSummaryTax, CheckoutSummaryTaxNote, CheckoutSummaryTaxTreatmentNote, CheckoutSummaryTotal, CheckoutSummaryTrial, CreditGate, CreditGateError, CreditGateHeading, CreditGateLoading, CreditGateRoot, CreditGateSubheading, CreditGateTopup, LegalFooter, type LegalFooterProps, PaywallNotice, Balance as PaywallNoticeBalance, type PaywallNoticeClassNames, EmbeddedCheckout as PaywallNoticeEmbeddedCheckout, Heading as PaywallNoticeHeading, HostedCheckoutLink as PaywallNoticeHostedCheckoutLink, Message as PaywallNoticeMessage, Plans as PaywallNoticePlans, ProductContext as PaywallNoticeProductContext, Retry as PaywallNoticeRetry, Root as PaywallNoticeRoot, type PaywallNoticeRootProps, PlanSelector, PlanSelectorCard, PlanSelectorCardBadge, PlanSelectorCardCurrency, PlanSelectorCardInterval, PlanSelectorCardName, PlanSelectorCardPrice, PlanSelectorCurrencySwitcher, PlanSelectorError, PlanSelectorGrid, PlanSelectorHeading, PlanSelectorLoading, PlanSelectorRoot, Slot, Slottable, TopupForm, TopupFormBusinessDetails, TopupFormError, TopupFormLegalFooter, TopupFormLoading, TopupFormPaymentElement, TopupFormRoot, TopupFormSubmitButton, TopupFormSummary, composeEventHandlers, composeRefs, setRef, useAmountPicker, useAmountPickerCopy, useAutoRechargeForm, useCancelledPlanNotice, useCheckoutSummary, useCreditGate, usePaywallNotice, usePlanSelector, useTopupForm };
@@ -46,6 +46,7 @@ import {
46
46
  AutoRechargeUnitToggle,
47
47
  AutoRechargeValidationError,
48
48
  Balance,
49
+ CancelPlanButton,
49
50
  CheckoutSteps,
50
51
  CheckoutStepsAmountContinueButton,
51
52
  CheckoutStepsAmountPicker,
@@ -88,7 +89,7 @@ import {
88
89
  useCreditGate,
89
90
  usePaywallNotice,
90
91
  usePurchaseGate
91
- } from "../chunk-HQH6KSXJ.js";
92
+ } from "../chunk-X65JBC2A.js";
92
93
  import {
93
94
  AmountPicker,
94
95
  AmountPickerConfirm,
@@ -97,7 +98,6 @@ import {
97
98
  AmountPickerRoot,
98
99
  BalanceBadge,
99
100
  Bar,
100
- CancelPlanButton,
101
101
  CancelledPlanNotice,
102
102
  CancelledPlanNoticeAccessUntil,
103
103
  CancelledPlanNoticeCancelledOn,
@@ -175,7 +175,7 @@ import {
175
175
  usePlanSelector,
176
176
  useTopupForm,
177
177
  useUsageMeter
178
- } from "../chunk-LL6AYSTC.js";
178
+ } from "../chunk-VTGYZIE2.js";
179
179
  import "../chunk-UMXOAUW7.js";
180
180
  import "../chunk-MLKGABMK.js";
181
181
  export {
package/dist/styles.css CHANGED
@@ -9,17 +9,25 @@
9
9
  */
10
10
 
11
11
  :root {
12
- --solvapay-accent: hsl(222 47% 11%);
13
- --solvapay-accent-foreground: hsl(0 0% 98%);
14
- --solvapay-accent-hover: hsl(222 47% 20%);
15
- --solvapay-surface: hsl(0 0% 100%);
16
- --solvapay-muted: hsl(210 40% 96%);
17
- --solvapay-muted-foreground: hsl(215 16% 47%);
18
- --solvapay-border: hsl(214 32% 91%);
19
- --solvapay-destructive: hsl(0 72% 51%);
12
+ color-scheme: light dark;
13
+ --solvapay-accent: light-dark(#000000, #E8E8E8);
14
+ --solvapay-accent-foreground: light-dark(#FFFFFF, #171717);
15
+ --solvapay-accent-text: var(--solvapay-accent-foreground);
16
+ --solvapay-accent-hover: light-dark(#2A2A2A, #FFFFFF);
17
+ --solvapay-surface: light-dark(#FFFFFF, #171717);
18
+ --solvapay-muted: light-dark(#F4F4F4, #262626);
19
+ --solvapay-muted-foreground: light-dark(#6B6A67, #A3A29E);
20
+ --solvapay-border: light-dark(#D9D9D9, #3A3A3A);
21
+ --solvapay-destructive: light-dark(#C4322A, #F97066);
22
+ --solvapay-danger: var(--solvapay-destructive);
23
+ --solvapay-identifier: light-dark(#65659B, #9B9BE0);
24
+ --solvapay-selection: light-dark(#4D89A2, #6B9CAE);
25
+ --solvapay-selection-wash: light-dark(#F2F7F9, #1C2B34);
26
+ --solvapay-row-hover: light-dark(#FAFAFA, #1F1F1F);
27
+ --solvapay-control-hover: light-dark(#F5F5F5, #2A2A2A);
20
28
  --solvapay-warning: hsl(38 92% 50%);
21
29
  --solvapay-success: hsl(142 71% 45%);
22
- --solvapay-radius: 0.5rem;
30
+ --solvapay-radius: 8px;
23
31
  --solvapay-font: inherit;
24
32
  }
25
33
 
@@ -662,6 +670,13 @@
662
670
  padding: 0;
663
671
  }
664
672
 
673
+ [data-solvapay-payment-form-business-details-fields],
674
+ [data-solvapay-topup-form-business-details-fields] {
675
+ display: flex;
676
+ flex-direction: column;
677
+ gap: 0.75rem;
678
+ }
679
+
665
680
  .solvapay-checkout-business-toggle,
666
681
  [data-solvapay-payment-form-business-details-toggle],
667
682
  [data-solvapay-topup-form-business-details-toggle] {
@@ -705,9 +720,13 @@
705
720
 
706
721
  [data-solvapay-payment-form-business-details-name],
707
722
  [data-solvapay-payment-form-business-details-country],
723
+ [data-solvapay-payment-form-business-details-state],
724
+ [data-solvapay-payment-form-business-details-postal],
708
725
  [data-solvapay-payment-form-business-details-tax-id],
709
726
  [data-solvapay-topup-form-business-details-name],
710
727
  [data-solvapay-topup-form-business-details-country],
728
+ [data-solvapay-topup-form-business-details-state],
729
+ [data-solvapay-topup-form-business-details-postal],
711
730
  [data-solvapay-topup-form-business-details-tax-id] {
712
731
  width: 100%;
713
732
  height: 2.5rem;
@@ -722,9 +741,13 @@
722
741
 
723
742
  [data-solvapay-payment-form-business-details-name]:focus,
724
743
  [data-solvapay-payment-form-business-details-country]:focus,
744
+ [data-solvapay-payment-form-business-details-state]:focus,
745
+ [data-solvapay-payment-form-business-details-postal]:focus,
725
746
  [data-solvapay-payment-form-business-details-tax-id]:focus,
726
747
  [data-solvapay-topup-form-business-details-name]:focus,
727
748
  [data-solvapay-topup-form-business-details-country]:focus,
749
+ [data-solvapay-topup-form-business-details-state]:focus,
750
+ [data-solvapay-topup-form-business-details-postal]:focus,
728
751
  [data-solvapay-topup-form-business-details-tax-id]:focus {
729
752
  outline: none;
730
753
  border-color: var(--solvapay-accent);
@@ -1804,6 +1827,13 @@
1804
1827
  line-height: 1.5;
1805
1828
  }
1806
1829
 
1830
+ /* Mandate now follows the CTA (Stripe pattern). Pull it back against the
1831
+ * container's flex gap so it reads as a caption on the button. */
1832
+ [data-solvapay-payment-form-submit] + [data-solvapay-mandate-text],
1833
+ [data-solvapay-topup-form-submit] + [data-solvapay-mandate-text] {
1834
+ margin-top: -0.5rem;
1835
+ }
1836
+
1807
1837
  /*
1808
1838
  * Inline merchant terms / privacy links inside the mandate sentence.
1809
1839
  * Stays visually quiet (color: inherit, no underline by default) so
@@ -1869,6 +1899,26 @@
1869
1899
  font-variant-numeric: tabular-nums;
1870
1900
  }
1871
1901
 
1902
+ /* Captioned value pair (`showFieldLabels`). The label rides directly
1903
+ * above its value, so the pair needs a tighter gap than the card's
1904
+ * line-to-line rhythm — otherwise the caption reads as a sibling fact
1905
+ * rather than as the value's label. */
1906
+ [data-solvapay-current-plan-field],
1907
+ .solvapay-current-plan-field {
1908
+ display: flex;
1909
+ flex-direction: column;
1910
+ gap: 0.125rem;
1911
+ }
1912
+
1913
+ [data-solvapay-current-plan-field-label],
1914
+ .solvapay-current-plan-field-label {
1915
+ font-size: 0.6875rem;
1916
+ font-weight: 600;
1917
+ letter-spacing: 0.06em;
1918
+ text-transform: uppercase;
1919
+ color: var(--solvapay-muted-foreground);
1920
+ }
1921
+
1872
1922
  [data-solvapay-current-plan-next-billing],
1873
1923
  [data-solvapay-current-plan-expires],
1874
1924
  .solvapay-current-plan-date-line {
@@ -1891,7 +1941,7 @@
1891
1941
  margin-top: 0.125rem;
1892
1942
  padding: 0.125rem 0.375rem;
1893
1943
  border-radius: 4px;
1894
- background: var(--solvapay-muted, #f1f5f9);
1944
+ background: var(--solvapay-muted);
1895
1945
  color: var(--solvapay-muted-foreground);
1896
1946
  font-family:
1897
1947
  ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',