@alfadocs/ui-kit-debug 1.46.0 → 1.47.0
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/dist/_chunks/booking-C4MwImkS.js +3362 -0
- package/dist/_chunks/booking-C4MwImkS.js.map +1 -0
- package/dist/_chunks/calendar-workspace-DDnQmiIL.js +12427 -0
- package/dist/_chunks/calendar-workspace-DDnQmiIL.js.map +1 -0
- package/dist/_chunks/{freemium-paywall-Cz-O9lQD.js → freemium-paywall-BaW5ODc9.js} +2 -2
- package/dist/_chunks/{freemium-paywall-Cz-O9lQD.js.map → freemium-paywall-BaW5ODc9.js.map} +1 -1
- package/dist/_chunks/{patient-details-DUj1htsH.js → patient-details-yrgkSeEY.js} +2 -2
- package/dist/_chunks/{patient-details-DUj1htsH.js.map → patient-details-yrgkSeEY.js.map} +1 -1
- package/dist/_chunks/{patient-field-row-CO0WR7yA.js → patient-field-row-DCMkFGqI.js} +2 -2
- package/dist/_chunks/{patient-field-row-CO0WR7yA.js.map → patient-field-row-DCMkFGqI.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-DNzdYjxE.js → patient-summary-card-CmEFflGS.js} +2 -2
- package/dist/_chunks/{patient-summary-card-DNzdYjxE.js.map → patient-summary-card-CmEFflGS.js.map} +1 -1
- package/dist/_chunks/payment-form-DqJFiplX.js +881 -0
- package/dist/_chunks/payment-form-DqJFiplX.js.map +1 -0
- package/dist/_chunks/{phone-input-BsZIoE36.js → phone-input-IWrGOCwm.js} +40 -39
- package/dist/_chunks/{phone-input-BsZIoE36.js.map → phone-input-IWrGOCwm.js.map} +1 -1
- package/dist/_chunks/{stepper-accordion-DmVykr5F.js → stepper-accordion-jMR8NaOB.js} +2 -1
- package/dist/_chunks/{stepper-accordion-DmVykr5F.js.map → stepper-accordion-jMR8NaOB.js.map} +1 -1
- package/dist/agent-catalog.json +5 -4
- package/dist/agent-i18n/en.json +2 -2
- package/dist/components/booking/booking-types.d.ts +60 -1
- package/dist/components/booking/booking-types.d.ts.map +1 -1
- package/dist/components/booking/booking.agent.d.ts.map +1 -1
- package/dist/components/booking/booking.d.ts +1 -1
- package/dist/components/booking/booking.d.ts.map +1 -1
- package/dist/components/booking/details-form.d.ts +5 -1
- package/dist/components/booking/details-form.d.ts.map +1 -1
- package/dist/components/booking/index.d.ts +1 -1
- package/dist/components/booking/index.d.ts.map +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/booking/payment.d.ts +9 -0
- package/dist/components/booking/payment.d.ts.map +1 -0
- package/dist/components/booking/use-booking-payment.d.ts +14 -0
- package/dist/components/booking/use-booking-payment.d.ts.map +1 -0
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/payment-form/index.d.ts +1 -1
- package/dist/components/payment-form/index.d.ts.map +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/payment-form/payment-form.d.ts +35 -3
- package/dist/components/payment-form/payment-form.d.ts.map +1 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/phone-input/phone-input.d.ts.map +1 -1
- package/dist/components/stepper-accordion/index.js +1 -1
- package/dist/components/stepper-accordion/stepper-accordion.d.ts.map +1 -1
- package/dist/i18n/locales/ar.d.ts +36 -1
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +36 -1
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +36 -1
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +36 -1
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +36 -1
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +36 -1
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +36 -1
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +36 -1
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +36 -1
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +36 -1
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +36 -1
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +36 -1
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +36 -1
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +36 -1
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +36 -1
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +36 -1
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +36 -1
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +36 -1
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +36 -1
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +36 -1
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +36 -1
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +36 -1
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +36 -1
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +36 -1
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +36 -1
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +36 -1
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +36 -1
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +36 -1
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +36 -1
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +36 -1
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +36 -1
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +36 -1
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +36 -1
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +36 -1
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +36 -1
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +36 -1
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +8 -8
- package/dist/locales/ar.json +36 -1
- package/dist/locales/de.json +36 -1
- package/dist/locales/el.json +36 -1
- package/dist/locales/en.json +36 -1
- package/dist/locales/es.json +36 -1
- package/dist/locales/fr.json +36 -1
- package/dist/locales/hi.json +36 -1
- package/dist/locales/it.json +36 -1
- package/dist/locales/ja.json +36 -1
- package/dist/locales/nl.json +36 -1
- package/dist/locales/pl.json +36 -1
- package/dist/locales/pt.json +36 -1
- package/dist/locales/ro.json +36 -1
- package/dist/locales/ru.json +36 -1
- package/dist/locales/sq.json +36 -1
- package/dist/locales/sv.json +36 -1
- package/dist/locales/tr.json +36 -1
- package/dist/locales/zh.json +36 -1
- package/dist/patterns/calendar/calendar-bookings-panel.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-editor-fields.d.ts +33 -0
- package/dist/patterns/calendar/calendar-editor-fields.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-sticky-offset.d.ts +20 -0
- package/dist/patterns/calendar/calendar-sticky-offset.d.ts.map +1 -0
- package/dist/patterns/calendar/calendar-task-editor.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar-workspace.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.data.d.ts +17 -0
- package/dist/patterns/calendar/calendar.data.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.sheets.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.surface.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.types.d.ts +24 -10
- package/dist/patterns/calendar/calendar.types.d.ts.map +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/booking-B7gA9gFB.js +0 -3017
- package/dist/_chunks/booking-B7gA9gFB.js.map +0 -1
- package/dist/_chunks/calendar-workspace-BB-BZT7W.js +0 -12251
- package/dist/_chunks/calendar-workspace-BB-BZT7W.js.map +0 -1
- package/dist/_chunks/payment-form-BHMDqW9C.js +0 -767
- package/dist/_chunks/payment-form-BHMDqW9C.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-form-DqJFiplX.js","sources":["../../src/tokens/themes/bridges/stripe-appearance.ts","../../src/components/payment-form/payment-form.agent.ts","../../src/components/payment-form/payment-form.tsx"],"sourcesContent":["import type { Appearance } from '@stripe/stripe-js';\n\n/**\n * Reads the current design-system tokens from a theme-root element and maps\n * them to Stripe Elements' Appearance API. `root` defaults to\n * `document.documentElement` but consumers can pass a scoped theme wrapper\n * (e.g. a modal with its own `.theme-accessible` override) so that Stripe\n * iframes pick up the right token set.\n *\n * Tokens referenced: --primary, --background, --foreground, --muted,\n * --muted-foreground, --border, --destructive, --radius-md, --font-sans,\n * --font-size-base, --spacing-sm, --animation-duration, --focus-ring-width,\n * --ring.\n *\n * No hex / rgb / hsl literals — every value flows from the token layer.\n */\n\nfunction isBrowser(): boolean {\n return typeof document !== 'undefined' && typeof window !== 'undefined';\n}\n\nexport function getStripeAppearance(root?: HTMLElement): Appearance {\n if (!isBrowser()) {\n return { theme: 'stripe' };\n }\n\n const target = root ?? document.documentElement;\n const styles = getComputedStyle(target);\n const read = (token: string) => styles.getPropertyValue(token).trim();\n const isDark = target.classList.contains('theme-dark');\n\n return {\n theme: isDark ? 'night' : 'stripe',\n variables: {\n colorPrimary: read('--primary'),\n colorBackground: read('--background'),\n colorText: read('--foreground'),\n colorDanger: read('--destructive'),\n colorTextSecondary: read('--muted-foreground'),\n colorTextPlaceholder: read('--muted-foreground'),\n borderRadius: read('--radius-md'),\n fontFamily: read('--font-sans'),\n fontSizeBase: read('--font-size-base'),\n // Stripe multiplies spacingUnit throughout every Element; --spacing-sm\n // gives readable density. Keep this in sync with the JSDoc above.\n spacingUnit: read('--spacing-sm'),\n },\n rules: {\n '.Input': {\n backgroundColor: read('--background'),\n border: `1px solid ${read('--border')}`,\n color: read('--foreground'),\n padding: read('--spacing-sm'),\n transition: `border-color ${read('--animation-duration')} ease-out`,\n },\n '.Input:focus': {\n borderColor: read('--primary'),\n boxShadow: `0 0 0 ${read('--focus-ring-width')} ${read('--ring')}`,\n outline: 'none',\n },\n '.Input--invalid': {\n borderColor: read('--destructive'),\n color: read('--foreground'),\n },\n '.Label': {\n color: read('--foreground'),\n fontWeight: read('--font-weight-medium'),\n fontSize: read('--font-size-sm'),\n },\n '.Error': {\n color: read('--destructive'),\n fontSize: read('--font-size-sm'),\n },\n '.Tab': {\n border: `1px solid ${read('--border')}`,\n backgroundColor: read('--background'),\n color: read('--foreground'),\n },\n '.Tab--selected': {\n borderColor: read('--primary'),\n backgroundColor: read('--background'),\n color: read('--primary'),\n },\n // Accordion method rows (the `accordion` layout): keep Stripe's native\n // per-method card structure, restyled with our tokens — our border +\n // radius, our background, `--primary` on the selected row, no extra shadow.\n '.AccordionItem': {\n backgroundColor: read('--background'),\n border: `1px solid ${read('--border')}`,\n borderRadius: read('--radius-md'),\n boxShadow: 'none',\n },\n '.AccordionItem--selected': {\n borderColor: read('--primary'),\n backgroundColor: read('--background'),\n },\n // Stripe's in-method notice blocks (e.g. PayPal's \"you'll be redirected\")\n // otherwise render in their own bordered box — a card nested inside the\n // selected method card. Flatten to inline icon + text, no inner box.\n '.Block': {\n border: 'none',\n borderRadius: '0',\n boxShadow: 'none',\n backgroundColor: 'transparent',\n },\n },\n };\n}\n\n/**\n * Calls `onChange(getStripeAppearance(root))` whenever the theme root's\n * class list mutates (theme switch) or the user toggles\n * `prefers-color-scheme` / `prefers-reduced-motion`. Returns an\n * unsubscribe function.\n */\nexport function subscribeStripeAppearance(\n onChange: (next: Appearance) => void,\n root?: HTMLElement,\n): () => void {\n if (!isBrowser()) return () => undefined;\n\n const target = root ?? document.documentElement;\n const emit = () => onChange(getStripeAppearance(root));\n\n const observer = new MutationObserver(emit);\n observer.observe(target, {\n attributes: true,\n attributeFilter: ['class', 'dir', 'lang'],\n });\n\n const schemeMql = window.matchMedia('(prefers-color-scheme: dark)');\n const motionMql = window.matchMedia('(prefers-reduced-motion: reduce)');\n schemeMql.addEventListener('change', emit);\n motionMql.addEventListener('change', emit);\n\n return () => {\n observer.disconnect();\n schemeMql.removeEventListener('change', emit);\n motionMql.removeEventListener('change', emit);\n };\n}\n","import type { AgentAdapter } from '../../agent/types';\nimport type { PaymentFormHandle } from './payment-form';\n\nexport const paymentFormAgent: AgentAdapter<PaymentFormHandle> = {\n id: 'payment-form',\n capabilities: ['submit'],\n // The kit's only destructive + openWorld action that moves real money,\n // so it is also the one that most needs to be verifiable. `submit`\n // resolves once the charge attempt has settled; these four slots are\n // how an agent then tells success from decline from never-fired, and\n // how it recovers the receipt.\n //\n // A9: the PaymentIntent id and the i18n error KEY only. Never card\n // fields (they live in Stripe's cross-origin iframes and never reach\n // this origin), never the translated Stripe message, never\n // `clientSecret`.\n state: {\n status: {\n type: \"'idle' | 'processing' | 'succeeded' | 'failed'\",\n descriptionKey: 'ui.agent.paymentForm.state.status',\n description:\n 'Lifecycle of the current payment attempt. `succeeded` is only reached once Stripe confirmed the PaymentIntent; `failed` covers validation, decline and processor errors alike. Still `idle` after `submit` means the attempt never fired — Stripe had not mounted.',\n read: (handle) => handle.getStatus(),\n },\n complete: {\n type: 'boolean',\n descriptionKey: 'ui.agent.paymentForm.state.complete',\n description:\n 'True when Stripe reports the payment fields, and any required billing address, as complete. Read this before `submit` — outside preview mode the submit control is disabled while it is false, so the call will not be accepted.',\n read: (handle) => handle.isComplete(),\n },\n errorKey: {\n type: 'string | null',\n descriptionKey: 'ui.agent.paymentForm.state.errorKey',\n description:\n 'i18n key of the current error (e.g. `payment.error.cardDeclined`), or null. The key is the structural datum — the translated message is free text and is never exposed.',\n read: (handle) => handle.getErrorKey(),\n },\n paymentIntentId: {\n type: 'string | null',\n descriptionKey: 'ui.agent.paymentForm.state.paymentIntentId',\n description:\n 'Opaque Stripe PaymentIntent id once a charge succeeded, else null. The receipt — the attribution handle for the money that moved. Never the client secret.',\n read: (handle) => handle.getPaymentIntentId(),\n },\n },\n actions: {\n submit: {\n safety: 'destructive',\n // Charges an external payment processor — irreversible, hits a system\n // outside this UI.\n openWorld: true,\n returns: 'Promise<void>',\n errors: [\n 'Validation failed (incomplete or invalid card details) — `status` is \"failed\", `errorKey` names which.',\n 'Payment was declined by the processor — `status` is \"failed\", `errorKey` is `payment.error.cardDeclined`.',\n 'Network or processor error during the charge — `status` is \"failed\".',\n 'Stripe had not mounted, so nothing was attempted — `status` is still \"idle\".',\n ],\n descriptionKey: 'ui.agent.paymentForm.actions.submit',\n description:\n 'Submit the payment. Charges the configured payment method — irreversible. Resolves once the attempt has settled; the outcome is never in the resolved value, so read `status`, then `errorKey` on failure or `paymentIntentId` on success.',\n invoke: (handle) => handle.submit(),\n },\n reset: {\n safety: 'destructive',\n idempotent: true,\n descriptionKey: 'ui.agent.paymentForm.actions.reset',\n description:\n 'Clear recoverable errors and return their status to \"idle\". Stripe fields remain unchanged. Pending or paid attempts cannot be reset and require a new session.',\n invoke: (handle) => {\n handle.reset();\n },\n },\n },\n domHooks: {\n root: { attr: 'data-component', value: 'payment-form' },\n instanceId: {\n attr: 'data-component-id',\n sourceProp: 'id',\n description: 'Sourced from the id prop.',\n },\n },\n};\n","/* ------------------------------------------------------------------ */\n/* PaymentForm — Stripe Elements wrapper (PCI DSS SAQ-A). */\n/* */\n/* - Library: `@stripe/react-stripe-js` + `@stripe/stripe-js` (see */\n/* `src/docs/08-third-party.mdx §Payments`). Card number, expiry, */\n/* CVC, and postal code all live inside Stripe-hosted iframes on */\n/* `js.stripe.com` — raw PAN never touches our origin, keeping us */\n/* inside PCI DSS SAQ-A scope. */\n/* */\n/* - Theming: the `stripe-appearance` bridge snapshots our tokens into */\n/* Stripe's Appearance API (`variables`, `rules`). A */\n/* `MutationObserver` on `<html class>` re-runs the snapshot when */\n/* the user flips theme so the embedded iframes repaint. */\n/* */\n/* - Security invariants enforced in this file: */\n/* 1. No `<input type=\"tel\" name=\"card\">` anywhere. */\n/* 2. Error strings are sanitised via `stripCardLikeDigits` before */\n/* forwarding to `onError` (replaces any `\\b\\d{4,}\\b` with */\n/* `****`). */\n/* 3. Element change events are never logged; any dev-only logging */\n/* is gated behind `import.meta.env.DEV` — never runs in prod. */\n/* */\n/* TODO: */\n/* - Stripe's `direction: 'rtl'` is not part of the current */\n/* `Appearance` TypeScript type; we rely on CSS mirroring of our */\n/* chrome via logical properties and let Stripe lay out the iframe */\n/* ltr for now. Revisit when @stripe/stripe-js publishes the type. */\n/* - No `<CardNumberElement>` / split-fields story — `PaymentElement` */\n/* handles tabs + card-only modes via its own `layout` option. */\n/* ------------------------------------------------------------------ */\n\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n type FormEvent,\n type ReactElement,\n} from 'react';\nimport { cva } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { Spinner } from '../spinner';\nimport { Alert } from '../alert';\nimport { loadStripe } from '@stripe/stripe-js/pure';\nimport type {\n Stripe,\n Appearance,\n StripeElementLocale,\n StripeElementsOptions,\n} from '@stripe/stripe-js';\nimport {\n Elements,\n PaymentElement,\n AddressElement,\n useElements,\n useStripe,\n} from '@stripe/react-stripe-js';\n\nimport {\n getStripeAppearance,\n subscribeStripeAppearance,\n} from '../../tokens/themes/bridges/stripe-appearance';\nimport { useAgentRegistration } from '../../agent/registry';\nimport { paymentFormAgent } from './payment-form.agent';\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport type PaymentCurrency = string; // ISO-4217\n\n/** Stripe's known PaymentIntent states. Only `succeeded` means paid. */\nexport type PaymentFormIntentStatus =\n | 'requires_payment_method'\n | 'requires_confirmation'\n | 'requires_action'\n | 'processing'\n | 'requires_capture'\n | 'canceled'\n | 'succeeded';\n\n/** Complete invoicing address only. Never contains card details. */\nexport interface PaymentFormBillingDetails {\n name: string;\n address: {\n line1: string;\n line2: string | null;\n city: string;\n state: string;\n postalCode: string;\n country: string;\n };\n}\n\nexport interface PaymentFormProps {\n /** Opaque instance id — emitted as `data-component-id` for the agent registry. */\n id?: string;\n /**\n * Client secret from your server, created via the PaymentIntents API.\n *\n * Omit to use **deferred-intent mode** — the Payment Element renders from\n * just the publishable key (no `clientSecret`, no backend round-trip up\n * front). In deferred mode supply `onCreatePaymentIntent` to actually\n * confirm: your server mints + returns the client secret at submit time.\n */\n clientSecret?: string;\n /**\n * Deferred-intent setup: `'payment'` collects a charge, `'setup'` saves a\n * method for later. Ignored when `clientSecret` is supplied (the secret's\n * own intent type wins). Defaults to `'payment'`.\n */\n mode?: 'payment' | 'setup';\n /** Restrict deferred Elements to cards. With a client secret, the server intent controls methods. */\n cardOnly?: boolean;\n /**\n * Deferred-confirm callback. Called at submit time (after client-side\n * field validation succeeds) so your server can mint a PaymentIntent and\n * return its `client_secret`. The returned secret is used ONLY to confirm\n * and is never logged or sent to any third-party origin. When omitted in\n * deferred mode the form runs in PREVIEW: fields render + validate, but no\n * charge is attempted.\n */\n onCreatePaymentIntent?: () => Promise<string>;\n /** Preview-only validation completed. Awaited without creating or confirming a payment. */\n onPreviewValidated?: () => void | Promise<void>;\n /** Stripe publishable key (`pk_test_…` / `pk_live_…`). */\n publishableKey: string;\n /** Connected account used to create the intent. Ignored by an injected Stripe instance. */\n stripeAccount?: string;\n /** ISO-4217 currency code (e.g. 'EUR', 'USD', 'JPY'). */\n currency: PaymentCurrency;\n /** Amount in the currency's smallest unit (cents for EUR/USD, yen for JPY). */\n amount: number;\n /** Called with the PaymentIntent id on successful confirmation. */\n onSuccess?: (paymentIntentId: string) => void;\n /** Observes confirmed intent states, including payments still awaiting completion. */\n onPaymentStatusChange?: (\n status: PaymentFormIntentStatus,\n paymentIntentId: string,\n ) => void;\n /** Called with a sanitised error (no PAN digits, no Stripe English strings). */\n onError?: (error: { code: string; translatedMessage: string }) => void;\n /** Show the billing-address collector below the payment fields. */\n billingAddress?: boolean;\n /** Show and require a complete billing address before confirming payment. */\n requireBillingAddress?: boolean;\n /** Initial name/address for each Elements session. Does not enable or validate the collector. */\n defaultBillingDetails?: PaymentFormBillingDetails;\n /**\n * Save complete billing details before confirmation or any redirect. Enables\n * the address collector; rejection blocks payment and permits a retry.\n * Not called in validation-only preview mode. Never logs or stores details.\n */\n onBillingDetails?: (\n details: PaymentFormBillingDetails,\n ) => void | Promise<void>;\n /** Locale override — defaults to the active i18next locale. */\n locale?: string;\n /** Accessible label for the form. */\n ariaLabel?: string;\n /** URL Stripe redirects to when a payment method requires it. */\n returnUrl?: string;\n /** Pre-injected Stripe instance — used by tests + stories to bypass the network. */\n stripePromise?: Promise<Stripe | null> | null;\n /**\n * Payment Element layout. `tabs` (default) renders methods as a tile row —\n * best in wide containers. `accordion` stacks them as full-width rows — use\n * it in narrow columns (< ~400px) where Stripe's tab row clips a partial tile.\n */\n layout?: 'tabs' | 'accordion';\n className?: string;\n}\n\n/**\n * Lifecycle of one payment attempt, as the agent surface reports it.\n * `succeeded` is only reached once Stripe has confirmed the\n * PaymentIntent; `failed` covers validation, decline, and processor /\n * network errors alike (read `getErrorKey()` for which).\n */\nexport type PaymentFormStatus = 'idle' | 'processing' | 'succeeded' | 'failed';\n\nexport interface PaymentFormHandle {\n /**\n * Programmatically submit the form (same flow as the Pay button).\n * Resolves only once the charge attempt has settled — read\n * `getStatus()` / `getErrorKey()` afterwards for the outcome.\n */\n submit: () => Promise<void>;\n /** Clear recoverable errors. A pending or paid attempt requires a new session. */\n reset: () => void;\n /* ---- read-back ------------------------------------------------- */\n /** Lifecycle of the current attempt. */\n getStatus: () => PaymentFormStatus;\n /**\n * True when Stripe reports the payment fields, and any required billing address, as complete. `submit`\n * is refused (the button is disabled) while this is false outside\n * preview mode.\n */\n isComplete: () => boolean;\n /**\n * i18n KEY of the current error (e.g. `payment.error.cardDeclined`),\n * or null. The translated message is deliberately not exposed — the\n * key is the structural datum, the message is free text.\n */\n getErrorKey: () => string | null;\n /**\n * Opaque Stripe PaymentIntent id once a charge succeeded, else null.\n * The receipt handle — the same id handed to `onSuccess`. Never the\n * client secret.\n */\n getPaymentIntentId: () => string | null;\n}\n\n/**\n * The read-back channel from the inner form (inside Stripe's\n * `<Elements>` provider) out to the wrapper that owns the agent handle.\n * The existing CustomEvent bridge is one-way (outer → inner), and the\n * outer cannot read through the provider, so the inner writes its\n * settled state into this ref during render and registers its submit\n * function so the wrapper's `submit()` can actually await the charge.\n */\ninterface PaymentFormAgentBridge {\n status: PaymentFormStatus;\n complete: boolean;\n errorKey: string | null;\n paymentIntentId: string | null;\n /** Set by the inner form; absent until Stripe's provider has mounted. */\n submit?: () => Promise<void>;\n}\n\n/* ------------------------------------------------------------------ */\n/* Currency helpers */\n/* ------------------------------------------------------------------ */\n\n/**\n * Currencies that Stripe bills in their base unit (no decimals). Source:\n * https://stripe.com/docs/currencies#zero-decimal — list pinned per\n * 08-third-party.mdx.\n */\nconst ZERO_DECIMAL_CURRENCIES = new Set<string>([\n 'BIF',\n 'CLP',\n 'DJF',\n 'GNF',\n 'IDR',\n 'JPY',\n 'KMF',\n 'KRW',\n 'MGA',\n 'PYG',\n 'RWF',\n 'UGX',\n 'VND',\n 'VUV',\n 'XAF',\n 'XOF',\n 'XPF',\n]);\n\nexport function formatPaymentAmount(\n amount: number,\n currency: string,\n locale: string,\n): string {\n const iso = currency.toUpperCase();\n const major = ZERO_DECIMAL_CURRENCIES.has(iso) ? amount : amount / 100;\n try {\n return new Intl.NumberFormat(locale, {\n style: 'currency',\n currency: iso,\n }).format(major);\n } catch {\n // Invalid locale/currency pair — fall back to a safe format so we\n // never leak raw amount integers into the UI.\n return new Intl.NumberFormat('en', {\n style: 'currency',\n currency: iso,\n }).format(major);\n }\n}\n\n/* ------------------------------------------------------------------ */\n/* Return URL validation */\n/* ------------------------------------------------------------------ */\n\n/**\n * Resolve `returnUrl` against the current origin. Accepts:\n * - absolute URLs on the same origin as `window.location`\n * - relative paths (resolved against the current origin)\n * Rejects (returns `null`):\n * - cross-origin URLs — would leak `payment_intent_client_secret`\n * - `javascript:` / `data:` / `file:` / `blob:` schemes\n * - SSR contexts (no `window`) — the submit path requires a browser\n * anyway, so rejecting here is the safer default.\n * See security-hardening.mdx.\n */\nexport function validateReturnUrl(\n returnUrl: string | undefined,\n): string | null {\n if (returnUrl === undefined) return null;\n const raw = returnUrl.trim();\n if (raw === '') return null;\n if (typeof window === 'undefined') return null;\n try {\n const resolved = new URL(raw, window.location.href);\n const allowedSchemes = new Set(['http:', 'https:']);\n if (!allowedSchemes.has(resolved.protocol)) return null;\n if (resolved.origin !== window.location.origin) return null;\n return resolved.toString();\n } catch {\n return null;\n }\n}\n\n/* ------------------------------------------------------------------ */\n/* Error sanitisation */\n/* ------------------------------------------------------------------ */\n\n/**\n * Replace any run of 4+ consecutive digits with `****`. Called before any\n * error text leaves the wrapper. Defensive: even though Stripe's error\n * strings don't normally contain PANs, a future SDK change could, and we\n * want a hard guarantee that `console` / analytics / Sentry breadcrumbs\n * stay clear of anything that looks like card data.\n */\nexport function stripCardLikeDigits(message: string): string {\n if (!message) return message;\n // Deliberately no word boundaries: a PAN run embedded between word\n // characters (e.g. \"CARD4242424242424242DECLINED\") must still be masked.\n return message.replace(/\\d{4,}/g, '****');\n}\n\n/**\n * Map a Stripe error code (e.g. `card_declined`, `incorrect_number`) to a\n * translation key under `payment.error.*`. Unknown codes fall through to\n * `payment.error.generic`.\n */\nexport function stripeErrorCodeToI18nKey(code: string | undefined): string {\n switch (code) {\n case 'incorrect_number':\n case 'invalid_number':\n return 'payment.error.cardNumber';\n case 'invalid_expiry_month':\n case 'invalid_expiry_year':\n case 'expired_card':\n return 'payment.error.expiry';\n case 'invalid_cvc':\n case 'incorrect_cvc':\n return 'payment.error.cvc';\n case 'incorrect_zip':\n case 'invalid_zip':\n return 'payment.error.postalCode';\n case 'card_declined':\n case 'do_not_honor':\n case 'generic_decline':\n return 'payment.error.declined';\n case 'network_error':\n case 'api_connection_error':\n return 'payment.error.network';\n case 'billing_address_incomplete':\n return 'payment.error.billingAddressIncomplete';\n case 'billing_details_save':\n return 'payment.error.billingDetailsSave';\n case 'billing_details_changed':\n return 'payment.error.billingDetailsChanged';\n default:\n return 'payment.error.generic';\n }\n}\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst formVariants = cva(\n [\n 'ds:payment-form-alfadocs ds:flex ds:flex-col',\n 'ds:gap-[var(--spacing-md)]',\n // Transparent, padding-less container — the consuming surface (a Card, the\n // check-in step, a checkout column) owns the card chrome + padding, so the\n // Stripe method boxes never read as cards nested inside another card.\n 'ds:text-[var(--foreground)]',\n 'ds:aria-disabled:opacity-[var(--opacity-50)] ds:aria-disabled:cursor-not-allowed',\n ].join(' '),\n);\n\nconst fieldLabelVariants = cva(\n ['ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]'].join(' '),\n);\n\nconst labelTextVariants = cva(\n ['type-label', 'ds:text-[var(--foreground)]'].join(' '),\n);\n\nconst amountSummaryVariants = cva(\n [\n 'ds:flex ds:items-baseline ds:justify-between',\n 'ds:gap-[var(--spacing-sm)]',\n 'ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]',\n 'ds:pt-[var(--spacing-xs)] ds:pb-[var(--spacing-xs)]',\n 'ds:bg-[var(--muted)]',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:text-[var(--foreground)]',\n ].join(' '),\n);\n\nconst submitButtonVariants = cva(\n [\n 'ds:inline-flex ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)]',\n 'ds:[min-block-size:var(--min-target-size)]',\n 'ds:[min-inline-size:var(--min-target-size)]',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n 'ds:rounded-[var(--radius-sm)]',\n 'ds:bg-[var(--primary)] ds:text-[var(--primary-foreground)]',\n 'ds:text-[length:var(--font-size-base)] ds:font-medium',\n 'ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none',\n 'ds:hover:bg-[var(--primary-hover)]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)]',\n 'ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[var(--ring)]',\n 'ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:forced-colors:focus-visible:outline-[CanvasText]',\n 'ds:aria-disabled:opacity-[var(--opacity-50)] ds:aria-disabled:cursor-not-allowed',\n 'ds:aria-busy:cursor-wait',\n ].join(' '),\n);\n\n/* ------------------------------------------------------------------ */\n/* Inner form — lives inside the <Elements> provider */\n/* ------------------------------------------------------------------ */\n\ninterface InnerPaymentFormProps {\n amount: number;\n currency: string;\n locale: string;\n billingAddress: boolean;\n requireBillingAddress: boolean;\n defaultBillingDetails: PaymentFormProps['defaultBillingDetails'];\n onBillingDetails: PaymentFormProps['onBillingDetails'];\n returnUrl: string | undefined;\n /** Present in immediate mode; `undefined` in deferred mode. */\n clientSecret: string | undefined;\n /** Deferred-confirm callback; `undefined` → preview (validate-only). */\n onCreatePaymentIntent: PaymentFormProps['onCreatePaymentIntent'];\n onPreviewValidated: PaymentFormProps['onPreviewValidated'];\n onSuccess: PaymentFormProps['onSuccess'];\n onPaymentStatusChange: PaymentFormProps['onPaymentStatusChange'];\n onError: PaymentFormProps['onError'];\n layout: NonNullable<PaymentFormProps['layout']>;\n /** Return channel to the wrapper's agent handle. */\n agentBridge: { current: PaymentFormAgentBridge };\n}\n\nfunction InnerPaymentForm(props: InnerPaymentFormProps): ReactElement {\n const {\n amount,\n currency,\n locale,\n billingAddress,\n requireBillingAddress,\n defaultBillingDetails,\n onBillingDetails,\n returnUrl,\n clientSecret,\n onCreatePaymentIntent,\n onPreviewValidated,\n onSuccess,\n onPaymentStatusChange,\n onError,\n layout,\n agentBridge,\n } = props;\n\n const { t } = useTranslation();\n const stripe = useStripe();\n const elements = useElements();\n const [defaultAddressValues] = useState(() =>\n defaultBillingDetails\n ? {\n name: defaultBillingDetails.name,\n address: {\n line1: defaultBillingDetails.address.line1,\n line2: defaultBillingDetails.address.line2,\n city: defaultBillingDetails.address.city,\n state: defaultBillingDetails.address.state,\n postal_code: defaultBillingDetails.address.postalCode,\n country: defaultBillingDetails.address.country,\n },\n }\n : undefined,\n );\n\n const rawId = useId();\n const idSafe = useMemo(\n () => `pay-${rawId.replace(/[^a-zA-Z0-9-_]/g, '')}`,\n [rawId],\n );\n const paymentFieldId = `${idSafe}-payment`;\n const addressFieldId = `${idSafe}-address`;\n const errorId = `${idSafe}-error`;\n\n const [processing, setProcessing] = useState(false);\n const [paid, setPaid] = useState(false);\n const submissionLocked = useRef(false);\n const mounted = useRef(true);\n const [elementComplete, setElementComplete] = useState(false);\n const [addressComplete, setAddressComplete] = useState(false);\n const addressRevision = useRef(0);\n const [errorKey, setErrorKey] = useState<string | null>(null);\n const [errorMessage, setErrorMessage] = useState<string>('');\n\n useEffect(() => {\n agentBridge.current.complete =\n elementComplete && (!requireBillingAddress || addressComplete);\n }, [agentBridge, elementComplete, requireBillingAddress, addressComplete]);\n\n /* ---- agent read-back channel ---------------------------------- */\n // Written SYNCHRONOUSLY at every transition, never mirrored during\n // render: `submit()` resolves the moment the charge settles, which is\n // before React has re-rendered, so a render-time mirror would still\n // report `processing` to the caller that just awaited it. `status` and\n // `paymentIntentId` live only here — nothing renders them.\n const setAgentStatus = useCallback(\n (next: PaymentFormStatus) => {\n agentBridge.current.status = next;\n },\n [agentBridge],\n );\n const applyErrorKey = useCallback(\n (key: string | null) => {\n agentBridge.current.errorKey = key;\n setErrorKey(key);\n },\n [agentBridge],\n );\n const applyComplete = useCallback(\n (complete: boolean) => {\n agentBridge.current.complete =\n complete && (!requireBillingAddress || addressComplete);\n setElementComplete(complete);\n },\n [agentBridge, requireBillingAddress, addressComplete],\n );\n\n const onSuccessRef = useRef(onSuccess);\n const onPaymentStatusChangeRef = useRef(onPaymentStatusChange);\n const onErrorRef = useRef(onError);\n const onBillingDetailsRef = useRef(onBillingDetails);\n const onPreviewValidatedRef = useRef(onPreviewValidated);\n useEffect(() => {\n onSuccessRef.current = onSuccess;\n onPaymentStatusChangeRef.current = onPaymentStatusChange;\n onErrorRef.current = onError;\n onBillingDetailsRef.current = onBillingDetails;\n onPreviewValidatedRef.current = onPreviewValidated;\n }, [\n onSuccess,\n onPaymentStatusChange,\n onError,\n onBillingDetails,\n onPreviewValidated,\n ]);\n\n const handleSubmit = useCallback(\n async (event?: FormEvent<HTMLFormElement>): Promise<void> => {\n if (event) event.preventDefault();\n if (!stripe || !elements) return;\n if (submissionLocked.current || !mounted.current) return;\n\n submissionLocked.current = true;\n setProcessing(true);\n setAgentStatus('processing');\n // A new attempt supersedes the previous receipt.\n agentBridge.current.paymentIntentId = null;\n applyErrorKey(null);\n setErrorMessage('');\n\n // The single sanitise → map → setError → onError pipeline. Every error\n // surfaced by either path (immediate or deferred) flows through here so\n // raw Stripe English / PAN-like digit runs can never reach the UI or\n // `onError`. `rawMessage` is sanitised; the i18n key is mapped from\n // the Stripe error code.\n const reportError = (\n code: string,\n rawMessage: string | undefined,\n ): void => {\n const key = stripeErrorCodeToI18nKey(code);\n // CRITICAL: sanitise before storing OR forwarding.\n const safe = stripCardLikeDigits(rawMessage ?? '');\n applyErrorKey(key);\n setErrorMessage(t(key));\n setAgentStatus('failed');\n onErrorRef.current?.({\n code,\n translatedMessage: safe || t(key),\n });\n };\n\n // Validate returnUrl at the boundary so even a careless consumer\n // cannot leak payment_intent_client_secret to a third-party origin.\n const safeReturnUrl = validateReturnUrl(returnUrl);\n if (returnUrl !== undefined && safeReturnUrl === null) {\n applyErrorKey('payment.error.invalidReturnUrl');\n setErrorMessage(t('payment.error.invalidReturnUrl'));\n setAgentStatus('failed');\n onErrorRef.current?.({\n code: 'invalid_return_url',\n translatedMessage: t('payment.error.invalidReturnUrl'),\n });\n setProcessing(false);\n submissionLocked.current = false;\n return;\n }\n\n const confirmParams = safeReturnUrl ? { return_url: safeReturnUrl } : {};\n\n let keepLocked = false;\n const saveBillingDetails = onBillingDetailsRef.current;\n try {\n let mintedSecret: string | undefined;\n if (clientSecret === undefined) {\n const { error: submitError } = await elements.submit();\n if (!mounted.current) return;\n if (submitError) {\n reportError(submitError.code ?? 'generic', submitError.message);\n return;\n }\n }\n let billingDetails: PaymentFormBillingDetails | undefined;\n const billingRevision = addressRevision.current;\n const billingChanged = () =>\n requireBillingAddress && billingRevision !== addressRevision.current;\n if (requireBillingAddress) {\n const address = elements.getElement(AddressElement);\n const result = await address?.getValue();\n if (!mounted.current) return;\n if (billingChanged()) {\n reportError('billing_details_changed', undefined);\n return;\n }\n if (!result?.complete) {\n reportError('billing_address_incomplete', undefined);\n return;\n }\n const value = result.value;\n billingDetails = {\n name: value.name,\n address: {\n line1: value.address.line1,\n line2: value.address.line2,\n city: value.address.city,\n state: value.address.state,\n postalCode: value.address.postal_code,\n country: value.address.country,\n },\n };\n }\n // Preview validates without persisting billing or creating an intent.\n if (clientSecret === undefined && !onCreatePaymentIntent) {\n await onPreviewValidatedRef.current?.();\n return;\n }\n if (billingDetails && saveBillingDetails) {\n try {\n await saveBillingDetails(billingDetails);\n } catch {\n if (mounted.current) reportError('billing_details_save', undefined);\n return;\n }\n if (!mounted.current) return;\n }\n if (billingChanged()) {\n reportError('billing_details_changed', undefined);\n return;\n }\n if (clientSecret === undefined && onCreatePaymentIntent) {\n mintedSecret = await onCreatePaymentIntent();\n if (!mounted.current) return;\n }\n if (billingChanged()) {\n reportError('billing_details_changed', undefined);\n return;\n }\n const result = await stripe.confirmPayment({\n elements,\n ...(mintedSecret === undefined ? {} : { clientSecret: mintedSecret }),\n confirmParams,\n redirect: 'if_required',\n });\n if (!mounted.current) return;\n if (result.error) {\n reportError(result.error.code ?? 'generic', result.error.message);\n return;\n }\n\n const intent = result.paymentIntent;\n // A redirect or unfinished payment must never permit another charge.\n keepLocked = true;\n if (!intent) return;\n if (intent.status === 'succeeded') {\n agentBridge.current.paymentIntentId = intent.id;\n setAgentStatus('succeeded');\n setPaid(true);\n setProcessing(false);\n } else if (\n intent.status === 'requires_payment_method' ||\n intent.status === 'canceled'\n ) {\n keepLocked = false;\n reportError(intent.status, undefined);\n }\n try {\n onPaymentStatusChangeRef.current?.(intent.status, intent.id);\n } catch {\n // An observer must not prevent the authoritative completion callback.\n }\n if (intent.status === 'succeeded') {\n onSuccessRef.current?.(intent.id);\n }\n } catch (err: unknown) {\n // Consumer callbacks cannot change an already-paid/pending result.\n if (mounted.current && !keepLocked) {\n reportError('unexpected', err instanceof Error ? err.message : '');\n }\n } finally {\n if (mounted.current && !keepLocked) {\n submissionLocked.current = false;\n setProcessing(false);\n if (agentBridge.current.status === 'processing')\n setAgentStatus('idle');\n }\n }\n },\n [\n stripe,\n elements,\n returnUrl,\n clientSecret,\n onCreatePaymentIntent,\n requireBillingAddress,\n t,\n agentBridge,\n applyErrorKey,\n setAgentStatus,\n ],\n );\n\n // Imperative submit hook used by DOM-driving callers. Kept for the\n // documented `payment-form:submit` CustomEvent contract; the agent\n // handle uses the awaitable channel below instead.\n useEffect(() => {\n const host = document.getElementById(idSafe);\n if (!host) return;\n const submitter = () => {\n void handleSubmit();\n };\n host.addEventListener('payment-form:submit', submitter);\n return () => host.removeEventListener('payment-form:submit', submitter);\n }, [idSafe, handleSubmit]);\n\n // Register the awaitable submit with the wrapper's agent handle. Only\n // structural values ever cross this bridge: never card fields, never\n // the raw Stripe message, never the client secret.\n useEffect(() => {\n const bridge = agentBridge.current;\n bridge.submit = handleSubmit;\n return () => {\n if (bridge.submit === handleSubmit) bridge.submit = undefined;\n };\n }, [agentBridge, handleSubmit]);\n\n // Each Elements session owns its result. Ignore asynchronous work from a\n // discarded session and start replacement fields without a stale receipt.\n useEffect(() => {\n const bridge = agentBridge.current;\n mounted.current = true;\n bridge.status = 'idle';\n bridge.paymentIntentId = null;\n bridge.errorKey = null;\n bridge.complete = false;\n return () => {\n mounted.current = false;\n bridge.complete = false;\n bridge.status = 'idle';\n bridge.paymentIntentId = null;\n bridge.errorKey = null;\n };\n }, [agentBridge]);\n\n // Preview mode = deferred (no clientSecret) with no confirm callback. There\n // no charge happens, so we keep the button enabled even before the fields\n // report complete: clicking it triggers `elements.submit()` validation,\n // which is the entire point of the preview.\n const isPreview = clientSecret === undefined && !onCreatePaymentIntent;\n const submitDisabled =\n !stripe ||\n !elements ||\n processing ||\n paid ||\n (!isPreview &&\n (!elementComplete || (requireBillingAddress && !addressComplete)));\n\n return (\n <form\n id={idSafe}\n onSubmit={handleSubmit}\n // `reset()` on the handle (and any native reset) discards the\n // previous attempt: without this the error Alert and the agent's\n // `status` / `errorKey` slots would keep reporting a decline that\n // is no longer on screen. `elementComplete` is deliberately left\n // alone — Stripe owns those cross-origin fields and a native form\n // reset does not clear them.\n onReset={() => {\n if (submissionLocked.current) return;\n applyErrorKey(null);\n setErrorMessage('');\n setAgentStatus('idle');\n agentBridge.current.paymentIntentId = null;\n }}\n aria-label={t('payment.ariaLabel')}\n aria-busy={processing || undefined}\n noValidate\n >\n <div className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\">\n <div className={amountSummaryVariants()}>\n <span className={labelTextVariants()}>\n {t('payment.amountLabel')}\n </span>\n <span className=\"type-title-card\" data-testid=\"payment-amount\">\n {formatPaymentAmount(amount, currency, locale)}\n </span>\n </div>\n\n <label\n htmlFor={paymentFieldId}\n className={fieldLabelVariants()}\n data-testid=\"payment-field\"\n >\n <span className={labelTextVariants()}>\n {t('payment.fields.card')}\n </span>\n <PaymentElement\n id={paymentFieldId}\n options={{\n // `tabs` = method tiles (Card selected by default); `accordion`\n // = full-width stacked rows for narrow columns where the tab row\n // clips. Stripe owns overflow + tab alignment either way.\n layout:\n layout === 'accordion'\n ? { type: 'accordion', defaultCollapsed: true }\n : { type: 'tabs' },\n }}\n onChange={(ev) => {\n // NOTE: never log `ev` — change events may include hints\n // about field contents. Keep only the boolean completeness.\n applyComplete(ev.complete === true);\n if (ev.complete) {\n applyErrorKey(null);\n setErrorMessage('');\n // The declined attempt is over — the fields are valid\n // again, so the surface is back to idle. A succeeded\n // attempt stays succeeded.\n if (agentBridge.current.status === 'failed') {\n setAgentStatus('idle');\n }\n }\n }}\n />\n </label>\n\n {billingAddress ? (\n <label\n htmlFor={addressFieldId}\n className={fieldLabelVariants()}\n data-testid=\"payment-address\"\n >\n <span className={labelTextVariants()}>\n {t('payment.billingAddress')}\n </span>\n <AddressElement\n id={addressFieldId}\n options={{\n mode: 'billing',\n ...(defaultAddressValues\n ? { defaultValues: defaultAddressValues }\n : {}),\n }}\n onChange={(event) => {\n addressRevision.current += 1;\n setAddressComplete(event.complete);\n agentBridge.current.complete =\n elementComplete && (!requireBillingAddress || event.complete);\n if (\n event.complete &&\n errorKey === 'payment.error.billingAddressIncomplete'\n ) {\n applyErrorKey(null);\n setErrorMessage('');\n setAgentStatus('idle');\n }\n }}\n />\n </label>\n ) : null}\n\n {errorKey ? (\n <Alert\n id={errorId}\n variant=\"error\"\n live=\"polite\"\n data-testid=\"payment-error\"\n >\n <Alert.Description>{errorMessage}</Alert.Description>\n </Alert>\n ) : null}\n\n <button\n type=\"submit\"\n aria-disabled={submitDisabled || undefined}\n aria-busy={processing || undefined}\n aria-describedby={errorKey ? errorId : undefined}\n className={submitButtonVariants()}\n data-testid=\"payment-submit\"\n >\n {processing ? (\n <>\n <Spinner\n variant=\"pulse\"\n size=\"sm\"\n label={t('payment.processing')}\n />\n <span>{t('payment.processing')}</span>\n </>\n ) : (\n <span>\n {t('payment.submit', {\n amount: formatPaymentAmount(amount, currency, locale),\n })}\n </span>\n )}\n </button>\n </div>\n </form>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* PaymentForm — outer wrapper */\n/* ------------------------------------------------------------------ */\n\n/**\n * Stripe ships a closed union of supported locales; anything outside it\n * must fall through to `'auto'` (Stripe picks the best match from the\n * browser). We also normalise the legacy `cn` code to `zh` per\n * `src/docs/06-i18n.mdx`.\n */\nconst STRIPE_LOCALES = new Set<StripeElementLocale>([\n 'auto',\n 'ar',\n 'bg',\n 'cs',\n 'da',\n 'de',\n 'el',\n 'en',\n 'en-AU',\n 'en-CA',\n 'en-NZ',\n 'en-GB',\n 'es',\n 'es-ES',\n 'es-419',\n 'et',\n 'fi',\n 'fil',\n 'fr',\n 'fr-CA',\n 'fr-FR',\n 'he',\n 'hu',\n 'hr',\n 'id',\n 'it',\n 'it-IT',\n 'ja',\n 'ko',\n 'lt',\n 'lv',\n 'ms',\n 'mt',\n 'nb',\n 'nl',\n 'no',\n 'pl',\n 'pt',\n 'pt-BR',\n 'ro',\n 'ru',\n 'sk',\n 'sl',\n 'sv',\n 'th',\n 'tr',\n 'vi',\n 'zh',\n 'zh-HK',\n 'zh-TW',\n]);\n\nfunction normaliseLocale(input: string): StripeElementLocale {\n if (!input) return 'auto';\n const candidate = input === 'cn' ? 'zh' : input;\n if ((STRIPE_LOCALES as Set<string>).has(candidate)) {\n return candidate as StripeElementLocale;\n }\n // Try stripping region (\"en-US\" → \"en\") before giving up.\n const base = candidate.split('-')[0];\n if ((STRIPE_LOCALES as Set<string>).has(base)) {\n return base as StripeElementLocale;\n }\n return 'auto';\n}\n\nexport const PaymentForm = forwardRef<HTMLDivElement, PaymentFormProps>(\n (\n {\n id,\n clientSecret,\n mode = 'payment',\n cardOnly = false,\n onCreatePaymentIntent,\n onPreviewValidated,\n publishableKey,\n stripeAccount,\n currency,\n amount,\n onSuccess,\n onPaymentStatusChange,\n onError,\n billingAddress = false,\n requireBillingAddress = false,\n defaultBillingDetails,\n onBillingDetails,\n locale,\n ariaLabel,\n returnUrl,\n stripePromise: injectedStripe,\n layout = 'tabs',\n className,\n },\n ref,\n ) => {\n const { i18n } = useTranslation();\n const activeLocale = normaliseLocale(locale ?? i18n.language ?? 'en');\n const requireCompleteBilling =\n requireBillingAddress || onBillingDetails !== undefined;\n const showBillingAddress = billingAddress || requireCompleteBilling;\n\n // Stripe instance — pre-injected (tests/stories) or lazily loaded.\n const stripeSource = useMemo(\n () => ({ injectedStripe, publishableKey, stripeAccount }),\n [injectedStripe, publishableKey, stripeAccount],\n );\n const [stripeSession, setStripeSession] = useState(() => ({\n source: stripeSource,\n instance: injectedStripe ?? null,\n }));\n // Unmount the old immutable Elements context before replacing its Stripe\n // instance, including when only the injected promise changes.\n const stripeInstance =\n stripeSession.source === stripeSource ? stripeSession.instance : null;\n\n useEffect(() => {\n const {\n injectedStripe: injected,\n publishableKey: key,\n stripeAccount: account,\n } = stripeSource;\n const instance =\n injected !== undefined\n ? injected\n : key\n ? account\n ? loadStripe(key, { stripeAccount: account })\n : loadStripe(key)\n : null;\n setStripeSession({ source: stripeSource, instance });\n }, [stripeSource]);\n\n // Appearance bridge — snapshot + subscribe.\n const [appearance, setAppearance] = useState<Appearance>(() =>\n getStripeAppearance(),\n );\n useEffect(() => {\n setAppearance(getStripeAppearance());\n const unsubscribe = subscribeStripeAppearance(setAppearance);\n return unsubscribe;\n }, []);\n\n // Imperative handle. The inner form lives inside Stripe's\n // `<Elements>` provider, which owns its own tree, so the two sides\n // talk through `agentBridge`: the inner writes its settled status /\n // completeness / error key / PaymentIntent id into it and registers\n // its submit function there. That registration is what lets\n // `submit()` AWAIT the charge — the older CustomEvent dispatch\n // resolved as soon as it fired the event, before the charge was even\n // attempted, so an agent could not tell success from decline.\n const hostRef = useRef<HTMLDivElement>(null);\n const agentBridge = useRef<PaymentFormAgentBridge>({\n status: 'idle',\n complete: false,\n errorKey: null,\n paymentIntentId: null,\n });\n\n const agentHandle = useMemo<PaymentFormHandle>(\n () => ({\n submit: async () => {\n const run = agentBridge.current.submit;\n if (!run) {\n // Stripe has not mounted (no publishable key, or still\n // loading) — there is nothing to charge. Left as `idle` so\n // the caller can tell \"never fired\" from \"declined\".\n return;\n }\n await run();\n },\n reset: () => {\n const form = hostRef.current?.querySelector('form');\n if (form instanceof HTMLFormElement) {\n form.reset();\n }\n },\n getStatus: () => agentBridge.current.status,\n isComplete: () => agentBridge.current.complete,\n getErrorKey: () => agentBridge.current.errorKey,\n getPaymentIntentId: () => agentBridge.current.paymentIntentId,\n }),\n [],\n );\n useImperativeHandle(ref, () => hostRef.current as HTMLDivElement, []);\n useAgentRegistration(paymentFormAgent, agentHandle, id);\n\n const elementsOptions = useMemo<StripeElementsOptions>(\n () =>\n clientSecret !== undefined\n ? // Immediate mode — the consumer already created the intent.\n { clientSecret, appearance, locale: activeLocale }\n : // Deferred-intent mode — no secret yet; Stripe needs the intent\n // shape (mode + amount + currency) to render the Payment Element.\n // Stripe expects a lowercase ISO-4217 currency here.\n {\n mode,\n amount,\n currency: currency.toLowerCase(),\n ...(cardOnly ? { paymentMethodTypes: ['card'] } : {}),\n appearance,\n locale: activeLocale,\n },\n [\n clientSecret,\n mode,\n cardOnly,\n amount,\n currency,\n appearance,\n activeLocale,\n ],\n );\n\n return (\n <div\n ref={hostRef}\n aria-label={ariaLabel}\n className={[formVariants(), className].filter(Boolean).join(' ')}\n data-component=\"payment-form\"\n data-component-id={id}\n data-testid=\"payment-form-root\"\n >\n {stripeInstance ? (\n // Render the real Payment Element whenever a Stripe instance is\n // available — in immediate mode (clientSecret present) AND in\n // deferred mode (no secret). The skeleton is reserved for the\n // no-Stripe case (missing publishableKey / injected null).\n <Elements\n stripe={stripeInstance}\n options={elementsOptions}\n key={\n clientSecret ??\n `deferred:${mode}:${amount}:${currency}:${cardOnly}`\n }\n >\n <InnerPaymentForm\n amount={amount}\n currency={currency}\n locale={activeLocale}\n billingAddress={showBillingAddress}\n requireBillingAddress={requireCompleteBilling}\n defaultBillingDetails={defaultBillingDetails}\n onBillingDetails={onBillingDetails}\n returnUrl={returnUrl}\n clientSecret={clientSecret}\n onCreatePaymentIntent={onCreatePaymentIntent}\n onPreviewValidated={onPreviewValidated}\n onSuccess={onSuccess}\n onPaymentStatusChange={onPaymentStatusChange}\n onError={onError}\n layout={layout}\n agentBridge={agentBridge}\n />\n </Elements>\n ) : (\n <PaymentFormSkeleton\n amount={amount}\n currency={currency}\n locale={activeLocale}\n billingAddress={showBillingAddress}\n />\n )}\n </div>\n );\n },\n);\n\nPaymentForm.displayName = 'PaymentForm';\n\n/* ------------------------------------------------------------------ */\n/* Skeleton — visual chrome when Stripe hasn't loaded yet */\n/* ------------------------------------------------------------------ */\n\ninterface PaymentFormSkeletonProps {\n amount: number;\n currency: string;\n locale: string;\n billingAddress: boolean;\n}\n\nfunction PaymentFormSkeleton(props: PaymentFormSkeletonProps): ReactElement {\n const { amount, currency, locale, billingAddress } = props;\n const { t } = useTranslation();\n\n return (\n <div\n className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]\"\n data-testid=\"payment-skeleton\"\n aria-busy=\"true\"\n >\n <div className={amountSummaryVariants()}>\n <span className={labelTextVariants()}>{t('payment.amountLabel')}</span>\n <span className=\"type-title-card\">\n {formatPaymentAmount(amount, currency, locale)}\n </span>\n </div>\n <div className={fieldLabelVariants()}>\n <span className={labelTextVariants()}>{t('payment.fields.card')}</span>\n <div\n className=\"ds:[min-block-size:var(--min-target-size)] ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--border)] ds:bg-[var(--muted)]\"\n aria-hidden=\"true\"\n />\n </div>\n {billingAddress ? (\n <div className={fieldLabelVariants()} data-testid=\"payment-address\">\n <span className={labelTextVariants()}>\n {t('payment.billingAddress')}\n </span>\n <div\n className=\"ds:[min-block-size:calc(var(--min-target-size)*2)] ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--border)] ds:bg-[var(--muted)]\"\n aria-hidden=\"true\"\n />\n </div>\n ) : null}\n <button\n type=\"button\"\n aria-disabled=\"true\"\n className={submitButtonVariants()}\n disabled\n >\n <Spinner variant=\"pulse\" size=\"sm\" label={t('payment.processing')} />\n <span>{t('payment.processing')}</span>\n </button>\n </div>\n );\n}\n\nexport {\n formVariants as paymentFormVariants,\n submitButtonVariants as paymentSubmitButtonVariants,\n};\n"],"names":["isBrowser","getStripeAppearance","root","target","styles","read","token","subscribeStripeAppearance","onChange","emit","observer","schemeMql","motionMql","paymentFormAgent","handle","ZERO_DECIMAL_CURRENCIES","formatPaymentAmount","amount","currency","locale","iso","major","validateReturnUrl","returnUrl","raw","resolved","stripCardLikeDigits","message","stripeErrorCodeToI18nKey","code","formVariants","cva","fieldLabelVariants","labelTextVariants","amountSummaryVariants","submitButtonVariants","InnerPaymentForm","props","billingAddress","requireBillingAddress","defaultBillingDetails","onBillingDetails","clientSecret","onCreatePaymentIntent","onPreviewValidated","onSuccess","onPaymentStatusChange","onError","layout","agentBridge","t","useTranslation","stripe","useStripe","elements","useElements","defaultAddressValues","useState","rawId","useId","idSafe","useMemo","paymentFieldId","addressFieldId","errorId","processing","setProcessing","paid","setPaid","submissionLocked","useRef","mounted","elementComplete","setElementComplete","addressComplete","setAddressComplete","addressRevision","errorKey","setErrorKey","errorMessage","setErrorMessage","useEffect","setAgentStatus","useCallback","next","applyErrorKey","key","applyComplete","complete","onSuccessRef","onPaymentStatusChangeRef","onErrorRef","onBillingDetailsRef","onPreviewValidatedRef","handleSubmit","event","reportError","rawMessage","safe","_a","safeReturnUrl","confirmParams","keepLocked","saveBillingDetails","mintedSecret","submitError","billingDetails","billingRevision","billingChanged","address","AddressElement","result","value","_b","intent","_c","_d","err","host","submitter","bridge","submitDisabled","jsx","jsxs","PaymentElement","ev","Alert","Fragment","Spinner","STRIPE_LOCALES","normaliseLocale","input","candidate","base","PaymentForm","forwardRef","id","mode","cardOnly","publishableKey","stripeAccount","ariaLabel","injectedStripe","className","ref","i18n","activeLocale","requireCompleteBilling","showBillingAddress","stripeSource","stripeSession","setStripeSession","stripeInstance","injected","account","instance","loadStripe","appearance","setAppearance","hostRef","agentHandle","run","form","useImperativeHandle","useAgentRegistration","elementsOptions","Elements","PaymentFormSkeleton"],"mappings":";;;;;;;;;AAiBA,SAASA,KAAqB;AAC5B,SAAO,OAAO,WAAa,OAAe,OAAO,SAAW;AAC9D;AAEO,SAASC,GAAoBC,GAAgC;AAClE,MAAI,CAACF;AACH,WAAO,EAAE,OAAO,SAAA;AAGlB,QAAMG,IAASD,KAAQ,SAAS,iBAC1BE,IAAS,iBAAiBD,CAAM,GAChCE,IAAO,CAACC,MAAkBF,EAAO,iBAAiBE,CAAK,EAAE,KAAA;AAG/D,SAAO;AAAA,IACL,OAHaH,EAAO,UAAU,SAAS,YAAY,IAGnC,UAAU;AAAA,IAC1B,WAAW;AAAA,MACT,cAAcE,EAAK,WAAW;AAAA,MAC9B,iBAAiBA,EAAK,cAAc;AAAA,MACpC,WAAWA,EAAK,cAAc;AAAA,MAC9B,aAAaA,EAAK,eAAe;AAAA,MACjC,oBAAoBA,EAAK,oBAAoB;AAAA,MAC7C,sBAAsBA,EAAK,oBAAoB;AAAA,MAC/C,cAAcA,EAAK,aAAa;AAAA,MAChC,YAAYA,EAAK,aAAa;AAAA,MAC9B,cAAcA,EAAK,kBAAkB;AAAA;AAAA;AAAA,MAGrC,aAAaA,EAAK,cAAc;AAAA,IAAA;AAAA,IAElC,OAAO;AAAA,MACL,UAAU;AAAA,QACR,iBAAiBA,EAAK,cAAc;AAAA,QACpC,QAAQ,aAAaA,EAAK,UAAU,CAAC;AAAA,QACrC,OAAOA,EAAK,cAAc;AAAA,QAC1B,SAASA,EAAK,cAAc;AAAA,QAC5B,YAAY,gBAAgBA,EAAK,sBAAsB,CAAC;AAAA,MAAA;AAAA,MAE1D,gBAAgB;AAAA,QACd,aAAaA,EAAK,WAAW;AAAA,QAC7B,WAAW,SAAS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IACE;AAAA,QACJ,gBAAAC;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,iBAAc;AAAA,YACd,WAAWxF,GAAA;AAAA,YACX,UAAQ;AAAA,YAER,UAAA;AAAA,cAAA,gBAAAuF,EAACM,IAAA,EAAQ,SAAQ,SAAQ,MAAK,MAAK,OAAO9E,EAAE,oBAAoB,GAAG;AAAA,cACnE,gBAAAwE,EAAC,QAAA,EAAM,UAAAxE,EAAE,oBAAoB,EAAA,CAAE;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACjC;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as Te, useContext as Ae, useMemo as b, useState as
|
|
2
|
+
import { forwardRef as Te, useContext as Ae, useMemo as b, useState as B, useRef as K, useEffect as ue, useCallback as ce } from "react";
|
|
3
3
|
import { u as $e } from "./registry-DvAUVLHh.js";
|
|
4
4
|
import { u as Be } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
|
|
5
|
-
import * as
|
|
5
|
+
import * as L from "@radix-ui/react-popover";
|
|
6
6
|
import { R as Ke, _ as N } from "./index-4xgbg-sn.js";
|
|
7
7
|
import { c as ee } from "./index-D2ZczOXr.js";
|
|
8
8
|
import { useTranslation as Le } from "react-i18next";
|
|
9
|
-
import { getCountries as qe, parsePhoneNumberFromString as
|
|
9
|
+
import { getCountries as qe, parsePhoneNumberFromString as q, AsYouType as M, getCountryCallingCode as Me } from "libphonenumber-js/min";
|
|
10
10
|
import { u as He, F as _e } from "./form-field-context-B3APVHKx.js";
|
|
11
11
|
import { c as Ge } from "./compose-refs-C0k0tdqF.js";
|
|
12
12
|
import { n as J } from "./normalize-diacritics-BNGbFNlJ.js";
|
|
@@ -253,7 +253,7 @@ const rt = Te(
|
|
|
253
253
|
popularCountries: V,
|
|
254
254
|
allowedCountries: F,
|
|
255
255
|
className: ge,
|
|
256
|
-
id:
|
|
256
|
+
id: H,
|
|
257
257
|
name: be,
|
|
258
258
|
required: ye,
|
|
259
259
|
"aria-label": ve
|
|
@@ -265,7 +265,7 @@ const rt = Te(
|
|
|
265
265
|
if (!F || F.length === 0) return null;
|
|
266
266
|
const e = /* @__PURE__ */ new Set(), t = F.filter((n) => !h.has(n) || e.has(n) ? !1 : (e.add(n), !0));
|
|
267
267
|
return t.length > 0 ? t : null;
|
|
268
|
-
}, [F, h]), xe = c !== null && c.length === 1,
|
|
268
|
+
}, [F, h]), xe = c !== null && c.length === 1, _ = b(() => {
|
|
269
269
|
const e = me(
|
|
270
270
|
o,
|
|
271
271
|
h,
|
|
@@ -274,23 +274,23 @@ const rt = Te(
|
|
|
274
274
|
c
|
|
275
275
|
), t = a ?? l;
|
|
276
276
|
if (t) {
|
|
277
|
-
const n =
|
|
277
|
+
const n = q(t);
|
|
278
278
|
return n != null && n.country ? !c || c.includes(n.country) ? {
|
|
279
279
|
country: n.country,
|
|
280
280
|
display: n.formatNational(),
|
|
281
281
|
pinned: !0
|
|
282
282
|
} : {
|
|
283
283
|
country: e,
|
|
284
|
-
display: new
|
|
284
|
+
display: new M(e).input(
|
|
285
285
|
n.nationalNumber
|
|
286
286
|
),
|
|
287
287
|
pinned: !0
|
|
288
288
|
} : { country: e, display: t, pinned: !1 };
|
|
289
289
|
}
|
|
290
290
|
return { country: e, display: "", pinned: !1 };
|
|
291
|
-
}, []), [u, E] =
|
|
292
|
-
|
|
293
|
-
), [
|
|
291
|
+
}, []), [u, E] = B(_.country), [te, g] = B(
|
|
292
|
+
_.display
|
|
293
|
+
), [G, O] = B(!1), [Ne, ne] = B(""), se = a !== void 0, U = K(""), j = K(null), D = K(_.pinned), T = K(null), we = Ge(Ce, T);
|
|
294
294
|
ue(() => {
|
|
295
295
|
if (D.current) return;
|
|
296
296
|
const e = me(
|
|
@@ -310,12 +310,12 @@ const rt = Te(
|
|
|
310
310
|
]), ue(() => {
|
|
311
311
|
if (!se) return;
|
|
312
312
|
const e = a ?? "";
|
|
313
|
-
if (e ===
|
|
313
|
+
if (e === U.current) return;
|
|
314
314
|
if (e === "") {
|
|
315
315
|
g("");
|
|
316
316
|
return;
|
|
317
317
|
}
|
|
318
|
-
const t =
|
|
318
|
+
const t = q(e);
|
|
319
319
|
t != null && t.country && (!c || c.includes(t.country)) ? (D.current = !0, E(t.country), g(t.formatNational())) : g(t ? t.formatNational() : e);
|
|
320
320
|
}, [a, se, c]), Be(() => {
|
|
321
321
|
if (j.current == null) return;
|
|
@@ -326,8 +326,8 @@ const rt = Te(
|
|
|
326
326
|
});
|
|
327
327
|
const C = ce(
|
|
328
328
|
(e, t) => {
|
|
329
|
-
const n =
|
|
330
|
-
|
|
329
|
+
const n = q(e, t), p = (n == null ? void 0 : n.number) ?? "";
|
|
330
|
+
U.current = p, i == null || i(p, {
|
|
331
331
|
country: t,
|
|
332
332
|
isValid: (n == null ? void 0 : n.isValid()) ?? !1,
|
|
333
333
|
isPossible: (n == null ? void 0 : n.isPossible()) ?? !1,
|
|
@@ -335,11 +335,11 @@ const rt = Te(
|
|
|
335
335
|
});
|
|
336
336
|
},
|
|
337
337
|
[i]
|
|
338
|
-
), ze =
|
|
338
|
+
), ze = H ?? (k ? z.id : void 0), oe = (k ? z.disabled : !1) || !!y, Ie = (k ? z.required : !1) || !!ye, re = k ? z.invalid : !1, Se = re ? "error" : v, Re = k && z.describedBy ? z.describedBy : void 0, ke = he ?? w("inputs.phone.placeholder", "Phone number"), Pe = (e) => {
|
|
339
339
|
if (S) return;
|
|
340
|
-
const t = e.target, n = t.value, p = t.selectionStart ?? n.length, I = nt(n, p), Z = new
|
|
340
|
+
const t = e.target, n = t.value, p = t.selectionStart ?? n.length, I = nt(n, p), Z = new M(u).input(n);
|
|
341
341
|
j.current = st(Z, I), g(Z), C(Z, u);
|
|
342
|
-
}, ae =
|
|
342
|
+
}, ae = U, Ve = b(
|
|
343
343
|
() => ({
|
|
344
344
|
getValue: () => ae.current,
|
|
345
345
|
setValue: (e) => {
|
|
@@ -347,11 +347,11 @@ const rt = Te(
|
|
|
347
347
|
g(""), C("", u);
|
|
348
348
|
return;
|
|
349
349
|
}
|
|
350
|
-
const t =
|
|
350
|
+
const t = q(e);
|
|
351
351
|
if (t != null && t.country)
|
|
352
352
|
D.current = !0, E(t.country), g(t.formatNational()), C(t.formatNational(), t.country);
|
|
353
353
|
else {
|
|
354
|
-
const p = new
|
|
354
|
+
const p = new M(u).input(e);
|
|
355
355
|
g(p), C(p, u);
|
|
356
356
|
}
|
|
357
357
|
},
|
|
@@ -365,14 +365,14 @@ const rt = Te(
|
|
|
365
365
|
}),
|
|
366
366
|
[u, C, ae]
|
|
367
367
|
);
|
|
368
|
-
$e(Ue, Ve,
|
|
368
|
+
$e(Ue, Ve, H);
|
|
369
369
|
const Fe = (e) => {
|
|
370
370
|
if (e === u) {
|
|
371
|
-
|
|
371
|
+
O(!1);
|
|
372
372
|
return;
|
|
373
373
|
}
|
|
374
|
-
const t = te.replace(/\D/g, ""), n = new
|
|
375
|
-
D.current = !0, E(e), g(p),
|
|
374
|
+
const t = te.replace(/\D/g, ""), n = new M(e), p = t ? n.input(t) : "";
|
|
375
|
+
D.current = !0, E(e), g(p), O(!1), ne(""), C(p, e), requestAnimationFrame(() => {
|
|
376
376
|
var I;
|
|
377
377
|
(I = T.current) == null || I.focus();
|
|
378
378
|
});
|
|
@@ -386,16 +386,16 @@ const rt = Te(
|
|
|
386
386
|
if (!V || V.length === 0) return [];
|
|
387
387
|
const e = new Map(x.map((t) => [t.code, t]));
|
|
388
388
|
return V.filter((t) => h.has(t)).map((t) => e.get(t)).filter((t) => !!t);
|
|
389
|
-
}, [V, x, h]),
|
|
389
|
+
}, [V, x, h]), W = b(
|
|
390
390
|
() => new Set(P.map((e) => e.code)),
|
|
391
391
|
[P]
|
|
392
392
|
), Ee = b(
|
|
393
|
-
() =>
|
|
394
|
-
[x,
|
|
393
|
+
() => W.size > 0 ? x.filter((e) => !W.has(e.code)) : x,
|
|
394
|
+
[x, W]
|
|
395
395
|
), A = b(
|
|
396
396
|
() => x.find((e) => e.code === u),
|
|
397
397
|
[x, u]
|
|
398
|
-
),
|
|
398
|
+
), Y = A ? A.dialCode : "", ie = A ? A.name : u, $ = w("inputs.phone.countryPickerLabel", "Country"), je = `${$}: ${ie}, +${Y}`, De = ce(
|
|
399
399
|
(e, t, n) => {
|
|
400
400
|
const p = J(e), I = J(t), le = n == null ? void 0 : n.map(J);
|
|
401
401
|
return Ke(
|
|
@@ -431,7 +431,7 @@ const rt = Te(
|
|
|
431
431
|
"div",
|
|
432
432
|
{
|
|
433
433
|
"data-component": "phone-input",
|
|
434
|
-
"data-component-id":
|
|
434
|
+
"data-component-id": H,
|
|
435
435
|
"data-slot": "phone-input",
|
|
436
436
|
className: We({
|
|
437
437
|
size: d,
|
|
@@ -445,29 +445,29 @@ const rt = Te(
|
|
|
445
445
|
"data-slot": "phone-country-fixed",
|
|
446
446
|
className: `${pe({ size: d })} ds:cursor-default ds:hover:bg-transparent`,
|
|
447
447
|
children: [
|
|
448
|
-
/* @__PURE__ */ r("span", { className: "ds:sr-only", children: `${
|
|
448
|
+
/* @__PURE__ */ r("span", { className: "ds:sr-only", children: `${$}: ${ie}` }),
|
|
449
449
|
/* @__PURE__ */ r(Q, { country: u, size: X[d] }),
|
|
450
450
|
/* @__PURE__ */ m("bdi", { dir: "ltr", className: "ds:tabular-nums", children: [
|
|
451
451
|
"+",
|
|
452
|
-
|
|
452
|
+
Y
|
|
453
453
|
] })
|
|
454
454
|
]
|
|
455
455
|
}
|
|
456
|
-
) : /* @__PURE__ */ m(
|
|
457
|
-
/* @__PURE__ */ r(
|
|
456
|
+
) : /* @__PURE__ */ m(L.Root, { open: G, onOpenChange: O, children: [
|
|
457
|
+
/* @__PURE__ */ r(L.Trigger, { asChild: !0, children: /* @__PURE__ */ m(
|
|
458
458
|
"button",
|
|
459
459
|
{
|
|
460
460
|
type: "button",
|
|
461
461
|
disabled: oe,
|
|
462
462
|
"aria-haspopup": "listbox",
|
|
463
|
-
"aria-expanded":
|
|
463
|
+
"aria-expanded": G,
|
|
464
464
|
"aria-label": je,
|
|
465
465
|
className: pe({ size: d }),
|
|
466
466
|
children: [
|
|
467
467
|
/* @__PURE__ */ r(Q, { country: u, size: X[d] }),
|
|
468
468
|
/* @__PURE__ */ m("bdi", { dir: "ltr", className: "ds:tabular-nums", children: [
|
|
469
469
|
"+",
|
|
470
|
-
|
|
470
|
+
Y
|
|
471
471
|
] }),
|
|
472
472
|
/* @__PURE__ */ r(
|
|
473
473
|
Oe,
|
|
@@ -477,18 +477,19 @@ const rt = Te(
|
|
|
477
477
|
tt[d],
|
|
478
478
|
"ds:shrink-0 ds:text-muted-foreground",
|
|
479
479
|
"ds:transition-transform ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
480
|
-
|
|
480
|
+
G ? "ds:rotate-180" : ""
|
|
481
481
|
].join(" ")
|
|
482
482
|
}
|
|
483
483
|
)
|
|
484
484
|
]
|
|
485
485
|
}
|
|
486
486
|
) }),
|
|
487
|
-
/* @__PURE__ */ r(
|
|
488
|
-
|
|
487
|
+
/* @__PURE__ */ r(L.Portal, { children: /* @__PURE__ */ r(
|
|
488
|
+
L.Content,
|
|
489
489
|
{
|
|
490
490
|
sideOffset: 6,
|
|
491
491
|
align: "start",
|
|
492
|
+
"aria-label": $,
|
|
492
493
|
className: Ze,
|
|
493
494
|
children: /* @__PURE__ */ m(
|
|
494
495
|
N,
|
|
@@ -496,7 +497,7 @@ const rt = Te(
|
|
|
496
497
|
filter: De,
|
|
497
498
|
shouldFilter: !0,
|
|
498
499
|
loop: !0,
|
|
499
|
-
label:
|
|
500
|
+
label: $,
|
|
500
501
|
children: [
|
|
501
502
|
/* @__PURE__ */ r(
|
|
502
503
|
N.Input,
|
|
@@ -577,4 +578,4 @@ export {
|
|
|
577
578
|
pe as c,
|
|
578
579
|
We as p
|
|
579
580
|
};
|
|
580
|
-
//# sourceMappingURL=phone-input-
|
|
581
|
+
//# sourceMappingURL=phone-input-IWrGOCwm.js.map
|