@coinlist-co/react 0.12.1-rc.f2804ef → 0.12.1

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.
@@ -3491,16 +3491,23 @@ declare function OfferSaleCard({ offer, onClick, className, containerClassName,
3491
3491
 
3492
3492
  type RequirementsChecklistUiState = {
3493
3493
  type: 'loading';
3494
- } | {
3495
- type: 'not-authenticated';
3494
+ title: string;
3495
+ description: string;
3496
3496
  } | {
3497
3497
  type: 'error';
3498
+ title: string;
3498
3499
  } | {
3499
3500
  type: 'content';
3500
3501
  title: string;
3501
3502
  description: string;
3502
3503
  items: RequirementsChecklistItemUi[];
3503
3504
  ineligible: boolean;
3505
+ /**
3506
+ * Unsupported jurisdiction, once the country is known. When set, the
3507
+ * description, rows, and Continue are replaced by this neutral banner.
3508
+ * Absent otherwise.
3509
+ */
3510
+ blockedMessage?: string;
3504
3511
  /** `null` when the host passed no `onContinue`, so no button is shown. */
3505
3512
  continueAction: {
3506
3513
  enabled: boolean;
@@ -3576,6 +3583,14 @@ type RequirementItemUi = {
3576
3583
  multiWallet: boolean;
3577
3584
  /** The user's connected wallets. Single-slot requirements have at most one. */
3578
3585
  connectedWallets: ConnectedWalletUi[];
3586
+ /** Absent means the shared verification sentences. */
3587
+ statusMessages?: {
3588
+ /** Absent for tax documentation: `in_progress` stays a required step. */
3589
+ pending?: string;
3590
+ completed: string;
3591
+ /** Full sentence. "Contact support" inside it is the support link. */
3592
+ rejected: string;
3593
+ };
3579
3594
  };
3580
3595
  declare const RequirementItemUi: {
3581
3596
  fromDomain(req: Requirement, statusInfo: RequirementStatusInfo | undefined, label: string, description: string, addresses?: OfferOptionAddress[]): RequirementItemUi;
@@ -3728,13 +3743,19 @@ interface RequirementItemProps {
3728
3743
  */
3729
3744
  walletsStatus?: WalletsStatus;
3730
3745
  onContactSupport?: (() => void) | null;
3746
+ /**
3747
+ * 16px under the open section, so its button does not sit on the next row's
3748
+ * divider. The last row omits this: the checklist's own gap is the space
3749
+ * before the footer.
3750
+ */
3751
+ spaceBeforeNextRow?: boolean;
3731
3752
  }
3732
3753
  /**
3733
3754
  * A single requirement row (label, status, expandable action zone). Self-scoped:
3734
3755
  * renders fully styled on its own, with no `CoinListStyleScope` needed. Also composed
3735
3756
  * by {@link RequirementsChecklist}.
3736
3757
  */
3737
- declare function RequirementItem({ ui, expanded, onToggle, className, onAction, onRemoveWallet, walletsStatus, onContactSupport, }: RequirementItemProps): react.JSX.Element;
3758
+ declare function RequirementItem({ ui, expanded, onToggle, className, onAction, onRemoveWallet, walletsStatus, onContactSupport, spaceBeforeNextRow, }: RequirementItemProps): react.JSX.Element;
3738
3759
 
3739
3760
  type LoadRequirementsReason = 'not-authenticated' | 'generic-error';
3740
3761
  type LoadRequirementsState = {
@@ -3830,12 +3851,8 @@ interface RequirementsChecklistContainerProps {
3830
3851
  /** Optional loading slot. */
3831
3852
  loading?: ReactNode;
3832
3853
  /**
3833
- * Rendered when the user is not authenticated. Defaults to
3834
- * {@link CoinListSignInCardContainer}, which prompts the user to sign in and starts
3835
- * the CoinList OAuth flow. Pass `null` to render nothing.
3854
+ * Replaces the error banner under the title. The title still renders.
3836
3855
  */
3837
- unauthenticatedState?: ReactNode;
3838
- /** Optional error slot. */
3839
3856
  error?: ReactNode;
3840
3857
  className?: string;
3841
3858
  /**
@@ -3874,9 +3891,8 @@ interface RequirementsChecklistContainerProps {
3874
3891
  * initial client-side fetch. Pass `enabled={false}` to skip fetches when the
3875
3892
  * container is mounted but the checklist is not needed yet.
3876
3893
  *
3877
- * When the user is not authenticated, renders a sign-in card instead of the
3878
- * checklist - without fetching. Pass `unauthenticatedState` to customize that
3879
- * state, or `null` to render nothing.
3894
+ * A logged-out session renders the error state and does not fetch. The host
3895
+ * should not mount the checklist when it already knows the user is logged out.
3880
3896
  *
3881
3897
  * By default, clicking a requirement's action button opens the corresponding
3882
3898
  * CoinList page in a new tab via {@link CoinListClient#requirements.handle}. It
@@ -3886,26 +3902,21 @@ interface RequirementsChecklistContainerProps {
3886
3902
  *
3887
3903
  * Self-scoped: renders fully styled on its own, with no `CoinListStyleScope` needed.
3888
3904
  */
3889
- declare function RequirementsChecklistContainer({ loading, error, unauthenticatedState, className, enabled, ...options }: RequirementsChecklistContainerProps): ReactNode;
3905
+ declare function RequirementsChecklistContainer({ loading, error, className, enabled, ...options }: RequirementsChecklistContainerProps): ReactNode;
3890
3906
 
3891
3907
  interface RequirementsChecklistViewProps {
3892
3908
  state: RequirementsChecklistUiState;
3893
3909
  onEvent: (event: RequirementsChecklistUiEvent) => void;
3894
3910
  /** Optional loading slot. */
3895
3911
  loading?: ReactNode;
3896
- /** Optional error slot. */
3912
+ /** Replaces the error banner under the title. The title still renders. */
3897
3913
  error?: ReactNode;
3898
- /**
3899
- * Rendered when the user is not authenticated. Nothing is rendered when
3900
- * omitted; `RequirementsChecklistContainer` passes a connected sign-in card.
3901
- */
3902
- unauthenticatedState?: ReactNode;
3903
3914
  className?: string;
3904
3915
  }
3905
3916
  /**
3906
- * Renders the requirements checklist: its header, one row per requirement, the
3907
- * eligibility banner and the continue action. Pure: the rows arrive already
3908
- * shaped in `state`, and every interaction leaves through `onEvent`.
3917
+ * Renders the requirements checklist: its header, one row per requirement, and
3918
+ * the continue row. Pure: the rows arrive already shaped in `state`, and every
3919
+ * interaction leaves through `onEvent`.
3909
3920
  *
3910
3921
  * The flows the checklist can open (tax document, wallet connect, identity
3911
3922
  * verification) are composed by `RequirementsChecklistContainer`, which owns
@@ -3491,16 +3491,23 @@ declare function OfferSaleCard({ offer, onClick, className, containerClassName,
3491
3491
 
3492
3492
  type RequirementsChecklistUiState = {
3493
3493
  type: 'loading';
3494
- } | {
3495
- type: 'not-authenticated';
3494
+ title: string;
3495
+ description: string;
3496
3496
  } | {
3497
3497
  type: 'error';
3498
+ title: string;
3498
3499
  } | {
3499
3500
  type: 'content';
3500
3501
  title: string;
3501
3502
  description: string;
3502
3503
  items: RequirementsChecklistItemUi[];
3503
3504
  ineligible: boolean;
3505
+ /**
3506
+ * Unsupported jurisdiction, once the country is known. When set, the
3507
+ * description, rows, and Continue are replaced by this neutral banner.
3508
+ * Absent otherwise.
3509
+ */
3510
+ blockedMessage?: string;
3504
3511
  /** `null` when the host passed no `onContinue`, so no button is shown. */
3505
3512
  continueAction: {
3506
3513
  enabled: boolean;
@@ -3576,6 +3583,14 @@ type RequirementItemUi = {
3576
3583
  multiWallet: boolean;
3577
3584
  /** The user's connected wallets. Single-slot requirements have at most one. */
3578
3585
  connectedWallets: ConnectedWalletUi[];
3586
+ /** Absent means the shared verification sentences. */
3587
+ statusMessages?: {
3588
+ /** Absent for tax documentation: `in_progress` stays a required step. */
3589
+ pending?: string;
3590
+ completed: string;
3591
+ /** Full sentence. "Contact support" inside it is the support link. */
3592
+ rejected: string;
3593
+ };
3579
3594
  };
3580
3595
  declare const RequirementItemUi: {
3581
3596
  fromDomain(req: Requirement, statusInfo: RequirementStatusInfo | undefined, label: string, description: string, addresses?: OfferOptionAddress[]): RequirementItemUi;
@@ -3728,13 +3743,19 @@ interface RequirementItemProps {
3728
3743
  */
3729
3744
  walletsStatus?: WalletsStatus;
3730
3745
  onContactSupport?: (() => void) | null;
3746
+ /**
3747
+ * 16px under the open section, so its button does not sit on the next row's
3748
+ * divider. The last row omits this: the checklist's own gap is the space
3749
+ * before the footer.
3750
+ */
3751
+ spaceBeforeNextRow?: boolean;
3731
3752
  }
3732
3753
  /**
3733
3754
  * A single requirement row (label, status, expandable action zone). Self-scoped:
3734
3755
  * renders fully styled on its own, with no `CoinListStyleScope` needed. Also composed
3735
3756
  * by {@link RequirementsChecklist}.
3736
3757
  */
3737
- declare function RequirementItem({ ui, expanded, onToggle, className, onAction, onRemoveWallet, walletsStatus, onContactSupport, }: RequirementItemProps): react.JSX.Element;
3758
+ declare function RequirementItem({ ui, expanded, onToggle, className, onAction, onRemoveWallet, walletsStatus, onContactSupport, spaceBeforeNextRow, }: RequirementItemProps): react.JSX.Element;
3738
3759
 
3739
3760
  type LoadRequirementsReason = 'not-authenticated' | 'generic-error';
3740
3761
  type LoadRequirementsState = {
@@ -3830,12 +3851,8 @@ interface RequirementsChecklistContainerProps {
3830
3851
  /** Optional loading slot. */
3831
3852
  loading?: ReactNode;
3832
3853
  /**
3833
- * Rendered when the user is not authenticated. Defaults to
3834
- * {@link CoinListSignInCardContainer}, which prompts the user to sign in and starts
3835
- * the CoinList OAuth flow. Pass `null` to render nothing.
3854
+ * Replaces the error banner under the title. The title still renders.
3836
3855
  */
3837
- unauthenticatedState?: ReactNode;
3838
- /** Optional error slot. */
3839
3856
  error?: ReactNode;
3840
3857
  className?: string;
3841
3858
  /**
@@ -3874,9 +3891,8 @@ interface RequirementsChecklistContainerProps {
3874
3891
  * initial client-side fetch. Pass `enabled={false}` to skip fetches when the
3875
3892
  * container is mounted but the checklist is not needed yet.
3876
3893
  *
3877
- * When the user is not authenticated, renders a sign-in card instead of the
3878
- * checklist - without fetching. Pass `unauthenticatedState` to customize that
3879
- * state, or `null` to render nothing.
3894
+ * A logged-out session renders the error state and does not fetch. The host
3895
+ * should not mount the checklist when it already knows the user is logged out.
3880
3896
  *
3881
3897
  * By default, clicking a requirement's action button opens the corresponding
3882
3898
  * CoinList page in a new tab via {@link CoinListClient#requirements.handle}. It
@@ -3886,26 +3902,21 @@ interface RequirementsChecklistContainerProps {
3886
3902
  *
3887
3903
  * Self-scoped: renders fully styled on its own, with no `CoinListStyleScope` needed.
3888
3904
  */
3889
- declare function RequirementsChecklistContainer({ loading, error, unauthenticatedState, className, enabled, ...options }: RequirementsChecklistContainerProps): ReactNode;
3905
+ declare function RequirementsChecklistContainer({ loading, error, className, enabled, ...options }: RequirementsChecklistContainerProps): ReactNode;
3890
3906
 
3891
3907
  interface RequirementsChecklistViewProps {
3892
3908
  state: RequirementsChecklistUiState;
3893
3909
  onEvent: (event: RequirementsChecklistUiEvent) => void;
3894
3910
  /** Optional loading slot. */
3895
3911
  loading?: ReactNode;
3896
- /** Optional error slot. */
3912
+ /** Replaces the error banner under the title. The title still renders. */
3897
3913
  error?: ReactNode;
3898
- /**
3899
- * Rendered when the user is not authenticated. Nothing is rendered when
3900
- * omitted; `RequirementsChecklistContainer` passes a connected sign-in card.
3901
- */
3902
- unauthenticatedState?: ReactNode;
3903
3914
  className?: string;
3904
3915
  }
3905
3916
  /**
3906
- * Renders the requirements checklist: its header, one row per requirement, the
3907
- * eligibility banner and the continue action. Pure: the rows arrive already
3908
- * shaped in `state`, and every interaction leaves through `onEvent`.
3917
+ * Renders the requirements checklist: its header, one row per requirement, and
3918
+ * the continue row. Pure: the rows arrive already shaped in `state`, and every
3919
+ * interaction leaves through `onEvent`.
3909
3920
  *
3910
3921
  * The flows the checklist can open (tax document, wallet connect, identity
3911
3922
  * verification) are composed by `RequirementsChecklistContainer`, which owns