@binopartner/pay-sdk 0.3.2 → 0.3.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.
package/README.md CHANGED
@@ -263,10 +263,10 @@ Every component accepts `className`, `style` and `unstyled`, forwards its ref an
263
263
  | `Quote` | Fees, amount received, ETA, slippage. |
264
264
  | `CryptoAddress` | Address, copy button, QR code (rendered locally, no image host), network warning, high-fee warning. |
265
265
  | `Requisites` | Fiat payment details: raw rows with copy buttons, or the requisites frame (see Security). `data-delivery="raw" \| "frame"`. |
266
- | `RequisitesFrame`, `ReceiptUpload`, `Countdown`, `RedirectButton`, `Onramp` | Frame, receipt upload (RU deposits in raw mode; in frame mode the receipt is uploaded inside the frame), server-clock countdown, hosted page link, onramp (`display="embed" \| "tab"`). |
266
+ | `RequisitesFrame`, `ReceiptUpload`, `Countdown`, `RedirectButton`, `Onramp` | Frame, receipt upload (RU deposits in raw mode; in frame mode the receipt is uploaded inside the frame), server-clock countdown, hosted page link, card onramp (Coindisco). The onramp is a link that opens it in a new tab; with `display="embed"` it is a frame (`height`, 640 px by default) with that link under it. Coindisco frames only on the origins listed in its dashboard: ask Binodex to list your site (`https://host`, each subdomain separately) before you turn the frame on. On a site that is not listed the frame stays blank and the link under it still works. `ref`, `className` and `style` go to the link. |
267
267
  | `SlippageWarning`, `SubmitButton`, `Status`, `BackButton`, `Qr` | |
268
268
  | `RestartButton`, `MethodNotice` | Cancel / new payment for card deposits (and a new withdrawal after a final status); the receipt notice under the amount for rails that may need a receipt. |
269
- | `DepositForm`, `WithdrawForm` | Full screens composed from the parts above, laid out like the binodex payment modal: a card with the title, the balance and a close button, the Crypto / Card tabs, the payment country and the bank tiles. Replace any piece: `<Pay.DepositForm components={{ MethodPicker: MyPicker }} />`. |
269
+ | `DepositForm`, `WithdrawForm` | Full screens composed from the parts above, laid out like the binodex payment modal: a card with the title, the balance and a close button, the Crypto / Card tabs, the payment country and the bank tiles. Replace any piece: `<Pay.DepositForm components={{ MethodPicker: MyPicker }} />`. `<Pay.DepositForm onrampDisplay="embed" />` frames the card onramp (see `Onramp`). |
270
270
 
271
271
  ### Hooks
272
272
 
@@ -309,12 +309,12 @@ The pay API and the requisites frame are served by two regional host pairs (glob
309
309
 
310
310
  ```
311
311
  connect-src 'self' https://api.binodex.app https://api.binodex.pro;
312
- frame-src https://binodex.app https://binodex.pro https://*.onramper.com;
312
+ frame-src https://binodex.app https://binodex.pro;
313
313
  font-src https://binodex.app https://binodex.pro;
314
314
  img-src 'self' data: https:;
315
315
  ```
316
316
 
317
- Replace the hosts with the ones in your session responses (`api_bases`, `widget_origins`) and in `allowedApiOrigins` / `allowedWidgetOrigins`. `img-src` covers the bank logos, coin icons and flags from the Binodex domains, your logo from the partner cabinet and providers that send a QR image instead of a QR payload; crypto QR codes are drawn locally as SVG. With `assetBaseUrl` / `fontBaseUrl` on your own host, list that host instead.
317
+ Replace the hosts with the ones in your session responses (`api_bases`, `widget_origins`) and in `allowedApiOrigins` / `allowedWidgetOrigins`. `img-src` covers the bank logos, coin icons and flags from the Binodex domains, your logo from the partner cabinet and providers that send a QR image instead of a QR payload; crypto QR codes are drawn locally as SVG. With `assetBaseUrl` / `fontBaseUrl` on your own host, list that host instead. With the card onramp framed (`display="embed"`), add `https://widget.coindisco.com` to `frame-src`.
318
318
 
319
319
  ## Migration from the iframe widget
320
320
 
@@ -62,7 +62,7 @@ export const ar = {
62
62
  "qr.label": "رمز QR للدفع",
63
63
  "onramp.title": "شراء عملات رقمية",
64
64
  "onramp.open": "فتح في علامة تبويب جديدة",
65
- "onramp.disclosure": "تتم معالجة الدفع بالبطاقة عبر Onramper وشركائها من مزوّدي الخدمة. تُضاف الأموال إلى رصيد التداول الخاص بك بعد التأكيد على السلسلة.",
65
+ "onramp.disclosure": "تتم معالجة الدفع بالبطاقة بواسطة Coindisco ومزوّديه الشركاء. تُضاف الأموال إلى رصيد التداول الخاص بك بعد التأكيد على البلوكشين.",
66
66
  "address.label": "عنوان المحفظة",
67
67
  "address.placeholder": "الصق العنوان",
68
68
  "address.invalid.evm": "عنوان غير صالح: المتوقع 0x متبوعًا بـ 40 حرفًا سداسيًا عشريًا",
@@ -62,7 +62,7 @@ export const cs = {
62
62
  "qr.label": "QR kód pro platbu",
63
63
  "onramp.title": "Koupit krypto",
64
64
  "onramp.open": "Otevřít na nové kartě",
65
- "onramp.disclosure": "Platbu kartou zpracovává Onramper a jeho partnerští poskytovatelé. Prostředky budou připsány na váš obchodní zůstatek po potvrzení v blockchainu.",
65
+ "onramp.disclosure": "Platbu kartou zpracovává Coindisco a jeho partnerští poskytovatelé. Prostředky budou připsány na váš obchodní zůstatek po potvrzení v blockchainu.",
66
66
  "address.label": "Adresa peněženky",
67
67
  "address.placeholder": "Vložte adresu",
68
68
  "address.invalid.evm": "Neplatná adresa: očekává se 0x a 40 hexadecimálních znaků",
@@ -62,7 +62,7 @@ export const de = {
62
62
  "qr.label": "QR-Code für die Zahlung",
63
63
  "onramp.title": "Krypto kaufen",
64
64
  "onramp.open": "In neuem Tab öffnen",
65
- "onramp.disclosure": "Die Kartenzahlung wird von Onramper und seinen Partnern abgewickelt. Guthaben wird nach On-Chain-Bestätigung gutgeschrieben.",
65
+ "onramp.disclosure": "Die Kartenzahlung wird von Coindisco und seinen Partneranbietern abgewickelt. Das Guthaben wird Ihrem Handelskonto nach der Bestätigung in der Blockchain gutgeschrieben.",
66
66
  "address.label": "Wallet-Adresse",
67
67
  "address.placeholder": "Adresse einfügen",
68
68
  "address.invalid.evm": "Ungültige Adresse: erwartet wird 0x gefolgt von 40 Hex-Zeichen",
@@ -58,7 +58,7 @@ export const en = {
58
58
  "redirect.hint": "The payment page opens in a new tab.",
59
59
  "onramp.title": "Buy crypto",
60
60
  "onramp.open": "Open in a new tab",
61
- "onramp.disclosure": "Card payment is processed by Onramper and its provider partners. Funds are credited to your trading balance after on-chain confirmation.",
61
+ "onramp.disclosure": "Card payment is processed by Coindisco and its provider partners. Funds are credited to your trading balance after on-chain confirmation.",
62
62
  "address.label": "Wallet address",
63
63
  "address.placeholder": "Paste the address",
64
64
  "address.invalid.evm": "Invalid address: expected 0x followed by 40 hex characters",
@@ -62,7 +62,7 @@ export const es = {
62
62
  "qr.label": "Código QR para el pago",
63
63
  "onramp.title": "Comprar cripto",
64
64
  "onramp.open": "Abrir en una pestaña nueva",
65
- "onramp.disclosure": "El pago con tarjeta es procesado por Onramper y sus socios. Los fondos se acreditan tras la confirmación en la cadena.",
65
+ "onramp.disclosure": "El pago con tarjeta lo procesan Coindisco y sus proveedores asociados. Los fondos se acreditan en tu saldo de trading tras la confirmación en la blockchain.",
66
66
  "address.label": "Dirección de la billetera",
67
67
  "address.placeholder": "Pega la dirección",
68
68
  "address.invalid.evm": "Dirección no válida: se espera 0x seguido de 40 caracteres hexadecimales",
@@ -62,7 +62,7 @@ export const fr = {
62
62
  "qr.label": "Code QR du paiement",
63
63
  "onramp.title": "Acheter des cryptos",
64
64
  "onramp.open": "Ouvrir dans un nouvel onglet",
65
- "onramp.disclosure": "Le paiement par carte est traité par Onramper et ses partenaires. Les fonds sont crédités après confirmation on-chain.",
65
+ "onramp.disclosure": "Le paiement par carte est traité par Coindisco et ses prestataires partenaires. Les fonds sont crédités sur votre solde de trading après confirmation sur la blockchain.",
66
66
  "address.label": "Adresse du portefeuille",
67
67
  "address.placeholder": "Collez l'adresse",
68
68
  "address.invalid.evm": "Adresse invalide : 0x suivi de 40 caractères hexadécimaux attendu",
@@ -62,7 +62,7 @@ export const hi = {
62
62
  "qr.label": "भुगतान के लिए QR कोड",
63
63
  "onramp.title": "क्रिप्टो खरीदें",
64
64
  "onramp.open": "नए टैब में खोलें",
65
- "onramp.disclosure": "कार्ड भुगतान Onramper और उसके साझेदारों द्वारा संसाधित किया जाता है। ऑन-चेन पुष्टि के बाद राशि जमा की जाती है।",
65
+ "onramp.disclosure": "कार्ड भुगतान Coindisco और उसके पार्टनर प्रदाताओं द्वारा प्रोसेस किया जाता है। ब्लॉकचेन पर पुष्टि के बाद राशि आपके ट्रेडिंग बैलेंस में जमा कर दी जाती है।",
66
66
  "address.label": "वॉलेट पता",
67
67
  "address.placeholder": "पता पेस्ट करें",
68
68
  "address.invalid.evm": "अमान्य पता: 0x के बाद 40 हेक्स अक्षर अपेक्षित हैं",
@@ -62,7 +62,7 @@ export const it = {
62
62
  "qr.label": "Codice QR per il pagamento",
63
63
  "onramp.title": "Compra cripto",
64
64
  "onramp.open": "Apri in una nuova scheda",
65
- "onramp.disclosure": "Il pagamento con carta è elaborato da Onramper e dai suoi partner. I fondi vengono accreditati sul tuo saldo di trading dopo la conferma on-chain.",
65
+ "onramp.disclosure": "Il pagamento con carta è elaborato da Coindisco e dai suoi provider partner. I fondi vengono accreditati sul tuo saldo di trading dopo la conferma sulla blockchain.",
66
66
  "address.label": "Indirizzo del wallet",
67
67
  "address.placeholder": "Incolla l'indirizzo",
68
68
  "address.invalid.evm": "Indirizzo non valido: atteso 0x seguito da 40 caratteri esadecimali",
@@ -62,7 +62,7 @@ export const ru = {
62
62
  "qr.label": "QR-код для оплаты",
63
63
  "onramp.title": "Покупка криптовалюты",
64
64
  "onramp.open": "Открыть в новой вкладке",
65
- "onramp.disclosure": "Платёж по карте обрабатывается Onramper и его провайдер-партнёрами. Средства зачисляются на ваш торговый баланс после подтверждения в блокчейне.",
65
+ "onramp.disclosure": "Платёж по карте обрабатывается Coindisco и его провайдер-партнёрами. Средства зачисляются на ваш торговый баланс после подтверждения в блокчейне.",
66
66
  "address.label": "Адрес кошелька",
67
67
  "address.placeholder": "Вставьте адрес",
68
68
  "address.invalid.evm": "Некорректный адрес: ожидается 0x и 40 шестнадцатеричных символов",
@@ -62,7 +62,7 @@ export const tr = {
62
62
  "qr.label": "Ödeme için QR kodu",
63
63
  "onramp.title": "Kripto satın al",
64
64
  "onramp.open": "Yeni sekmede aç",
65
- "onramp.disclosure": "Kart ödemesi Onramper ve ortakları tarafından işlenir. Fonlar zincir üstü onay sonrasında hesaba yansır.",
65
+ "onramp.disclosure": "Kartla ödeme Coindisco ve iş ortağı sağlayıcıları tarafından işlenir. Fonlar, blokzincirde onaylandıktan sonra işlem bakiyenize yatırılır.",
66
66
  "address.label": "Cüzdan adresi",
67
67
  "address.placeholder": "Adresi yapıştırın",
68
68
  "address.invalid.evm": "Geçersiz adres: 0x ve ardından 40 onaltılık karakter bekleniyor",
@@ -62,7 +62,7 @@ export const ua = {
62
62
  "qr.label": "QR-код для оплати",
63
63
  "onramp.title": "Купівля криптовалюти",
64
64
  "onramp.open": "Відкрити в новій вкладці",
65
- "onramp.disclosure": "Оплата картою обробляється Onramper та його партнерами. Кошти зараховуються після підтвердження в мережі.",
65
+ "onramp.disclosure": "Платіж карткою обробляє Coindisco та його провайдери-партнери. Кошти зараховуються на ваш торговий баланс після підтвердження в блокчейні.",
66
66
  "address.label": "Адреса гаманця",
67
67
  "address.placeholder": "Вставте адресу",
68
68
  "address.invalid.evm": "Некоректна адреса: очікується 0x і 40 шістнадцяткових символів",
@@ -1,4 +1,4 @@
1
- import { type AnchorHTMLAttributes, type ButtonHTMLAttributes, type HTMLAttributes, type IframeHTMLAttributes, type ReactNode } from "react";
1
+ import { type AnchorHTMLAttributes, type ButtonHTMLAttributes, type HTMLAttributes, type ReactNode } from "react";
2
2
  import * as ui from "../../ui/index.js";
3
3
  import { type PartStyleProps } from "../part.js";
4
4
  type DivProps = Omit<HTMLAttributes<HTMLDivElement>, "className" | "style" | "children"> & PartStyleProps & {
@@ -50,12 +50,23 @@ export declare const RestartButton: import("react").ForwardRefExoticComponent<Om
50
50
  export declare const MethodNotice: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "style" | "children" | "className"> & ui.PartStyleProps & {
51
51
  children?: ReactNode;
52
52
  } & import("react").RefAttributes<HTMLDivElement>>;
53
- export type OnrampProps = Omit<IframeHTMLAttributes<HTMLIFrameElement>, "className" | "style" | "src"> & PartStyleProps & {
54
- display?: "embed" | "tab";
53
+ export type OnrampDisplay = "tab" | "embed";
54
+ /**
55
+ * The card on-ramp is Coindisco. `display="tab"` (the default) is a link that
56
+ * opens it in a new tab, which works on any site. `display="embed"` frames it on
57
+ * your page; Coindisco lets itself be framed only on the origins listed in its
58
+ * dashboard, so ask Binodex to list your site first. The new-tab link stays
59
+ * under the frame: on a site that is not listed the frame is blank, and the link
60
+ * is the way through. `ref`, `className` and `style` are always that link's.
61
+ */
62
+ export type OnrampProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "className" | "style" | "href"> & PartStyleProps & {
63
+ display?: OnrampDisplay;
64
+ /** Frame height in pixels with `display="embed"`. */
55
65
  height?: number;
56
66
  };
57
- export declare const Onramp: import("react").ForwardRefExoticComponent<Omit<IframeHTMLAttributes<HTMLIFrameElement>, "style" | "src" | "className"> & ui.PartStyleProps & {
58
- display?: "embed" | "tab";
67
+ export declare const Onramp: import("react").ForwardRefExoticComponent<Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "style" | "className" | "href"> & ui.PartStyleProps & {
68
+ display?: OnrampDisplay;
69
+ /** Frame height in pixels with `display="embed"`. */
59
70
  height?: number;
60
- } & import("react").RefAttributes<HTMLIFrameElement>>;
71
+ } & import("react").RefAttributes<HTMLAnchorElement>>;
61
72
  export {};
@@ -249,7 +249,9 @@ export const MethodNotice = forwardRef(function MethodNotice({ className, style,
249
249
  return null;
250
250
  return (_jsx(ui.Notice, { ...rest, ref: ref, part: "method-notice", variant: "receipt", className: className, style: style, unstyled: unstyled, children: children ?? root.t("fiat.receiptMayBeNeeded") }));
251
251
  });
252
- export const Onramp = forwardRef(function Onramp({ display = "embed", height = 560, className, style, unstyled, title, ...rest }, ref) {
252
+ /** Allows the frame what the widget's checkout and identity check use. */
253
+ const ONRAMP_FRAME_ALLOW = "payment; clipboard-write; camera; microphone";
254
+ export const Onramp = forwardRef(function Onramp({ display = "tab", height = 640, className, style, unstyled, ...rest }, ref) {
253
255
  const { root, actions, state } = useDeposit("<Pay.Onramp>");
254
256
  const active = state?.step === "onramp";
255
257
  useEffect(() => {
@@ -265,8 +267,8 @@ export const Onramp = forwardRef(function Onramp({ display = "embed", height = 5
265
267
  if (!url || !/^https:\/\//i.test(url)) {
266
268
  return state.onrampLoading ? _jsx(ui.Loader, { unstyled: unstyled }) : null;
267
269
  }
268
- if (display === "tab") {
269
- return (_jsx(ui.SubmitLink, { part: "onramp", href: url, className: className, style: style, unstyled: unstyled, "data-display": "tab", children: root.t("onramp.open") }));
270
+ if (display !== "embed") {
271
+ return (_jsx(ui.SubmitLink, { ...rest, ref: ref, part: "onramp", href: url, className: className, style: style, unstyled: unstyled, "data-display": "tab", children: root.t("onramp.open") }));
270
272
  }
271
- return (_jsx("iframe", { title: title ?? root.t("onramp.title"), allow: "accelerometer; autoplay; camera; gyroscope; payment; clipboard-write", referrerPolicy: "no-referrer", height: height, ...rest, ref: ref, src: url, ...partProps("onramp", { className, style: { width: "100%", border: 0, ...style }, unstyled }, root.unstyled), "data-display": "embed" }));
273
+ return (_jsxs(_Fragment, { children: [_jsx("iframe", { title: root.t("onramp.title"), src: url, height: height, allow: ONRAMP_FRAME_ALLOW, ...partProps("onramp-frame", { style: { width: "100%", border: 0 }, unstyled }, root.unstyled) }), _jsx(ui.LinkAnchor, { ...rest, ref: ref, part: "onramp", href: url, className: className, style: style, unstyled: unstyled, "data-display": "embed", children: root.t("onramp.open") })] }));
272
274
  });
@@ -6,7 +6,7 @@ export { CurrencyPicker, MethodPicker, NetworkPicker } from "./components/picker
6
6
  export type { CurrencyPickerProps, MethodOption, MethodPickerProps, NetworkPickerProps, } from "./components/pickers.js";
7
7
  export { AddressInput, AmountInput, PhoneInput, TwoFactorInput } from "./components/inputs.js";
8
8
  export { Countdown, CryptoAddress, MethodNotice, Onramp, ReceiptUpload, RedirectButton, Requisites, RequisitesFrame, RestartButton, } from "./components/deposit.js";
9
- export type { OnrampProps, RequisitesFrameProps, RequisitesProps } from "./components/deposit.js";
9
+ export type { OnrampDisplay, OnrampProps, RequisitesFrameProps, RequisitesProps } from "./components/deposit.js";
10
10
  export { Quote, SlippageWarning, Status } from "./components/status.js";
11
11
  export type { StatusProps } from "./components/status.js";
12
12
  export { Qr } from "./components/Qr.js";
@@ -1,6 +1,7 @@
1
1
  import { type ComponentType, type HTMLAttributes } from "react";
2
2
  import * as ui from "../../ui/index.js";
3
3
  import { type PartStyleProps } from "../part.js";
4
+ import { type OnrampDisplay } from "../components/deposit.js";
4
5
  export interface DepositFormComponents {
5
6
  Loader: ComponentType;
6
7
  ErrorMessage: ComponentType;
@@ -21,12 +22,19 @@ export interface DepositFormComponents {
21
22
  ReceiptUpload: ComponentType;
22
23
  RedirectButton: ComponentType;
23
24
  RestartButton: ComponentType;
24
- Onramp: ComponentType;
25
+ /** Gets the form's `onrampDisplay`. */
26
+ Onramp: ComponentType<{
27
+ display?: OnrampDisplay;
28
+ }>;
25
29
  Status: ComponentType;
26
30
  }
27
31
  export type DepositFormProps = Omit<HTMLAttributes<HTMLDivElement>, "className" | "style" | "children"> & PartStyleProps & {
28
32
  components?: Partial<DepositFormComponents>;
33
+ /** How the card on-ramp opens: `"tab"` (default) or `"embed"`, see `<Pay.Onramp display>`. */
34
+ onrampDisplay?: OnrampDisplay;
29
35
  };
30
36
  export declare const DepositForm: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "style" | "children" | "className"> & ui.PartStyleProps & {
31
37
  components?: Partial<DepositFormComponents>;
38
+ /** How the card on-ramp opens: `"tab"` (default) or `"embed"`, see `<Pay.Onramp display>`. */
39
+ onrampDisplay?: OnrampDisplay;
32
40
  } & import("react").RefAttributes<HTMLDivElement>>;
@@ -55,7 +55,7 @@ const screenOf = (state, cryptoOpen) => {
55
55
  return "credited";
56
56
  return "paying";
57
57
  };
58
- export const DepositForm = forwardRef(function DepositForm({ components, className, style, unstyled, ...rest }, ref) {
58
+ export const DepositForm = forwardRef(function DepositForm({ components, onrampDisplay, className, style, unstyled, ...rest }, ref) {
59
59
  const { root, state } = useDepositFlowStore("<Pay.DepositForm>");
60
60
  const picker = useStoreValue(root.picker);
61
61
  const screen = screenOf(state, picker.cryptoOpen);
@@ -81,7 +81,7 @@ export const DepositForm = forwardRef(function DepositForm({ components, classNa
81
81
  body = (_jsx(ui.PayBody, { unstyled: isUnstyled, children: _jsx(c.ErrorMessage, {}) }));
82
82
  break;
83
83
  case "entry":
84
- body = (_jsxs(ui.PayBody, { unstyled: isUnstyled, children: [_jsx(c.MethodPicker, {}), fiatSelected ? (_jsxs("div", { className: isUnstyled ? undefined : "bp-rail-form", children: [_jsx(c.AmountInput, {}), _jsx(c.PhoneInput, {}), _jsx(c.MethodNotice, {}), _jsx(c.Quote, {}), _jsx(c.ErrorMessage, {}), _jsx(c.SubmitButton, {})] })) : onrampSelected ? (_jsxs("div", { className: isUnstyled ? undefined : "bp-onramp-tab", children: [_jsx(c.Onramp, {}), _jsx("p", { className: isUnstyled ? undefined : "bp-onramp-note", "data-binodex-pay": "onramp-note", children: root.t("onramp.disclosure") })] })) : (_jsx(c.ErrorMessage, {}))] }));
84
+ body = (_jsxs(ui.PayBody, { unstyled: isUnstyled, children: [_jsx(c.MethodPicker, {}), fiatSelected ? (_jsxs("div", { className: isUnstyled ? undefined : "bp-rail-form", children: [_jsx(c.AmountInput, {}), _jsx(c.PhoneInput, {}), _jsx(c.MethodNotice, {}), _jsx(c.Quote, {}), _jsx(c.ErrorMessage, {}), _jsx(c.SubmitButton, {})] })) : onrampSelected ? (_jsxs("div", { className: isUnstyled ? undefined : "bp-onramp-tab", children: [_jsx(c.Onramp, { display: onrampDisplay }), state?.onrampUrl ? (_jsx("p", { className: isUnstyled ? undefined : "bp-onramp-note", "data-binodex-pay": "onramp-note", children: root.t("onramp.disclosure") })) : null] })) : (_jsx(c.ErrorMessage, {}))] }));
85
85
  break;
86
86
  case "crypto":
87
87
  body = (_jsxs(ui.PayBody, { variant: "address", unstyled: isUnstyled, children: [_jsx(ui.Divider, { unstyled: isUnstyled }), _jsxs(ui.RouteGrid, { unstyled: isUnstyled, children: [_jsx(c.CurrencyPicker, {}), _jsx(c.NetworkPicker, {})] }), _jsx(c.ErrorMessage, {}), _jsx(c.CryptoAddress, {})] }));
package/dist/elements.css CHANGED
@@ -2745,12 +2745,6 @@
2745
2745
  opacity: 0;
2746
2746
  }
2747
2747
 
2748
- .bp-onramp {
2749
- display: block;
2750
- border-radius: var(--bp-radius-sm);
2751
- background: var(--bp-color-surface);
2752
- }
2753
-
2754
2748
  .bp-onramp-tab {
2755
2749
  display: flex;
2756
2750
  flex-direction: column;
@@ -2759,6 +2753,12 @@
2759
2753
  animation: bp-content-enter 0.22s ease 0.06s both;
2760
2754
  }
2761
2755
 
2756
+ .bp-onramp-frame {
2757
+ display: block;
2758
+ border-radius: var(--bp-radius-sm);
2759
+ background: var(--bp-color-surface);
2760
+ }
2761
+
2762
2762
  .bp-onramp-note {
2763
2763
  margin: 0;
2764
2764
  font-size: 11px;
@@ -42,12 +42,18 @@ export declare const SubmitButton: import("react").ForwardRefExoticComponent<Omi
42
42
  part?: string;
43
43
  pending?: boolean;
44
44
  } & import("react").RefAttributes<HTMLButtonElement>>;
45
+ type AnchorProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "className" | "style"> & PartStyleProps & {
46
+ variant?: ButtonVariant;
47
+ part?: string;
48
+ };
45
49
  export declare const SubmitLink: import("react").ForwardRefExoticComponent<Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "style" | "className"> & PartStyleProps & {
46
50
  variant?: ButtonVariant;
47
51
  part?: string;
48
52
  } & import("react").RefAttributes<HTMLAnchorElement>>;
49
53
  export declare const RetryButton: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "pending" | "variant"> & import("react").RefAttributes<HTMLButtonElement>>;
50
54
  export declare const LinkButton: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "pending" | "variant"> & import("react").RefAttributes<HTMLButtonElement>>;
55
+ /** `LinkButton` as a link: the secondary action that opens `href` in a new tab. */
56
+ export declare const LinkAnchor: import("react").ForwardRefExoticComponent<Omit<AnchorProps, "variant"> & import("react").RefAttributes<HTMLAnchorElement>>;
51
57
  export type ErrorBoxVariant = "deposit" | "rail" | "withdraw";
52
58
  export declare const ErrorBox: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLDivElement>, "style" | "children" | "className"> & PartStyleProps & {
53
59
  variant?: ErrorBoxVariant;
package/dist/ui/fields.js CHANGED
@@ -48,6 +48,11 @@ export const LinkButton = forwardRef(function LinkButton({ part = "link-button",
48
48
  const { off } = useClasses(unstyled);
49
49
  return (_jsx("button", { type: type, ...rest, ref: ref, ...viewProps(part, "link-button", { className, style, unstyled }, off), children: children }));
50
50
  });
51
+ /** `LinkButton` as a link: the secondary action that opens `href` in a new tab. */
52
+ export const LinkAnchor = forwardRef(function LinkAnchor({ part = "link-anchor", className, style, unstyled, children, ...rest }, ref) {
53
+ const { off } = useClasses(unstyled);
54
+ return (_jsx("a", { target: "_blank", rel: "noopener noreferrer", referrerPolicy: "no-referrer", ...rest, ref: ref, ...viewProps(part, "link-button", { className, style, unstyled }, off), children: children }));
55
+ });
51
56
  export const ErrorBox = forwardRef(function ErrorBox({ variant = "deposit", part = "error-box", className, style, unstyled, children, ...rest }, ref) {
52
57
  const { off } = useClasses(unstyled);
53
58
  return (_jsx("div", { role: "alert", ...rest, ref: ref, ...viewProps(part, "error-box", { className, style, unstyled }, off), "data-variant": variant, children: children }));
@@ -6,7 +6,7 @@ export { CardTab, EntryOptions, EntryTabs, IconStack, cryptoStackIcons } from ".
6
6
  export type { EntryOptionsProps, EntryTabsProps } from "./entry.js";
7
7
  export { CountrySelect, Field, MethodGrid, MethodsNotice, RouteColumn, RouteGrid, RoutePicker } from "./pickers.js";
8
8
  export type { CountrySelectProps, FieldProps, MethodGridProps, RouteColumnProps, RoutePickerProps } from "./pickers.js";
9
- export { AmountField, ErrorBox, Hint, LinkButton, Loader, RetryButton, Notice, Skeleton, SubmitButton, SubmitLink, TextField, TwoFactorField, } from "./fields.js";
9
+ export { AmountField, ErrorBox, Hint, LinkAnchor, LinkButton, Loader, RetryButton, Notice, Skeleton, SubmitButton, SubmitLink, TextField, TwoFactorField, } from "./fields.js";
10
10
  export type { AmountFieldProps, ButtonVariant, ErrorBoxVariant, FieldVariant, SkeletonProps, TextFieldProps, TwoFactorFieldProps, } from "./fields.js";
11
11
  export { DetailsAccordion, QuoteRows, Summary } from "./summary.js";
12
12
  export type { DetailsAccordionProps, QuoteRowsProps, SummaryProps } from "./summary.js";
package/dist/ui/index.js CHANGED
@@ -3,7 +3,7 @@ export { DEFAULT_ASSET_BASE_URL, PayUiProvider, PayUiRoot, PayUiValueProvider, b
3
3
  export { BackButton, BrandLogo, CloseButton, Divider, PayBody, PayCard, PayHeader } from "./layout.js";
4
4
  export { CardTab, EntryOptions, EntryTabs, IconStack, cryptoStackIcons } from "./entry.js";
5
5
  export { CountrySelect, Field, MethodGrid, MethodsNotice, RouteColumn, RouteGrid, RoutePicker } from "./pickers.js";
6
- export { AmountField, ErrorBox, Hint, LinkButton, Loader, RetryButton, Notice, Skeleton, SubmitButton, SubmitLink, TextField, TwoFactorField, } from "./fields.js";
6
+ export { AmountField, ErrorBox, Hint, LinkAnchor, LinkButton, Loader, RetryButton, Notice, Skeleton, SubmitButton, SubmitLink, TextField, TwoFactorField, } from "./fields.js";
7
7
  export { DetailsAccordion, QuoteRows, Summary } from "./summary.js";
8
8
  export { CopyButton, CreditBanner, CryptoAddressCard, LTR_ISOLATE, QrCode, QrSvg, useCopy } from "./crypto.js";
9
9
  export { ExpiresLine, GeoBlock, PanelAmount, PanelHint, PayActions, PayingPanel, PdfReceiptWarning, PollNotice, QrImageCard, RailForm, RECEIPT_MAX_BYTES, ReceiptAttached, ReceiptBlock, ReceiptForm, Requisites, StatusPanel, StatusPill, isPdfFile, } from "./fiat.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@binopartner/pay-sdk",
3
- "version": "0.3.2",
3
+ "version": "0.3.4",
4
4
  "license": "UNLICENSED",
5
5
  "repository": {
6
6
  "type": "git",