@deframe-sdk/components 0.1.32 → 0.1.33

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/index.js CHANGED
@@ -2460,6 +2460,1393 @@ var ProcessingBadge = ({
2460
2460
  }
2461
2461
  );
2462
2462
  };
2463
+ function ChoiceCard(_a) {
2464
+ var _b = _a, {
2465
+ label,
2466
+ description,
2467
+ selected = false,
2468
+ onClick,
2469
+ className
2470
+ } = _b, buttonProps = __objRest(_b, [
2471
+ "label",
2472
+ "description",
2473
+ "selected",
2474
+ "onClick",
2475
+ "className"
2476
+ ]);
2477
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2478
+ "button",
2479
+ __spreadProps(__spreadValues({
2480
+ type: "button",
2481
+ "data-slot": "choice-card",
2482
+ "data-test-id": "choice-card",
2483
+ "data-selected": selected,
2484
+ onClick
2485
+ }, buttonProps), {
2486
+ className: tailwindMerge.twMerge(
2487
+ "w-full cursor-pointer rounded-[var(--deframe-widget-size-radius-md)] border p-[var(--deframe-widget-size-padding-x-md)] text-left transition-colors duration-150",
2488
+ "bg-[color:var(--deframe-widget-color-bg-secondary)]",
2489
+ selected ? "border-[color:var(--deframe-widget-color-brand-primary)] bg-[color:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_8%,var(--deframe-widget-color-bg-secondary))]" : "border-[color:var(--deframe-widget-color-border-secondary)] hover:border-[color:var(--deframe-widget-color-border-primary)]",
2490
+ className
2491
+ ),
2492
+ children: [
2493
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-[var(--deframe-widget-size-gap-sm)]", children: [
2494
+ /* @__PURE__ */ jsxRuntime.jsx(
2495
+ "span",
2496
+ {
2497
+ "data-slot": "choice-card-label",
2498
+ "data-test-id": "choice-card-label",
2499
+ className: tailwindMerge.twMerge(
2500
+ "text-[length:var(--deframe-widget-font-size-md)] font-[var(--deframe-widget-font-weight-medium)] leading-[var(--deframe-widget-font-leading-md)]",
2501
+ selected ? "text-[color:var(--deframe-widget-color-brand-primary)]" : "text-[color:var(--deframe-widget-color-text-primary)]"
2502
+ ),
2503
+ children: label
2504
+ }
2505
+ ),
2506
+ /* @__PURE__ */ jsxRuntime.jsx(
2507
+ "span",
2508
+ {
2509
+ "data-slot": "choice-card-indicator",
2510
+ "data-test-id": "choice-card-indicator",
2511
+ "aria-hidden": "true",
2512
+ className: tailwindMerge.twMerge(
2513
+ "flex h-[18px] w-[18px] shrink-0 items-center justify-center rounded-[var(--deframe-widget-size-radius-full)] border-2 transition-colors duration-150",
2514
+ selected ? "border-[color:var(--deframe-widget-color-brand-primary)]" : "border-[color:var(--deframe-widget-color-border-primary)]"
2515
+ ),
2516
+ children: selected && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-[8px] w-[8px] rounded-[var(--deframe-widget-size-radius-full)] bg-[color:var(--deframe-widget-color-brand-primary)]" })
2517
+ }
2518
+ )
2519
+ ] }),
2520
+ description && /* @__PURE__ */ jsxRuntime.jsx(
2521
+ "p",
2522
+ {
2523
+ "data-slot": "choice-card-description",
2524
+ "data-test-id": "choice-card-description",
2525
+ className: "mt-[var(--deframe-widget-size-gap-xs)] text-[length:var(--deframe-widget-font-size-sm)] leading-[var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-tertiary)]",
2526
+ children: description
2527
+ }
2528
+ )
2529
+ ]
2530
+ })
2531
+ );
2532
+ }
2533
+ function KYCInfoRow({ label, value, divider = true, className }) {
2534
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2535
+ "div",
2536
+ {
2537
+ "data-slot": "kyc-info-row",
2538
+ "data-test-id": "kyc-info-row",
2539
+ className: tailwindMerge.twMerge(
2540
+ "flex w-full items-start justify-between gap-[var(--deframe-widget-size-gap-md)]",
2541
+ divider && "border-b border-[color:var(--deframe-widget-color-border-secondary)] pb-[var(--deframe-widget-size-padding-y-sm)]",
2542
+ className
2543
+ ),
2544
+ children: [
2545
+ /* @__PURE__ */ jsxRuntime.jsx(
2546
+ "span",
2547
+ {
2548
+ "data-slot": "kyc-info-row-label",
2549
+ "data-test-id": "kyc-info-row-label",
2550
+ className: "shrink-0 text-[length:var(--deframe-widget-font-size-sm)] leading-[var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-tertiary)]",
2551
+ children: label
2552
+ }
2553
+ ),
2554
+ /* @__PURE__ */ jsxRuntime.jsx(
2555
+ "span",
2556
+ {
2557
+ "data-slot": "kyc-info-row-value",
2558
+ "data-test-id": "kyc-info-row-value",
2559
+ className: "text-right text-[length:var(--deframe-widget-font-size-sm)] font-[var(--deframe-widget-font-weight-medium)] leading-[var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-primary)]",
2560
+ children: value
2561
+ }
2562
+ )
2563
+ ]
2564
+ }
2565
+ );
2566
+ }
2567
+ var DEFAULT_INTRO_CHECKLIST = [
2568
+ {
2569
+ label: "Dados pessoais",
2570
+ icon: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
2571
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "8", r: "4", stroke: "currentColor", strokeWidth: "1.5" }),
2572
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 20c0-4 3.6-7 8-7s8 3 8 7", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
2573
+ ] })
2574
+ },
2575
+ {
2576
+ label: "Endere\xE7o",
2577
+ icon: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
2578
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 2C8.7 2 6 4.7 6 8c0 5 6 13 6 13s6-8 6-13c0-3.3-2.7-6-6-6z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
2579
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "8", r: "2", stroke: "currentColor", strokeWidth: "1.5" })
2580
+ ] })
2581
+ },
2582
+ {
2583
+ label: "Documento de identidade",
2584
+ icon: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
2585
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "2", y: "5", width: "20", height: "14", rx: "2", stroke: "currentColor", strokeWidth: "1.5" }),
2586
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8", cy: "12", r: "2.5", stroke: "currentColor", strokeWidth: "1.5" }),
2587
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M13 10h5M13 12.5h4M13 15h3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
2588
+ ] })
2589
+ },
2590
+ {
2591
+ label: "Selfie de verifica\xE7\xE3o",
2592
+ icon: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
2593
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M23 19a2 2 0 01-2 2H3a2 2 0 01-2-2V8a2 2 0 012-2h4l2-3h6l2 3h4a2 2 0 012 2z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
2594
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "13", r: "3.5", stroke: "currentColor", strokeWidth: "1.5" })
2595
+ ] })
2596
+ }
2597
+ ];
2598
+ var DEFAULT_STATUS_FIELDS = [
2599
+ { label: "Nome completo", value: "Jo\xE3o Carlos Porto" },
2600
+ { label: "CPF", value: "123.456.789-00" },
2601
+ { label: "Data de nascimento", value: "15/04/1990" },
2602
+ { label: "Nacionalidade", value: "Brasileiro" },
2603
+ { label: "Endere\xE7o", value: "Rua das Flores, 123 \u2014 SP" }
2604
+ ];
2605
+ var DEFAULT_DOCUMENT_OPTIONS = [
2606
+ { value: "rg", label: "RG \u2014 Registro Geral" },
2607
+ { value: "cnh", label: "CNH \u2014 Carteira de Motorista" },
2608
+ { value: "passport", label: "Passaporte" },
2609
+ { value: "rne", label: "RNE \u2014 Registro Nacional de Estrangeiro" }
2610
+ ];
2611
+ var KYC_STATUS_BADGE_LABELS = {
2612
+ processing: "Processando",
2613
+ pending: "Pendente",
2614
+ reviewing: "Em an\xE1lise",
2615
+ verified: "Verificado",
2616
+ completed: "Conclu\xEDdo",
2617
+ failed: "Falhou",
2618
+ rejected: "Rejeitado",
2619
+ cancelled: "Cancelado"
2620
+ };
2621
+ var KYC_STATUS_BADGE_CLASSES = {
2622
+ processing: {
2623
+ text: "text-[color:var(--deframe-widget-color-state-info)]",
2624
+ bg: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-info)_12%,transparent)]",
2625
+ border: "border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-info)_28%,transparent)]"
2626
+ },
2627
+ pending: {
2628
+ text: "text-[color:var(--deframe-widget-color-state-warning)]",
2629
+ bg: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-warning)_12%,transparent)]",
2630
+ border: "border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-warning)_28%,transparent)]"
2631
+ },
2632
+ reviewing: {
2633
+ text: "text-[color:var(--deframe-widget-color-state-warning)]",
2634
+ bg: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-warning)_12%,transparent)]",
2635
+ border: "border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-warning)_28%,transparent)]"
2636
+ },
2637
+ verified: {
2638
+ text: "text-[color:var(--deframe-widget-color-state-success)]",
2639
+ bg: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-success)_12%,transparent)]",
2640
+ border: "border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-success)_28%,transparent)]"
2641
+ },
2642
+ completed: {
2643
+ text: "text-[color:var(--deframe-widget-color-state-success)]",
2644
+ bg: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-success)_12%,transparent)]",
2645
+ border: "border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-success)_28%,transparent)]"
2646
+ },
2647
+ failed: {
2648
+ text: "text-[color:var(--deframe-widget-color-state-error)]",
2649
+ bg: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_12%,transparent)]",
2650
+ border: "border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_28%,transparent)]"
2651
+ },
2652
+ rejected: {
2653
+ text: "text-[color:var(--deframe-widget-color-state-error)]",
2654
+ bg: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_12%,transparent)]",
2655
+ border: "border-[color:color-mix(in_srgb,var(--deframe-widget-color-state-error)_28%,transparent)]"
2656
+ },
2657
+ cancelled: {
2658
+ text: "text-[color:var(--deframe-widget-color-text-tertiary)]",
2659
+ bg: "bg-[color:color-mix(in_srgb,var(--deframe-widget-color-text-tertiary)_10%,transparent)]",
2660
+ border: "border-[color:color-mix(in_srgb,var(--deframe-widget-color-text-tertiary)_22%,transparent)]"
2661
+ }
2662
+ };
2663
+ function KYCStatusBadgeIcon({
2664
+ status,
2665
+ size
2666
+ }) {
2667
+ if (status === "processing") {
2668
+ return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
2669
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", strokeWidth: "1.5" }),
2670
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 5v3.5l2 1.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
2671
+ ] });
2672
+ }
2673
+ if (status === "pending") {
2674
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 3h2.5v3.5L8 8.5l2.5-2V3H13M3 13h10", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
2675
+ }
2676
+ if (status === "reviewing") {
2677
+ return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
2678
+ /* @__PURE__ */ jsxRuntime.jsx("ellipse", { cx: "8", cy: "8", rx: "6", ry: "4", stroke: "currentColor", strokeWidth: "1.5" }),
2679
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8", cy: "8", r: "1.5", fill: "currentColor" })
2680
+ ] });
2681
+ }
2682
+ if (status === "verified" || status === "completed") {
2683
+ return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
2684
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", strokeWidth: "1.5" }),
2685
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 8l2.2 2.2L11 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
2686
+ ] });
2687
+ }
2688
+ if (status === "failed" || status === "rejected") {
2689
+ return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
2690
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", strokeWidth: "1.5" }),
2691
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5.5 5.5l5 5M10.5 5.5l-5 5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
2692
+ ] });
2693
+ }
2694
+ return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
2695
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", strokeWidth: "1.5" }),
2696
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5.5 8h5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
2697
+ ] });
2698
+ }
2699
+ function KYCStatusBadge({
2700
+ status,
2701
+ label,
2702
+ size = "default",
2703
+ className
2704
+ }) {
2705
+ const isCompact = size === "compact";
2706
+ const isAnimated = status === "processing";
2707
+ const colors = KYC_STATUS_BADGE_CLASSES[status];
2708
+ const iconSize = isCompact ? 11 : 13;
2709
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2710
+ "div",
2711
+ {
2712
+ "data-slot": "kyc-status-badge",
2713
+ "data-test-id": "kyc-status-badge",
2714
+ "data-status": status,
2715
+ className: tailwindMerge.twMerge(
2716
+ "inline-flex max-w-fit items-center gap-[var(--deframe-widget-size-gap-xs)] rounded-[var(--deframe-widget-size-radius-full)] border",
2717
+ isCompact ? "px-[calc(var(--deframe-widget-size-padding-x-xs)+2px)] py-[2px]" : "px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-xs)]",
2718
+ colors.text,
2719
+ colors.bg,
2720
+ colors.border,
2721
+ className
2722
+ ),
2723
+ children: [
2724
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex shrink-0 items-center", children: /* @__PURE__ */ jsxRuntime.jsx(KYCStatusBadgeIcon, { status, size: iconSize }) }),
2725
+ /* @__PURE__ */ jsxRuntime.jsx(
2726
+ "span",
2727
+ {
2728
+ className: tailwindMerge.twMerge(
2729
+ "truncate font-[var(--deframe-widget-font-weight-medium)]",
2730
+ colors.text,
2731
+ isCompact ? "text-[11px] leading-[14px]" : "text-[length:var(--deframe-widget-font-size-sm)] leading-[var(--deframe-widget-font-leading-sm)]"
2732
+ ),
2733
+ children: label != null ? label : KYC_STATUS_BADGE_LABELS[status]
2734
+ }
2735
+ ),
2736
+ isAnimated && /* @__PURE__ */ jsxRuntime.jsx("span", { className: tailwindMerge.twMerge("flex shrink-0 items-center opacity-80", colors.text), "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(LoadingDots, { className: isCompact ? "text-[11px] leading-[14px]" : "text-[12px] leading-[16px]" }) })
2737
+ ]
2738
+ }
2739
+ );
2740
+ }
2741
+ function KYCDataCard({
2742
+ title = "Dados de identidade",
2743
+ status,
2744
+ statusLabel,
2745
+ fields,
2746
+ action,
2747
+ className,
2748
+ style
2749
+ }) {
2750
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2751
+ "div",
2752
+ {
2753
+ "data-slot": "kyc-data-card",
2754
+ "data-test-id": "kyc-data-card",
2755
+ style,
2756
+ className: tailwindMerge.twMerge(
2757
+ "w-full self-start rounded-[var(--deframe-widget-size-radius-md)] border border-[color:var(--deframe-widget-color-border-secondary)] bg-[color:var(--deframe-widget-color-bg-secondary)]",
2758
+ className
2759
+ ),
2760
+ children: [
2761
+ /* @__PURE__ */ jsxRuntime.jsxs(
2762
+ "div",
2763
+ {
2764
+ "data-slot": "kyc-data-card-header",
2765
+ "data-test-id": "kyc-data-card-header",
2766
+ className: "flex items-center justify-between gap-[var(--deframe-widget-size-gap-sm)] border-b border-[color:var(--deframe-widget-color-border-secondary)] px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-sm)]",
2767
+ children: [
2768
+ /* @__PURE__ */ jsxRuntime.jsx(
2769
+ "span",
2770
+ {
2771
+ "data-slot": "kyc-data-card-title",
2772
+ "data-test-id": "kyc-data-card-title",
2773
+ className: "text-[length:var(--deframe-widget-font-size-sm)] font-[var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)]",
2774
+ children: title
2775
+ }
2776
+ ),
2777
+ status && /* @__PURE__ */ jsxRuntime.jsx(KYCStatusBadge, { status, label: statusLabel, size: "compact" })
2778
+ ]
2779
+ }
2780
+ ),
2781
+ /* @__PURE__ */ jsxRuntime.jsx(
2782
+ "div",
2783
+ {
2784
+ "data-slot": "kyc-data-card-fields",
2785
+ "data-test-id": "kyc-data-card-fields",
2786
+ className: "flex flex-col gap-[var(--deframe-widget-size-gap-sm)] px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]",
2787
+ children: fields.map((field, index) => /* @__PURE__ */ jsxRuntime.jsx(
2788
+ KYCInfoRow,
2789
+ {
2790
+ label: field.label,
2791
+ value: field.value,
2792
+ divider: index < fields.length - 1
2793
+ },
2794
+ `${field.label}-${index}`
2795
+ ))
2796
+ }
2797
+ ),
2798
+ action && /* @__PURE__ */ jsxRuntime.jsx(
2799
+ "div",
2800
+ {
2801
+ "data-slot": "kyc-data-card-action",
2802
+ "data-test-id": "kyc-data-card-action",
2803
+ className: "border-t border-[color:var(--deframe-widget-color-border-secondary)] px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-sm)]",
2804
+ children: action
2805
+ }
2806
+ )
2807
+ ]
2808
+ }
2809
+ );
2810
+ }
2811
+ var PANEL_DEFAULTS = {
2812
+ verified: {
2813
+ title: "Identidade verificada",
2814
+ description: "Seus dados foram validados com sucesso. Voc\xEA tem acesso completo \xE0 plataforma.",
2815
+ glow: "color-mix(in srgb, var(--deframe-widget-color-state-success) 12%, transparent)",
2816
+ glow2: "color-mix(in srgb, var(--deframe-widget-color-state-success) 22%, transparent)"
2817
+ },
2818
+ reviewing: {
2819
+ title: "Em an\xE1lise",
2820
+ description: "Estamos verificando seus documentos. Isso pode levar at\xE9 2 dias \xFAteis.",
2821
+ glow: "color-mix(in srgb, var(--deframe-widget-color-state-warning) 12%, transparent)",
2822
+ glow2: "color-mix(in srgb, var(--deframe-widget-color-state-warning) 22%, transparent)"
2823
+ },
2824
+ pending: {
2825
+ title: "Verifica\xE7\xE3o pendente",
2826
+ description: "Complete o processo de verifica\xE7\xE3o de identidade para liberar todas as funcionalidades.",
2827
+ glow: "color-mix(in srgb, var(--deframe-widget-color-state-warning) 12%, transparent)",
2828
+ glow2: "color-mix(in srgb, var(--deframe-widget-color-state-warning) 22%, transparent)"
2829
+ },
2830
+ rejected: {
2831
+ title: "Verifica\xE7\xE3o rejeitada",
2832
+ description: "N\xE3o foi poss\xEDvel validar seus dados. Revise as informa\xE7\xF5es e tente novamente.",
2833
+ glow: "color-mix(in srgb, var(--deframe-widget-color-state-error) 12%, transparent)",
2834
+ glow2: "color-mix(in srgb, var(--deframe-widget-color-state-error) 22%, transparent)"
2835
+ },
2836
+ expired: {
2837
+ title: "Sess\xE3o expirada",
2838
+ description: "O tempo para concluir a verifica\xE7\xE3o expirou. Voc\xEA pode reiniciar o processo.",
2839
+ glow: "color-mix(in srgb, var(--deframe-widget-color-state-warning) 12%, transparent)",
2840
+ glow2: "color-mix(in srgb, var(--deframe-widget-color-state-warning) 22%, transparent)"
2841
+ }
2842
+ };
2843
+ function StatusIcon({ status }) {
2844
+ if (status === "verified") {
2845
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "36", height: "36", viewBox: "0 0 44 44", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10 22l9 9L34 14", stroke: "currentColor", strokeWidth: "3.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
2846
+ }
2847
+ if (status === "reviewing") {
2848
+ return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "36", height: "36", viewBox: "0 0 44 44", fill: "none", "aria-hidden": "true", children: [
2849
+ /* @__PURE__ */ jsxRuntime.jsx("ellipse", { cx: "22", cy: "22", rx: "14", ry: "9", stroke: "currentColor", strokeWidth: "3" }),
2850
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "22", cy: "22", r: "4", fill: "currentColor" })
2851
+ ] });
2852
+ }
2853
+ if (status === "pending" || status === "expired") {
2854
+ return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "36", height: "36", viewBox: "0 0 44 44", fill: "none", "aria-hidden": "true", children: [
2855
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "22", cy: "22", r: "14", stroke: "currentColor", strokeWidth: "3" }),
2856
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M22 14v9l5 4", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round" })
2857
+ ] });
2858
+ }
2859
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "36", height: "36", viewBox: "0 0 44 44", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M14 14l16 16M30 14L14 30", stroke: "currentColor", strokeWidth: "3.5", strokeLinecap: "round" }) });
2860
+ }
2861
+ function KYCStatusPanel({
2862
+ status,
2863
+ title,
2864
+ description,
2865
+ action,
2866
+ className
2867
+ }) {
2868
+ const defaults = PANEL_DEFAULTS[status];
2869
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2870
+ "div",
2871
+ {
2872
+ "data-slot": "kyc-status-panel",
2873
+ "data-test-id": "kyc-status-panel",
2874
+ "data-status": status,
2875
+ className: tailwindMerge.twMerge(
2876
+ "flex w-full flex-col items-center gap-[var(--deframe-widget-size-gap-lg)] px-[var(--deframe-widget-size-padding-x-lg)] py-[var(--deframe-widget-size-padding-y-lg)] text-center",
2877
+ className
2878
+ ),
2879
+ children: [
2880
+ /* @__PURE__ */ jsxRuntime.jsx(
2881
+ "div",
2882
+ {
2883
+ "data-slot": "kyc-status-panel-icon",
2884
+ "data-test-id": "kyc-status-panel-icon",
2885
+ className: "flex h-[64px] w-[64px] shrink-0 items-center justify-center rounded-[var(--deframe-widget-size-radius-full)]",
2886
+ style: {
2887
+ color: `var(--deframe-widget-color-state-${status === "verified" ? "success" : status === "rejected" ? "error" : "warning"})`,
2888
+ background: defaults.glow,
2889
+ boxShadow: `0 0 0 7px ${defaults.glow}, 0 0 24px ${defaults.glow2}`
2890
+ },
2891
+ children: /* @__PURE__ */ jsxRuntime.jsx(StatusIcon, { status })
2892
+ }
2893
+ ),
2894
+ /* @__PURE__ */ jsxRuntime.jsxs(
2895
+ "div",
2896
+ {
2897
+ "data-slot": "kyc-status-panel-text",
2898
+ "data-test-id": "kyc-status-panel-text",
2899
+ className: "flex flex-col gap-[var(--deframe-widget-size-gap-xs)]",
2900
+ children: [
2901
+ /* @__PURE__ */ jsxRuntime.jsx(
2902
+ "h2",
2903
+ {
2904
+ "data-slot": "kyc-status-panel-title",
2905
+ "data-test-id": "kyc-status-panel-title",
2906
+ className: "text-[length:var(--deframe-widget-font-size-lg)] font-[var(--deframe-widget-font-weight-semibold)] leading-[var(--deframe-widget-font-leading-lg)] text-[color:var(--deframe-widget-color-text-primary)]",
2907
+ children: title != null ? title : defaults.title
2908
+ }
2909
+ ),
2910
+ /* @__PURE__ */ jsxRuntime.jsx(
2911
+ "p",
2912
+ {
2913
+ "data-slot": "kyc-status-panel-description",
2914
+ "data-test-id": "kyc-status-panel-description",
2915
+ className: "max-w-[320px] text-[length:var(--deframe-widget-font-size-sm)] leading-[var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-tertiary)]",
2916
+ children: description != null ? description : defaults.description
2917
+ }
2918
+ )
2919
+ ]
2920
+ }
2921
+ ),
2922
+ action && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "kyc-status-panel-action", "data-test-id": "kyc-status-panel-action", children: action })
2923
+ ]
2924
+ }
2925
+ );
2926
+ }
2927
+ function renderKYCActionButton(action, index) {
2928
+ const ButtonComponent = action.variant === "secondary" ? SecondaryButton : PrimaryButton;
2929
+ const button = /* @__PURE__ */ jsxRuntime.jsx(
2930
+ ButtonComponent,
2931
+ __spreadProps(__spreadValues({
2932
+ className: tailwindMerge.twMerge("h-12 py-0", action.className)
2933
+ }, action.buttonProps), {
2934
+ children: action.label
2935
+ }),
2936
+ index
2937
+ );
2938
+ if (action.href) {
2939
+ return /* @__PURE__ */ jsxRuntime.jsx("a", { href: action.href, className: "w-full", children: button }, index);
2940
+ }
2941
+ return button;
2942
+ }
2943
+ function KYCActionRow({ actions, className }) {
2944
+ if (actions.length === 0) return null;
2945
+ return /* @__PURE__ */ jsxRuntime.jsx(
2946
+ "div",
2947
+ {
2948
+ "data-slot": "kyc-action-row",
2949
+ "data-test-id": "kyc-action-row",
2950
+ className: tailwindMerge.twMerge(
2951
+ actions.length === 1 ? "flex w-full" : "flex w-full gap-[var(--deframe-widget-size-gap-sm)]",
2952
+ className
2953
+ ),
2954
+ children: actions.map((action, index) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1", children: renderKYCActionButton(action, index) }, index))
2955
+ }
2956
+ );
2957
+ }
2958
+ function KYCChecklistItem({ icon, label, description }) {
2959
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2960
+ "div",
2961
+ {
2962
+ "data-slot": "kyc-checklist-item",
2963
+ "data-test-id": "kyc-checklist-item",
2964
+ className: "flex items-center gap-[var(--deframe-widget-size-gap-sm)]",
2965
+ children: [
2966
+ /* @__PURE__ */ jsxRuntime.jsx(
2967
+ "div",
2968
+ {
2969
+ className: "flex h-[32px] w-[32px] shrink-0 items-center justify-center rounded-[var(--deframe-widget-size-radius-sm)]",
2970
+ style: {
2971
+ background: "color-mix(in srgb, var(--deframe-widget-color-brand-primary) 10%, transparent)",
2972
+ color: "var(--deframe-widget-color-brand-primary)"
2973
+ },
2974
+ children: icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex shrink-0 items-center justify-center text-[length:var(--deframe-widget-font-size-md)] text-[color:var(--deframe-widget-color-brand-primary)]", children: icon }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-[6px] w-[6px] rounded-full bg-[color:var(--deframe-widget-color-brand-primary)]" })
2975
+ }
2976
+ ),
2977
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-[2px]", children: [
2978
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[length:var(--deframe-widget-font-size-sm)] font-[var(--deframe-widget-font-weight-medium)] text-[color:var(--deframe-widget-color-text-secondary)]", children: label }),
2979
+ description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[length:var(--deframe-widget-font-size-xs)] text-[color:var(--deframe-widget-color-text-tertiary)]", children: description })
2980
+ ] })
2981
+ ]
2982
+ }
2983
+ );
2984
+ }
2985
+ function KYCChecklistCard({ items, className }) {
2986
+ return /* @__PURE__ */ jsxRuntime.jsx(
2987
+ "div",
2988
+ {
2989
+ "data-slot": "kyc-checklist-card",
2990
+ "data-test-id": "kyc-checklist-card",
2991
+ className: tailwindMerge.twMerge(
2992
+ "overflow-hidden rounded-[var(--deframe-widget-size-radius-md)] border border-[color:var(--deframe-widget-color-border-secondary)] bg-[color:var(--deframe-widget-color-bg-secondary)]",
2993
+ className
2994
+ ),
2995
+ children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
2996
+ "div",
2997
+ {
2998
+ className: tailwindMerge.twMerge(
2999
+ "px-[var(--deframe-widget-size-padding-x-md)] py-[12px]",
3000
+ index < items.length - 1 && "border-b border-[color:var(--deframe-widget-color-border-secondary)]"
3001
+ ),
3002
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3003
+ KYCChecklistItem,
3004
+ {
3005
+ icon: item.icon,
3006
+ label: item.label,
3007
+ description: item.description
3008
+ }
3009
+ )
3010
+ },
3011
+ index
3012
+ ))
3013
+ }
3014
+ );
3015
+ }
3016
+ function KYCFieldMessage({
3017
+ tone = "error",
3018
+ children,
3019
+ className,
3020
+ testId
3021
+ }) {
3022
+ return /* @__PURE__ */ jsxRuntime.jsx(
3023
+ "p",
3024
+ {
3025
+ "data-slot": "kyc-field-message",
3026
+ "data-test-id": testId != null ? testId : "kyc-field-message",
3027
+ className: tailwindMerge.twMerge(
3028
+ "text-[length:var(--deframe-widget-font-size-xs)] leading-[var(--deframe-widget-font-leading-sm)]",
3029
+ tone === "error" ? "text-[color:var(--deframe-widget-color-state-error)]" : "text-[color:var(--deframe-widget-color-text-tertiary)]",
3030
+ className
3031
+ ),
3032
+ children
3033
+ }
3034
+ );
3035
+ }
3036
+ var bannerTheme = {
3037
+ info: {
3038
+ iconColor: "text-[color:var(--deframe-widget-color-state-info)]",
3039
+ icon: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
3040
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", strokeWidth: "1.5" }),
3041
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 7v4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
3042
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8", cy: "5.5", r: "0.75", fill: "currentColor" })
3043
+ ] })
3044
+ },
3045
+ success: {
3046
+ iconColor: "text-[color:var(--deframe-widget-color-state-success)]",
3047
+ icon: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
3048
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", strokeWidth: "1.5" }),
3049
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5 8l2.2 2.2L11 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
3050
+ ] })
3051
+ },
3052
+ warning: {
3053
+ iconColor: "text-[color:var(--deframe-widget-color-state-warning)]",
3054
+ icon: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
3055
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 2.5l5.5 10.25H2.5L8 2.5z", stroke: "currentColor", strokeWidth: "1.5", strokeLinejoin: "round" }),
3056
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 6v3.25", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
3057
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8", cy: "11.25", r: "0.75", fill: "currentColor" })
3058
+ ] })
3059
+ },
3060
+ error: {
3061
+ iconColor: "text-[color:var(--deframe-widget-color-state-error)]",
3062
+ icon: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
3063
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", strokeWidth: "1.5" }),
3064
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M5.5 5.5l5 5M10.5 5.5l-5 5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
3065
+ ] })
3066
+ }
3067
+ };
3068
+ function KYCMessageBanner({
3069
+ variant = "info",
3070
+ children,
3071
+ className,
3072
+ testId
3073
+ }) {
3074
+ const theme = bannerTheme[variant];
3075
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3076
+ "div",
3077
+ {
3078
+ "data-slot": "kyc-message-banner",
3079
+ "data-test-id": testId != null ? testId : "kyc-message-banner",
3080
+ className: tailwindMerge.twMerge(
3081
+ "flex items-start gap-[var(--deframe-widget-size-gap-sm)] rounded-[var(--deframe-widget-size-radius-md)] border px-[var(--deframe-widget-size-padding-x-sm)] py-[var(--deframe-widget-size-padding-y-sm)]",
3082
+ "border-[color:var(--deframe-widget-color-border-secondary)] bg-[color:var(--deframe-widget-color-bg-secondary)] text-[color:var(--deframe-widget-color-text-tertiary)]",
3083
+ className
3084
+ ),
3085
+ children: [
3086
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: tailwindMerge.twMerge("mt-[2px] shrink-0", theme.iconColor), children: theme.icon }),
3087
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[length:var(--deframe-widget-font-size-xs)] leading-[var(--deframe-widget-font-leading-sm)]", children })
3088
+ ]
3089
+ }
3090
+ );
3091
+ }
3092
+ function KYCStepIndicator({ total, current, className }) {
3093
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3094
+ "div",
3095
+ {
3096
+ "data-slot": "kyc-step-indicator",
3097
+ "data-test-id": "kyc-step-indicator",
3098
+ className: tailwindMerge.twMerge("flex items-center gap-[var(--deframe-widget-size-gap-xs)]", className),
3099
+ children: [
3100
+ Array.from({ length: total }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
3101
+ "div",
3102
+ {
3103
+ "data-slot": "kyc-step-dot",
3104
+ "data-test-id": `kyc-step-dot-${index + 1}`,
3105
+ className: tailwindMerge.twMerge(
3106
+ "h-[4px] rounded-[var(--deframe-widget-size-radius-full)] transition-all duration-300",
3107
+ index <= current ? "w-[24px] bg-[color:var(--deframe-widget-color-brand-primary)]" : "w-[16px] bg-[color:var(--deframe-widget-color-border-primary)]"
3108
+ )
3109
+ },
3110
+ index
3111
+ )),
3112
+ /* @__PURE__ */ jsxRuntime.jsxs(
3113
+ "span",
3114
+ {
3115
+ "data-slot": "kyc-step-label",
3116
+ "data-test-id": "kyc-step-label",
3117
+ className: "ml-[var(--deframe-widget-size-gap-xs)] text-[length:var(--deframe-widget-font-size-xs)] text-[color:var(--deframe-widget-color-text-tertiary)]",
3118
+ children: [
3119
+ current + 1,
3120
+ " de ",
3121
+ total
3122
+ ]
3123
+ }
3124
+ )
3125
+ ]
3126
+ }
3127
+ );
3128
+ }
3129
+ function IconButton({
3130
+ onClick,
3131
+ label,
3132
+ testId,
3133
+ children
3134
+ }) {
3135
+ if (!onClick) {
3136
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-9 w-9 shrink-0", "aria-hidden": "true" });
3137
+ }
3138
+ return /* @__PURE__ */ jsxRuntime.jsx(
3139
+ "button",
3140
+ {
3141
+ type: "button",
3142
+ "data-slot": testId,
3143
+ "data-test-id": testId,
3144
+ onClick,
3145
+ className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-[var(--deframe-widget-size-radius-sm)] border border-[color:var(--deframe-widget-color-border-secondary)] bg-[color:var(--deframe-widget-color-bg-secondary)] text-[color:var(--deframe-widget-color-text-secondary)] outline-none transition-[background,color] duration-150 hover:bg-[color:var(--deframe-widget-color-bg-tertiary)] hover:text-[color:var(--deframe-widget-color-text-primary)]",
3146
+ "aria-label": label,
3147
+ children
3148
+ }
3149
+ );
3150
+ }
3151
+ function KYCPageHeader({
3152
+ step,
3153
+ totalSteps,
3154
+ onBack,
3155
+ onClose,
3156
+ className
3157
+ }) {
3158
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3159
+ "div",
3160
+ {
3161
+ "data-slot": "kyc-page-header",
3162
+ "data-test-id": "kyc-page-header",
3163
+ className: tailwindMerge.twMerge(
3164
+ "flex items-center justify-between px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]",
3165
+ className
3166
+ ),
3167
+ children: [
3168
+ /* @__PURE__ */ jsxRuntime.jsx(IconButton, { onClick: onBack, label: "Voltar", testId: "kyc-back-button", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6z" }) }) }),
3169
+ typeof step === "number" && typeof totalSteps === "number" ? /* @__PURE__ */ jsxRuntime.jsx(KYCStepIndicator, { total: totalSteps, current: Math.max(step - 1, 0) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-9 flex-1", "aria-hidden": "true" }),
3170
+ /* @__PURE__ */ jsxRuntime.jsx(IconButton, { onClick: onClose, label: "Fechar", testId: "kyc-close-button", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6L6 18M6 6l12 12", strokeLinecap: "round" }) }) })
3171
+ ]
3172
+ }
3173
+ );
3174
+ }
3175
+ function KYCPageSection({ title, description, className }) {
3176
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3177
+ "div",
3178
+ {
3179
+ "data-slot": "kyc-page-section",
3180
+ "data-test-id": "kyc-page-section",
3181
+ className: tailwindMerge.twMerge("flex flex-col gap-[var(--deframe-widget-size-gap-xs)]", className),
3182
+ children: [
3183
+ /* @__PURE__ */ jsxRuntime.jsx(
3184
+ "h1",
3185
+ {
3186
+ "data-slot": "kyc-section-title",
3187
+ "data-test-id": "kyc-section-title",
3188
+ className: "text-[length:var(--deframe-widget-font-size-xl)] font-[var(--deframe-widget-font-weight-semibold)] leading-[var(--deframe-widget-font-leading-xl)] text-[color:var(--deframe-widget-color-text-primary)]",
3189
+ children: title
3190
+ }
3191
+ ),
3192
+ description && /* @__PURE__ */ jsxRuntime.jsx(
3193
+ "p",
3194
+ {
3195
+ "data-slot": "kyc-section-description",
3196
+ "data-test-id": "kyc-section-description",
3197
+ className: "text-[length:var(--deframe-widget-font-size-sm)] leading-[var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-tertiary)]",
3198
+ children: description
3199
+ }
3200
+ )
3201
+ ]
3202
+ }
3203
+ );
3204
+ }
3205
+ function ContinueKeyHandler(e) {
3206
+ var _a;
3207
+ if (e.key !== "Enter" || e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) return;
3208
+ const target = e.target;
3209
+ if (!target) return;
3210
+ const tag = (_a = target.tagName) == null ? void 0 : _a.toLowerCase();
3211
+ if (tag === "textarea" || target.isContentEditable || tag === "button") return;
3212
+ const root = e.currentTarget;
3213
+ const continueButton = root.querySelector('button[data-kyc-continue="true"]');
3214
+ if (!continueButton || continueButton.disabled) return;
3215
+ e.preventDefault();
3216
+ continueButton.click();
3217
+ }
3218
+ function KYCPageShell({ children, className, screenId, containerMode = "fullscreen" }) {
3219
+ return /* @__PURE__ */ jsxRuntime.jsx(
3220
+ "div",
3221
+ {
3222
+ "data-slot": "kyc-page-shell",
3223
+ "data-test-id": "kyc-page-shell",
3224
+ "data-kyc-screen": screenId,
3225
+ className: tailwindMerge.twMerge(
3226
+ "flex w-full max-w-[390px] flex-col",
3227
+ containerMode === "fullscreen" ? "min-h-[100svh] bg-[color:var(--deframe-widget-color-bg-primary)]" : "mx-auto my-[40px] min-h-[calc(100svh-160px)] overflow-hidden rounded-[var(--deframe-widget-size-radius-md)] border border-[color:var(--deframe-widget-color-border-secondary)] bg-[color:var(--deframe-widget-color-bg-secondary)] shadow-[0_20px_50px_rgba(17,20,27,0.12)]",
3228
+ className
3229
+ ),
3230
+ onKeyDownCapture: ContinueKeyHandler,
3231
+ children
3232
+ }
3233
+ );
3234
+ }
3235
+ function PageBody({
3236
+ children,
3237
+ className
3238
+ }) {
3239
+ return /* @__PURE__ */ jsxRuntime.jsx(
3240
+ "div",
3241
+ {
3242
+ className: [
3243
+ "flex flex-1 flex-col justify-between gap-[var(--deframe-widget-size-gap-xl)] px-[var(--deframe-widget-size-padding-x-md)] pb-[var(--deframe-widget-size-padding-y-xl)]",
3244
+ className
3245
+ ].filter(Boolean).join(" "),
3246
+ children
3247
+ }
3248
+ );
3249
+ }
3250
+ function KYCFormPage({
3251
+ screenId,
3252
+ onBack,
3253
+ onClose,
3254
+ step,
3255
+ totalSteps,
3256
+ title,
3257
+ description,
3258
+ children,
3259
+ banners = [],
3260
+ footer,
3261
+ actions = [],
3262
+ className,
3263
+ containerMode = "fullscreen"
3264
+ }) {
3265
+ return /* @__PURE__ */ jsxRuntime.jsxs(KYCPageShell, { screenId, className, containerMode, children: [
3266
+ /* @__PURE__ */ jsxRuntime.jsx(KYCPageHeader, { step, totalSteps, onBack, onClose }),
3267
+ /* @__PURE__ */ jsxRuntime.jsxs(PageBody, { children: [
3268
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-lg)]", children: [
3269
+ /* @__PURE__ */ jsxRuntime.jsx(KYCPageSection, { title, description }),
3270
+ /* @__PURE__ */ jsxRuntime.jsx(
3271
+ "div",
3272
+ {
3273
+ "data-slot": "kyc-form-page-content",
3274
+ "data-test-id": "kyc-form-page-content",
3275
+ className: "flex flex-col gap-[var(--deframe-widget-size-gap-md)]",
3276
+ children
3277
+ }
3278
+ )
3279
+ ] }),
3280
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-md)]", children: [
3281
+ banners.map((banner, index) => /* @__PURE__ */ jsxRuntime.jsx(
3282
+ KYCMessageBanner,
3283
+ {
3284
+ variant: banner.variant,
3285
+ testId: banner.testId,
3286
+ children: banner.children
3287
+ },
3288
+ index
3289
+ )),
3290
+ footer,
3291
+ /* @__PURE__ */ jsxRuntime.jsx(KYCActionRow, { actions })
3292
+ ] })
3293
+ ] })
3294
+ ] });
3295
+ }
3296
+ function CountrySelect() {
3297
+ const [value, setValue] = React6.useState("brasil");
3298
+ return /* @__PURE__ */ jsxRuntime.jsxs(Select, { value, onValueChange: setValue, children: [
3299
+ /* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { placeholder: "Selecione o pa\xEDs" }),
3300
+ /* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: "brasil", children: "Brasil" }) })
3301
+ ] });
3302
+ }
3303
+ function DefaultAddressLoadingContent() {
3304
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
3305
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: "100%", height: "48px", variant: "rect" }),
3306
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: "100%", height: "48px", variant: "rect" }),
3307
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[1fr_100px] gap-[var(--deframe-widget-size-gap-sm)]", children: [
3308
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: "100%", height: "48px", variant: "rect" }),
3309
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: "100%", height: "48px", variant: "rect" })
3310
+ ] }),
3311
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[1fr_100px] gap-[var(--deframe-widget-size-gap-sm)]", children: [
3312
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: "100%", height: "48px", variant: "rect" }),
3313
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: "100%", height: "48px", variant: "rect" })
3314
+ ] }),
3315
+ /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { width: "100%", height: "48px", variant: "rect" })
3316
+ ] });
3317
+ }
3318
+ function KYCAddressPage({
3319
+ screenId = "address",
3320
+ onBack,
3321
+ onClose,
3322
+ step = 4,
3323
+ totalSteps = 4,
3324
+ title = "Qual \xE9 o seu endere\xE7o?",
3325
+ description = "Digite o seu CEP e preencheremos o restante automaticamente.",
3326
+ cepField,
3327
+ streetField,
3328
+ cityField,
3329
+ stateField,
3330
+ complementField,
3331
+ countryField,
3332
+ numberField,
3333
+ isLoading = false,
3334
+ loadingContent,
3335
+ banners = [],
3336
+ actions,
3337
+ containerMode = "fullscreen",
3338
+ onNext
3339
+ }) {
3340
+ const defaultActions = actions != null ? actions : [
3341
+ {
3342
+ label: "Continuar",
3343
+ buttonProps: { onClick: onNext }
3344
+ }
3345
+ ];
3346
+ const fallbackFields = React6.useMemo(() => ({
3347
+ cepField: /* @__PURE__ */ jsxRuntime.jsxs(Input, { children: [
3348
+ /* @__PURE__ */ jsxRuntime.jsx(InputLabel, { htmlFor: "cep", children: "CEP" }),
3349
+ /* @__PURE__ */ jsxRuntime.jsx(InputField, { id: "cep", placeholder: "00000-000", inputMode: "numeric" })
3350
+ ] }),
3351
+ streetField: /* @__PURE__ */ jsxRuntime.jsxs(Input, { children: [
3352
+ /* @__PURE__ */ jsxRuntime.jsx(InputLabel, { htmlFor: "street", children: "Logradouro" }),
3353
+ /* @__PURE__ */ jsxRuntime.jsx(InputField, { id: "street", placeholder: "Rua, Avenida, etc.", autoComplete: "street-address" })
3354
+ ] }),
3355
+ cityField: /* @__PURE__ */ jsxRuntime.jsxs(Input, { children: [
3356
+ /* @__PURE__ */ jsxRuntime.jsx(InputLabel, { htmlFor: "city", children: "Cidade" }),
3357
+ /* @__PURE__ */ jsxRuntime.jsx(InputField, { id: "city", placeholder: "S\xE3o Paulo", autoComplete: "address-level2" })
3358
+ ] }),
3359
+ stateField: /* @__PURE__ */ jsxRuntime.jsxs(Input, { children: [
3360
+ /* @__PURE__ */ jsxRuntime.jsx(InputLabel, { htmlFor: "state", children: "Estado" }),
3361
+ /* @__PURE__ */ jsxRuntime.jsx(InputField, { id: "state", placeholder: "SP", maxLength: 2 })
3362
+ ] }),
3363
+ complementField: /* @__PURE__ */ jsxRuntime.jsxs(Input, { children: [
3364
+ /* @__PURE__ */ jsxRuntime.jsx(InputLabel, { htmlFor: "complement", children: "Complemento" }),
3365
+ /* @__PURE__ */ jsxRuntime.jsx(InputField, { id: "complement", placeholder: "Apto, Bloco (opcional)" })
3366
+ ] }),
3367
+ countryField: /* @__PURE__ */ jsxRuntime.jsxs(
3368
+ "div",
3369
+ {
3370
+ "data-slot": "kyc-country-field",
3371
+ "data-test-id": "kyc-country-field",
3372
+ className: "flex flex-col gap-[var(--deframe-widget-size-gap-xs)]",
3373
+ children: [
3374
+ /* @__PURE__ */ jsxRuntime.jsx(InputLabel, { htmlFor: "country", children: "Pa\xEDs" }),
3375
+ /* @__PURE__ */ jsxRuntime.jsx(CountrySelect, {})
3376
+ ]
3377
+ }
3378
+ )
3379
+ }), []);
3380
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3381
+ KYCFormPage,
3382
+ {
3383
+ screenId,
3384
+ onBack,
3385
+ onClose,
3386
+ step,
3387
+ totalSteps,
3388
+ title,
3389
+ description,
3390
+ banners,
3391
+ actions: defaultActions,
3392
+ containerMode,
3393
+ children: [
3394
+ cepField != null ? cepField : fallbackFields.cepField,
3395
+ isLoading ? loadingContent != null ? loadingContent : /* @__PURE__ */ jsxRuntime.jsx(DefaultAddressLoadingContent, {}) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3396
+ streetField != null ? streetField : fallbackFields.streetField,
3397
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[1fr_100px] gap-[var(--deframe-widget-size-gap-sm)]", "data-test-id": "kyc-address-row", children: [
3398
+ cityField != null ? cityField : fallbackFields.cityField,
3399
+ stateField != null ? stateField : fallbackFields.stateField
3400
+ ] }),
3401
+ (complementField != null ? complementField : fallbackFields.complementField) && numberField ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[1fr_100px] gap-[var(--deframe-widget-size-gap-sm)]", children: [
3402
+ complementField != null ? complementField : fallbackFields.complementField,
3403
+ numberField
3404
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3405
+ complementField != null ? complementField : fallbackFields.complementField,
3406
+ numberField && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full max-w-[100px]", children: numberField })
3407
+ ] }),
3408
+ countryField != null ? countryField : fallbackFields.countryField
3409
+ ] })
3410
+ ]
3411
+ }
3412
+ );
3413
+ }
3414
+ function KYCBasicDataPage(_a) {
3415
+ var _b = _a, {
3416
+ screenId = "basic-data",
3417
+ step = 1,
3418
+ totalSteps = 4,
3419
+ title = "Comece com seus dados b\xE1sicos",
3420
+ description = "Use seu CPF e telefone para iniciarmos a verifica\xE7\xE3o.",
3421
+ cpfField,
3422
+ phoneField
3423
+ } = _b, props = __objRest(_b, [
3424
+ "screenId",
3425
+ "step",
3426
+ "totalSteps",
3427
+ "title",
3428
+ "description",
3429
+ "cpfField",
3430
+ "phoneField"
3431
+ ]);
3432
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3433
+ KYCFormPage,
3434
+ __spreadProps(__spreadValues({
3435
+ screenId,
3436
+ step,
3437
+ totalSteps,
3438
+ title,
3439
+ description
3440
+ }, props), {
3441
+ children: [
3442
+ cpfField,
3443
+ phoneField
3444
+ ]
3445
+ })
3446
+ );
3447
+ }
3448
+ function KYCDocumentPage(_a) {
3449
+ var _b = _a, {
3450
+ screenId = "document",
3451
+ step = 2,
3452
+ totalSteps = 4,
3453
+ title = "Documento de identidade",
3454
+ description = "Escolha o tipo de documento que voc\xEA usar\xE1 para a verifica\xE7\xE3o.",
3455
+ checklistItems,
3456
+ documentOptions,
3457
+ selectedValue,
3458
+ onSelectValue,
3459
+ notice = "A pr\xF3xima etapa usar\xE1 um servi\xE7o externo de verifica\xE7\xE3o. Voc\xEA ser\xE1 redirecionado para tirar fotos do documento e uma selfie.",
3460
+ content
3461
+ } = _b, props = __objRest(_b, [
3462
+ "screenId",
3463
+ "step",
3464
+ "totalSteps",
3465
+ "title",
3466
+ "description",
3467
+ "checklistItems",
3468
+ "documentOptions",
3469
+ "selectedValue",
3470
+ "onSelectValue",
3471
+ "notice",
3472
+ "content"
3473
+ ]);
3474
+ const [internalSelectedValue, setInternalSelectedValue] = React6.useState("");
3475
+ const effectiveOptions = documentOptions != null ? documentOptions : DEFAULT_DOCUMENT_OPTIONS;
3476
+ const effectiveSelectedValue = selectedValue != null ? selectedValue : internalSelectedValue;
3477
+ const handleSelectValue = onSelectValue != null ? onSelectValue : setInternalSelectedValue;
3478
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3479
+ KYCFormPage,
3480
+ __spreadProps(__spreadValues({
3481
+ screenId,
3482
+ step,
3483
+ totalSteps,
3484
+ title,
3485
+ description
3486
+ }, props), {
3487
+ children: [
3488
+ Array.isArray(effectiveOptions) && effectiveOptions.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
3489
+ "div",
3490
+ {
3491
+ "data-slot": "kyc-document-type-list",
3492
+ "data-test-id": "kyc-document-type-list",
3493
+ "data-kyc-field": "documentType",
3494
+ className: "flex flex-col gap-[var(--deframe-widget-size-gap-sm)]",
3495
+ children: effectiveOptions.map(({ value, label, description: optionDescription }) => /* @__PURE__ */ jsxRuntime.jsx(
3496
+ ChoiceCard,
3497
+ {
3498
+ "data-kyc-choice-value": value,
3499
+ "data-kyc-choice-selected": effectiveSelectedValue === value ? "true" : "false",
3500
+ label,
3501
+ description: optionDescription,
3502
+ selected: effectiveSelectedValue === value,
3503
+ onClick: () => handleSelectValue(value)
3504
+ },
3505
+ value
3506
+ ))
3507
+ }
3508
+ ) : checklistItems && checklistItems.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(KYCChecklistCard, { items: checklistItems }) : null,
3509
+ notice && /* @__PURE__ */ jsxRuntime.jsxs(
3510
+ "div",
3511
+ {
3512
+ "data-slot": "kyc-idv-notice",
3513
+ "data-test-id": "kyc-idv-notice",
3514
+ className: "flex items-start gap-[var(--deframe-widget-size-gap-sm)] rounded-[var(--deframe-widget-size-radius-md)] border border-[color:var(--deframe-widget-color-border-secondary)] bg-[color:var(--deframe-widget-color-bg-secondary)] p-[var(--deframe-widget-size-padding-x-sm)]",
3515
+ children: [
3516
+ /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", className: "mt-[2px] shrink-0 text-[color:var(--deframe-widget-color-state-info)]", children: [
3517
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8", cy: "8", r: "6.5", stroke: "currentColor", strokeWidth: "1.5" }),
3518
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 7v4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
3519
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "8", cy: "5.5", r: "0.75", fill: "currentColor" })
3520
+ ] }),
3521
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[length:var(--deframe-widget-font-size-xs)] leading-[var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-tertiary)]", children: notice })
3522
+ ]
3523
+ }
3524
+ ),
3525
+ content
3526
+ ]
3527
+ })
3528
+ );
3529
+ }
3530
+ function KYCEditPage(_a) {
3531
+ var _b = _a, {
3532
+ screenId = "edit",
3533
+ title = "Editar informa\xE7\xF5es",
3534
+ fullNameField,
3535
+ dateOfBirthField,
3536
+ cpfField,
3537
+ phoneField,
3538
+ emailField
3539
+ } = _b, props = __objRest(_b, [
3540
+ "screenId",
3541
+ "title",
3542
+ "fullNameField",
3543
+ "dateOfBirthField",
3544
+ "cpfField",
3545
+ "phoneField",
3546
+ "emailField"
3547
+ ]);
3548
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3549
+ KYCFormPage,
3550
+ __spreadProps(__spreadValues({
3551
+ screenId,
3552
+ title
3553
+ }, props), {
3554
+ children: [
3555
+ fullNameField,
3556
+ dateOfBirthField,
3557
+ cpfField,
3558
+ phoneField,
3559
+ emailField
3560
+ ]
3561
+ })
3562
+ );
3563
+ }
3564
+ function KYCIntroPage({
3565
+ screenId = "intro",
3566
+ onClose,
3567
+ title = "Verifica\xE7\xE3o de identidade",
3568
+ description = "Para garantir a seguran\xE7a da plataforma, precisamos confirmar sua identidade. O processo leva cerca de 5 minutos.",
3569
+ checklistItems = DEFAULT_INTRO_CHECKLIST,
3570
+ banners = [],
3571
+ legalNotice,
3572
+ primaryAction = { label: "Come\xE7ar verifica\xE7\xE3o" },
3573
+ className,
3574
+ containerMode = "fullscreen"
3575
+ }) {
3576
+ return /* @__PURE__ */ jsxRuntime.jsxs(KYCPageShell, { screenId, containerMode, children: [
3577
+ onClose && /* @__PURE__ */ jsxRuntime.jsx(KYCPageHeader, { onClose }),
3578
+ /* @__PURE__ */ jsxRuntime.jsxs(
3579
+ "div",
3580
+ {
3581
+ "data-slot": "kyc-intro-page",
3582
+ "data-test-id": "kyc-intro-page",
3583
+ className: tailwindMerge.twMerge(
3584
+ "flex flex-1 flex-col items-center justify-between gap-[var(--deframe-widget-size-gap-xl)] px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-xl)]",
3585
+ className
3586
+ ),
3587
+ children: [
3588
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 flex-col items-center justify-center gap-[var(--deframe-widget-size-gap-lg)] text-center", children: [
3589
+ /* @__PURE__ */ jsxRuntime.jsx(
3590
+ "div",
3591
+ {
3592
+ "data-test-id": "kyc-intro-icon",
3593
+ className: "flex h-[64px] w-[64px] items-center justify-center rounded-[var(--deframe-widget-size-radius-full)]",
3594
+ style: {
3595
+ background: "color-mix(in srgb, var(--deframe-widget-color-brand-primary) 12%, transparent)",
3596
+ boxShadow: "0 0 0 7px color-mix(in srgb, var(--deframe-widget-color-brand-primary) 12%, transparent), 0 0 24px color-mix(in srgb, var(--deframe-widget-color-brand-primary) 22%, transparent)",
3597
+ color: "var(--deframe-widget-color-brand-primary)"
3598
+ },
3599
+ children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "36", height: "36", viewBox: "0 0 44 44", fill: "none", "aria-hidden": "true", children: [
3600
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "8", y: "10", width: "28", height: "20", rx: "3", stroke: "currentColor", strokeWidth: "3" }),
3601
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "22", cy: "20", r: "5", stroke: "currentColor", strokeWidth: "3" }),
3602
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 34c0-4 4.5-7 10-7s10 3 10 7", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round" })
3603
+ ] })
3604
+ }
3605
+ ),
3606
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-sm)]", children: [
3607
+ /* @__PURE__ */ jsxRuntime.jsx(
3608
+ "h1",
3609
+ {
3610
+ "data-test-id": "kyc-intro-title",
3611
+ className: "text-[length:var(--deframe-widget-font-size-xxl)] font-[var(--deframe-widget-font-weight-semibold)] leading-[var(--deframe-widget-font-leading-xl)] text-[color:var(--deframe-widget-color-text-primary)]",
3612
+ children: title
3613
+ }
3614
+ ),
3615
+ /* @__PURE__ */ jsxRuntime.jsx(
3616
+ "p",
3617
+ {
3618
+ "data-test-id": "kyc-intro-description",
3619
+ className: "max-w-[300px] text-[length:var(--deframe-widget-font-size-sm)] leading-[var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-tertiary)]",
3620
+ children: description
3621
+ }
3622
+ )
3623
+ ] }),
3624
+ /* @__PURE__ */ jsxRuntime.jsx(KYCChecklistCard, { items: checklistItems, className: "w-full max-w-[320px]" }),
3625
+ banners.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full max-w-[320px] flex-col gap-[var(--deframe-widget-size-gap-sm)]", children: banners.map((banner, index) => /* @__PURE__ */ jsxRuntime.jsx(
3626
+ KYCMessageBanner,
3627
+ {
3628
+ variant: banner.variant,
3629
+ testId: banner.testId,
3630
+ children: banner.children
3631
+ },
3632
+ index
3633
+ )) }),
3634
+ legalNotice && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-[320px] text-[length:var(--deframe-widget-font-size-xs)] leading-[var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-tertiary)]", children: legalNotice })
3635
+ ] }),
3636
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full", children: renderKYCActionButton(primaryAction, 0) })
3637
+ ]
3638
+ }
3639
+ )
3640
+ ] });
3641
+ }
3642
+ function KYCLoadingPage({
3643
+ screenId = "loading",
3644
+ onClose,
3645
+ title,
3646
+ description,
3647
+ note,
3648
+ className,
3649
+ containerMode = "fullscreen"
3650
+ }) {
3651
+ return /* @__PURE__ */ jsxRuntime.jsxs(KYCPageShell, { screenId, className, containerMode, children: [
3652
+ onClose && /* @__PURE__ */ jsxRuntime.jsx(KYCPageHeader, { onClose }),
3653
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 flex-col items-center justify-center gap-[var(--deframe-widget-size-gap-xl)] px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-xl)] text-center", children: [
3654
+ /* @__PURE__ */ jsxRuntime.jsx(
3655
+ "div",
3656
+ {
3657
+ className: "flex h-[72px] w-[72px] items-center justify-center rounded-[var(--deframe-widget-size-radius-full)]",
3658
+ style: {
3659
+ background: "color-mix(in srgb, var(--deframe-widget-color-brand-primary) 12%, transparent)",
3660
+ boxShadow: "0 0 0 7px color-mix(in srgb, var(--deframe-widget-color-brand-primary) 12%, transparent), 0 0 24px color-mix(in srgb, var(--deframe-widget-color-brand-primary) 22%, transparent)"
3661
+ },
3662
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-9 w-9 rounded-full border-[3px] border-[color:var(--deframe-widget-color-brand-primary)] border-t-transparent animate-spin" })
3663
+ }
3664
+ ),
3665
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-xs)]", children: [
3666
+ /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-[length:var(--deframe-widget-font-size-xl)] font-[var(--deframe-widget-font-weight-semibold)] leading-[var(--deframe-widget-font-leading-xl)] text-[color:var(--deframe-widget-color-text-primary)]", children: title }),
3667
+ description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[length:var(--deframe-widget-font-size-sm)] leading-[var(--deframe-widget-font-leading-sm)] text-[color:var(--deframe-widget-color-text-tertiary)]", children: description })
3668
+ ] }),
3669
+ note && /* @__PURE__ */ jsxRuntime.jsx(KYCMessageBanner, { variant: "info", children: note }),
3670
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-[length:var(--deframe-widget-font-size-xs)] text-[color:var(--deframe-widget-color-text-tertiary)]", children: [
3671
+ "Carregando ",
3672
+ /* @__PURE__ */ jsxRuntime.jsx(LoadingDots, {})
3673
+ ] })
3674
+ ] })
3675
+ ] });
3676
+ }
3677
+ function PageBody2({ children }) {
3678
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-1 flex-col justify-between gap-[var(--deframe-widget-size-gap-xl)] px-[var(--deframe-widget-size-padding-x-md)] pb-[var(--deframe-widget-size-padding-y-xl)]", children });
3679
+ }
3680
+ function KYCReviewPage({
3681
+ screenId = "review",
3682
+ onClose,
3683
+ step = 3,
3684
+ totalSteps = 4,
3685
+ title,
3686
+ description,
3687
+ cards,
3688
+ banners = [],
3689
+ actions = [],
3690
+ className,
3691
+ containerMode = "fullscreen"
3692
+ }) {
3693
+ return /* @__PURE__ */ jsxRuntime.jsxs(KYCPageShell, { screenId, className, containerMode, children: [
3694
+ /* @__PURE__ */ jsxRuntime.jsx(KYCPageHeader, { step, totalSteps, onClose }),
3695
+ /* @__PURE__ */ jsxRuntime.jsxs(PageBody2, { children: [
3696
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-lg)]", children: [
3697
+ /* @__PURE__ */ jsxRuntime.jsx(KYCPageSection, { title, description }),
3698
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-md)]", children: cards.map((card, index) => /* @__PURE__ */ jsxRuntime.jsx(KYCDataCard, __spreadValues({}, card), index)) })
3699
+ ] }),
3700
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-md)]", children: [
3701
+ banners.map((banner, index) => /* @__PURE__ */ jsxRuntime.jsx(
3702
+ KYCMessageBanner,
3703
+ {
3704
+ variant: banner.variant,
3705
+ testId: banner.testId,
3706
+ children: banner.children
3707
+ },
3708
+ index
3709
+ )),
3710
+ /* @__PURE__ */ jsxRuntime.jsx(KYCActionRow, { actions })
3711
+ ] })
3712
+ ] })
3713
+ ] });
3714
+ }
3715
+ function PageBody3({ children }) {
3716
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-1 flex-col justify-between gap-[var(--deframe-widget-size-gap-xl)] px-[var(--deframe-widget-size-padding-x-md)] pb-[var(--deframe-widget-size-padding-y-xl)]", children });
3717
+ }
3718
+ function KYCReviewPageSkeleton({
3719
+ screenId = "review-loading",
3720
+ onClose,
3721
+ step = 3,
3722
+ totalSteps = 4,
3723
+ containerMode = "fullscreen"
3724
+ }) {
3725
+ return /* @__PURE__ */ jsxRuntime.jsxs(KYCPageShell, { screenId, containerMode, children: [
3726
+ /* @__PURE__ */ jsxRuntime.jsx(KYCPageHeader, { step, totalSteps, onClose }),
3727
+ /* @__PURE__ */ jsxRuntime.jsxs(PageBody3, { children: [
3728
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-lg)]", children: [
3729
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-xs)]", children: [
3730
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-7 w-56 animate-pulse rounded bg-[color:var(--deframe-widget-color-bg-tertiary)]" }),
3731
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-40 animate-pulse rounded bg-[color:var(--deframe-widget-color-bg-tertiary)]" })
3732
+ ] }),
3733
+ [0, 1].map((card) => /* @__PURE__ */ jsxRuntime.jsx(
3734
+ "div",
3735
+ {
3736
+ className: "rounded-[var(--deframe-widget-size-radius-md)] border border-[color:var(--deframe-widget-color-border-secondary)] bg-[color:var(--deframe-widget-color-bg-secondary)] p-[var(--deframe-widget-size-padding-x-md)]",
3737
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-sm)]", children: [0, 1, 2].map((row) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4", children: [
3738
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-24 animate-pulse rounded bg-[color:var(--deframe-widget-color-bg-tertiary)]" }),
3739
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4 w-32 animate-pulse rounded bg-[color:var(--deframe-widget-color-bg-tertiary)]" })
3740
+ ] }, row)) })
3741
+ },
3742
+ card
3743
+ ))
3744
+ ] }),
3745
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-[var(--deframe-widget-size-gap-sm)]", children: [
3746
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-12 flex-1 animate-pulse rounded-[var(--deframe-widget-size-radius-xs)] bg-[color:var(--deframe-widget-color-bg-tertiary)]" }),
3747
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-12 flex-1 animate-pulse rounded-[var(--deframe-widget-size-radius-xs)] bg-[color:var(--deframe-widget-color-bg-tertiary)]" })
3748
+ ] })
3749
+ ] })
3750
+ ] });
3751
+ }
3752
+ function statusItemToneClasses(tone) {
3753
+ switch (tone) {
3754
+ case "success":
3755
+ return "text-[color:var(--deframe-widget-color-state-success)]";
3756
+ case "warning":
3757
+ return "text-[color:var(--deframe-widget-color-state-warning)]";
3758
+ case "error":
3759
+ return "text-[color:var(--deframe-widget-color-state-error)]";
3760
+ default:
3761
+ return "text-[color:var(--deframe-widget-color-text-secondary)]";
3762
+ }
3763
+ }
3764
+ function DefaultStatusItemIcon({ tone = "default" }) {
3765
+ const className = statusItemToneClasses(tone);
3766
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: tailwindMerge.twMerge("flex h-11 w-11 items-center justify-center rounded-[var(--deframe-widget-size-radius-sm)] bg-[color:var(--deframe-widget-color-bg-tertiary)]", className), children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
3767
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "10", cy: "10", r: "7.25", stroke: "currentColor", strokeWidth: "1.5" }),
3768
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10 6v4.5l2.5 1.75", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
3769
+ ] }) });
3770
+ }
3771
+ function KYCStatusItemCard({
3772
+ icon,
3773
+ title,
3774
+ description,
3775
+ tone = "default",
3776
+ testId,
3777
+ className
3778
+ }) {
3779
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3780
+ "div",
3781
+ {
3782
+ "data-slot": "kyc-status-item-card",
3783
+ "data-test-id": testId != null ? testId : "kyc-status-item-card",
3784
+ className: tailwindMerge.twMerge(
3785
+ "flex items-start gap-[var(--deframe-widget-size-gap-md)] rounded-[var(--deframe-widget-size-radius-md)] border border-[color:var(--deframe-widget-color-border-secondary)] bg-[color:var(--deframe-widget-color-bg-secondary)] px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]",
3786
+ className
3787
+ ),
3788
+ children: [
3789
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: icon != null ? icon : /* @__PURE__ */ jsxRuntime.jsx(DefaultStatusItemIcon, { tone }) }),
3790
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-[2px]", children: [
3791
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-[length:var(--deframe-widget-font-size-md)] font-[var(--deframe-widget-font-weight-semibold)] text-[color:var(--deframe-widget-color-text-primary)]", children: title }),
3792
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: tailwindMerge.twMerge("text-[length:var(--deframe-widget-font-size-sm)] leading-[var(--deframe-widget-font-leading-sm)]", statusItemToneClasses(tone)), children: description })
3793
+ ] })
3794
+ ]
3795
+ }
3796
+ );
3797
+ }
3798
+ function resolveCardStatus(status) {
3799
+ if (status === "verified") return "verified";
3800
+ if (status === "rejected") return "rejected";
3801
+ return "reviewing";
3802
+ }
3803
+ function KYCStatusPage({
3804
+ screenId = "pending",
3805
+ onClose,
3806
+ status,
3807
+ panelStatus,
3808
+ panelTitle,
3809
+ panelDescription,
3810
+ panelAction,
3811
+ items = [],
3812
+ cards,
3813
+ banners = [],
3814
+ actions = [],
3815
+ footer,
3816
+ className,
3817
+ containerMode = "fullscreen"
3818
+ }) {
3819
+ var _a;
3820
+ const effectiveStatus = (_a = panelStatus != null ? panelStatus : status) != null ? _a : "reviewing";
3821
+ const effectiveCards = cards != null ? cards : [{ status: resolveCardStatus(effectiveStatus), fields: DEFAULT_STATUS_FIELDS }];
3822
+ return /* @__PURE__ */ jsxRuntime.jsxs(KYCPageShell, { screenId, className, containerMode, children: [
3823
+ onClose && /* @__PURE__ */ jsxRuntime.jsx(KYCPageHeader, { onClose }),
3824
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 flex-col gap-[var(--deframe-widget-size-gap-md)] px-[var(--deframe-widget-size-padding-x-md)] py-[var(--deframe-widget-size-padding-y-md)]", children: [
3825
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-[var(--deframe-widget-size-radius-md)] border border-[color:var(--deframe-widget-color-border-secondary)] bg-[color:var(--deframe-widget-color-bg-secondary)]", children: /* @__PURE__ */ jsxRuntime.jsx(
3826
+ KYCStatusPanel,
3827
+ {
3828
+ status: effectiveStatus,
3829
+ title: panelTitle,
3830
+ description: panelDescription,
3831
+ action: panelAction
3832
+ }
3833
+ ) }),
3834
+ items.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-sm)]", children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(KYCStatusItemCard, __spreadValues({}, item), index)) }),
3835
+ effectiveCards.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-md)]", children: effectiveCards.map((card, index) => /* @__PURE__ */ jsxRuntime.jsx(KYCDataCard, __spreadValues({}, card), index)) }),
3836
+ banners.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-sm)]", children: banners.map((banner, index) => /* @__PURE__ */ jsxRuntime.jsx(
3837
+ KYCMessageBanner,
3838
+ {
3839
+ variant: banner.variant,
3840
+ testId: banner.testId,
3841
+ children: banner.children
3842
+ },
3843
+ index
3844
+ )) }),
3845
+ footer,
3846
+ actions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(KYCActionRow, { actions })
3847
+ ] })
3848
+ ] });
3849
+ }
2463
3850
  var gapClasses3 = {
2464
3851
  xs: "gap-[var(--deframe-widget-size-gap-xs)]",
2465
3852
  sm: "gap-[var(--deframe-widget-size-gap-sm)]",
@@ -15007,6 +16394,7 @@ exports.BackgroundContainer = BackgroundContainer;
15007
16394
  exports.BannerNotification = BannerNotification;
15008
16395
  exports.Chip = Chip;
15009
16396
  exports.ChipGroup = ChipGroup;
16397
+ exports.ChoiceCard = ChoiceCard;
15010
16398
  exports.ChooseANetworkView = ChooseANetworkView;
15011
16399
  exports.ChooseAStrategyActionsheetView = ChooseAStrategyActionsheetView;
15012
16400
  exports.ChooseAnAssetSwapView = ChooseAnAssetSwapView;
@@ -15091,7 +16479,33 @@ exports.InfoRowIconValue = InfoRowIconValue;
15091
16479
  exports.InfoRowWithIcon = InfoRowWithIcon;
15092
16480
  exports.InfoValue = InfoValue;
15093
16481
  exports.Input = Input2;
16482
+ exports.InputField = InputField;
16483
+ exports.InputLabel = InputLabel;
16484
+ exports.InputRoot = Input;
15094
16485
  exports.InvestmentCrossChainProcessingView = InvestmentCrossChainProcessingView;
16486
+ exports.KYCActionRow = KYCActionRow;
16487
+ exports.KYCAddressPage = KYCAddressPage;
16488
+ exports.KYCBasicDataPage = KYCBasicDataPage;
16489
+ exports.KYCChecklistCard = KYCChecklistCard;
16490
+ exports.KYCChecklistItem = KYCChecklistItem;
16491
+ exports.KYCDataCard = KYCDataCard;
16492
+ exports.KYCDocumentPage = KYCDocumentPage;
16493
+ exports.KYCEditPage = KYCEditPage;
16494
+ exports.KYCFieldMessage = KYCFieldMessage;
16495
+ exports.KYCFormPage = KYCFormPage;
16496
+ exports.KYCInfoRow = KYCInfoRow;
16497
+ exports.KYCIntroPage = KYCIntroPage;
16498
+ exports.KYCLoadingPage = KYCLoadingPage;
16499
+ exports.KYCMessageBanner = KYCMessageBanner;
16500
+ exports.KYCPageHeader = KYCPageHeader;
16501
+ exports.KYCPageSection = KYCPageSection;
16502
+ exports.KYCPageShell = KYCPageShell;
16503
+ exports.KYCReviewPage = KYCReviewPage;
16504
+ exports.KYCReviewPageSkeleton = KYCReviewPageSkeleton;
16505
+ exports.KYCStatusItemCard = KYCStatusItemCard;
16506
+ exports.KYCStatusPage = KYCStatusPage;
16507
+ exports.KYCStatusPanel = KYCStatusPanel;
16508
+ exports.KYCStepIndicator = KYCStepIndicator;
15095
16509
  exports.Label = Label;
15096
16510
  exports.Link = Link;
15097
16511
  exports.ListItem = ListItem;