@deframe-sdk/components 0.1.50 → 0.1.51
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.d.mts +23 -20
- package/dist/index.d.ts +23 -20
- package/dist/index.js +43 -33
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -33
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +18 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3130,8 +3130,8 @@ function KYCPageHeader({
|
|
|
3130
3130
|
onBack,
|
|
3131
3131
|
onClose,
|
|
3132
3132
|
className,
|
|
3133
|
-
backLabel,
|
|
3134
|
-
closeLabel
|
|
3133
|
+
backLabel = "Voltar",
|
|
3134
|
+
closeLabel = "Fechar"
|
|
3135
3135
|
}) {
|
|
3136
3136
|
return /* @__PURE__ */ jsxs(
|
|
3137
3137
|
"div",
|
|
@@ -3273,13 +3273,6 @@ function KYCFormPage({
|
|
|
3273
3273
|
] })
|
|
3274
3274
|
] });
|
|
3275
3275
|
}
|
|
3276
|
-
function CountrySelect() {
|
|
3277
|
-
const [value, setValue] = useState("brasil");
|
|
3278
|
-
return /* @__PURE__ */ jsxs(Select, { value, onValueChange: setValue, children: [
|
|
3279
|
-
/* @__PURE__ */ jsx(SelectTrigger, { placeholder: "Selecione o pa\xEDs" }),
|
|
3280
|
-
/* @__PURE__ */ jsx(SelectContent, { children: /* @__PURE__ */ jsx(SelectItem, { value: "brasil", children: "Brasil" }) })
|
|
3281
|
-
] });
|
|
3282
|
-
}
|
|
3283
3276
|
function DefaultAddressLoadingContent() {
|
|
3284
3277
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
3285
3278
|
/* @__PURE__ */ jsx(Skeleton, { width: "100%", height: "48px", variant: "rect" }),
|
|
@@ -3354,7 +3347,7 @@ function KYCAddressPage({
|
|
|
3354
3347
|
className: "flex flex-col gap-[var(--deframe-widget-size-gap-xs)]",
|
|
3355
3348
|
children: [
|
|
3356
3349
|
/* @__PURE__ */ jsx(InputLabel, { htmlFor: "country", children: "Pa\xEDs" }),
|
|
3357
|
-
/* @__PURE__ */ jsx(
|
|
3350
|
+
/* @__PURE__ */ jsx(InputField, { id: "country", value: "Brasil", disabled: true, readOnly: true })
|
|
3358
3351
|
]
|
|
3359
3352
|
}
|
|
3360
3353
|
)
|
|
@@ -3556,10 +3549,21 @@ function KYCIntroPage({
|
|
|
3556
3549
|
primaryAction,
|
|
3557
3550
|
className,
|
|
3558
3551
|
containerMode = "fullscreen",
|
|
3559
|
-
backLabel,
|
|
3560
|
-
closeLabel
|
|
3552
|
+
backLabel = "Voltar",
|
|
3553
|
+
closeLabel = "Fechar",
|
|
3554
|
+
visualVariant = "default"
|
|
3561
3555
|
}) {
|
|
3562
|
-
|
|
3556
|
+
const isCompact = visualVariant === "compact";
|
|
3557
|
+
const iconClasses = twMerge(
|
|
3558
|
+
"flex items-center justify-center text-[color:var(--deframe-widget-color-brand-primary)]",
|
|
3559
|
+
isCompact ? "h-[44px] w-[44px]" : [
|
|
3560
|
+
"h-[64px] w-[64px] rounded-[var(--deframe-widget-size-radius-full)]",
|
|
3561
|
+
"[background:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_12%,transparent)]",
|
|
3562
|
+
"[box-shadow: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)]"
|
|
3563
|
+
].join(" ")
|
|
3564
|
+
);
|
|
3565
|
+
const iconSize = isCompact ? 32 : 36;
|
|
3566
|
+
return /* @__PURE__ */ jsxs(KYCPageShell, { screenId, containerMode, className: isCompact ? "min-h-0" : void 0, children: [
|
|
3563
3567
|
onClose && /* @__PURE__ */ jsx(KYCPageHeader, { onClose, backLabel, closeLabel }),
|
|
3564
3568
|
/* @__PURE__ */ jsxs(
|
|
3565
3569
|
"div",
|
|
@@ -3576,13 +3580,8 @@ function KYCIntroPage({
|
|
|
3576
3580
|
"div",
|
|
3577
3581
|
{
|
|
3578
3582
|
"data-test-id": "kyc-intro-icon",
|
|
3579
|
-
className:
|
|
3580
|
-
|
|
3581
|
-
background: "color-mix(in srgb, var(--deframe-widget-color-brand-primary) 12%, transparent)",
|
|
3582
|
-
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)",
|
|
3583
|
-
color: "var(--deframe-widget-color-brand-primary)"
|
|
3584
|
-
},
|
|
3585
|
-
children: /* @__PURE__ */ jsxs("svg", { width: "36", height: "36", viewBox: "0 0 44 44", fill: "none", "aria-hidden": "true", children: [
|
|
3583
|
+
className: iconClasses,
|
|
3584
|
+
children: /* @__PURE__ */ jsxs("svg", { width: iconSize, height: iconSize, viewBox: "0 0 44 44", fill: "none", "aria-hidden": "true", children: [
|
|
3586
3585
|
/* @__PURE__ */ jsx("rect", { x: "8", y: "10", width: "28", height: "20", rx: "3", stroke: "currentColor", strokeWidth: "3" }),
|
|
3587
3586
|
/* @__PURE__ */ jsx("circle", { cx: "22", cy: "20", r: "5", stroke: "currentColor", strokeWidth: "3" }),
|
|
3588
3587
|
/* @__PURE__ */ jsx("path", { d: "M12 34c0-4 4.5-7 10-7s10 3 10 7", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round" })
|
|
@@ -3633,22 +3632,34 @@ function KYCLoadingPage({
|
|
|
3633
3632
|
note,
|
|
3634
3633
|
className,
|
|
3635
3634
|
containerMode = "fullscreen",
|
|
3636
|
-
backLabel,
|
|
3637
|
-
closeLabel,
|
|
3638
|
-
loadingLabel
|
|
3635
|
+
backLabel = "Voltar",
|
|
3636
|
+
closeLabel = "Fechar",
|
|
3637
|
+
loadingLabel = "Carregando",
|
|
3638
|
+
visualVariant = "default"
|
|
3639
3639
|
}) {
|
|
3640
|
-
|
|
3640
|
+
const isCompact = visualVariant === "compact";
|
|
3641
|
+
const loadingFrameClasses = twMerge(
|
|
3642
|
+
"flex items-center justify-center rounded-[var(--deframe-widget-size-radius-full)]",
|
|
3643
|
+
isCompact ? "h-12 w-12" : [
|
|
3644
|
+
"h-[72px] w-[72px]",
|
|
3645
|
+
"[background:color-mix(in_srgb,var(--deframe-widget-color-brand-primary)_12%,transparent)]",
|
|
3646
|
+
"[box-shadow: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)]"
|
|
3647
|
+
].join(" ")
|
|
3648
|
+
);
|
|
3649
|
+
const spinnerClasses = twMerge(
|
|
3650
|
+
"rounded-[var(--deframe-widget-size-radius-full)] border-[3px] border-[color:var(--deframe-widget-color-brand-primary)] border-t-transparent animate-spin",
|
|
3651
|
+
isCompact ? "h-10 w-10" : "h-9 w-9"
|
|
3652
|
+
);
|
|
3653
|
+
return /* @__PURE__ */ jsxs(KYCPageShell, { screenId, className: twMerge(isCompact && "min-h-0", className), containerMode, children: [
|
|
3641
3654
|
onClose && /* @__PURE__ */ jsx(KYCPageHeader, { onClose, backLabel, closeLabel }),
|
|
3642
3655
|
/* @__PURE__ */ 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: [
|
|
3643
3656
|
/* @__PURE__ */ jsx(
|
|
3644
3657
|
"div",
|
|
3645
3658
|
{
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
},
|
|
3651
|
-
children: /* @__PURE__ */ jsx("div", { className: "h-9 w-9 rounded-full border-[3px] border-[color:var(--deframe-widget-color-brand-primary)] border-t-transparent animate-spin" })
|
|
3659
|
+
"data-slot": "kyc-loading-indicator",
|
|
3660
|
+
"data-test-id": "kyc-loading-indicator",
|
|
3661
|
+
className: loadingFrameClasses,
|
|
3662
|
+
children: /* @__PURE__ */ jsx("div", { className: spinnerClasses })
|
|
3652
3663
|
}
|
|
3653
3664
|
),
|
|
3654
3665
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[var(--deframe-widget-size-gap-xs)]", children: [
|
|
@@ -3656,9 +3667,8 @@ function KYCLoadingPage({
|
|
|
3656
3667
|
description && /* @__PURE__ */ 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 })
|
|
3657
3668
|
] }),
|
|
3658
3669
|
note && /* @__PURE__ */ jsx(KYCMessageBanner, { variant: "info", children: note }),
|
|
3659
|
-
/* @__PURE__ */ jsxs("div", { className: "text-[length:var(--deframe-widget-font-size-xs)] text-[color:var(--deframe-widget-color-text-tertiary)]", children: [
|
|
3660
|
-
loadingLabel,
|
|
3661
|
-
" ",
|
|
3670
|
+
/* @__PURE__ */ jsxs("div", { className: "inline-flex items-center justify-center gap-[var(--deframe-widget-size-gap-xs)] text-[length:var(--deframe-widget-font-size-xs)] text-[color:var(--deframe-widget-color-text-tertiary)]", children: [
|
|
3671
|
+
/* @__PURE__ */ jsx("span", { children: loadingLabel }),
|
|
3662
3672
|
/* @__PURE__ */ jsx(LoadingDots, {})
|
|
3663
3673
|
] })
|
|
3664
3674
|
] })
|