@hook-sdk/template 0.22.0 → 0.23.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/index.cjs +32 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +32 -24
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -3443,30 +3443,38 @@ function PaywallCyclePicker({
|
|
|
3443
3443
|
anchorClassName
|
|
3444
3444
|
}) {
|
|
3445
3445
|
if (cycles.length < 2) return null;
|
|
3446
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3447
|
+
"div",
|
|
3448
|
+
{
|
|
3449
|
+
role: "radiogroup",
|
|
3450
|
+
"aria-label": "Ciclo de cobran\xE7a",
|
|
3451
|
+
className: ["flex flex-row gap-2", className].filter(Boolean).join(" "),
|
|
3452
|
+
children: cycles.map((c) => {
|
|
3453
|
+
const active = c === selected;
|
|
3454
|
+
const label = c === "YEARLY" ? labels.annualLabel : labels.monthlyLabel;
|
|
3455
|
+
const suffix = c === "YEARLY" ? labels.annualSuffix : labels.monthlySuffix;
|
|
3456
|
+
const mainCents = c === "YEARLY" ? monthlyEquivByCycle[c] : priceCentsByCycle[c];
|
|
3457
|
+
const anchorCents = anchorCentsByCycle[c];
|
|
3458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
3459
|
+
"button",
|
|
3460
|
+
{
|
|
3461
|
+
type: "button",
|
|
3462
|
+
role: "radio",
|
|
3463
|
+
"aria-checked": active,
|
|
3464
|
+
onClick: () => onSelect(c),
|
|
3465
|
+
className: ["flex flex-col items-center gap-0.5", cardClassName, active ? cardSelectedClassName : ""].filter(Boolean).join(" "),
|
|
3466
|
+
children: [
|
|
3467
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "font-bold text-base leading-tight", children: formatBRL(mainCents) }),
|
|
3468
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-xs opacity-70 leading-tight", children: suffix }),
|
|
3469
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-xs opacity-60 leading-tight", children: label }),
|
|
3470
|
+
anchorCents != null && anchorCents > mainCents ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: anchorClassName ?? "text-xs opacity-50", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("s", { children: formatBRL(anchorCents) }) }) : null
|
|
3471
|
+
]
|
|
3472
|
+
},
|
|
3473
|
+
c
|
|
3474
|
+
);
|
|
3475
|
+
})
|
|
3476
|
+
}
|
|
3477
|
+
);
|
|
3470
3478
|
}
|
|
3471
3479
|
|
|
3472
3480
|
// src/components/paywall/PaywallCta.tsx
|