@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.js
CHANGED
|
@@ -3351,30 +3351,38 @@ function PaywallCyclePicker({
|
|
|
3351
3351
|
anchorClassName
|
|
3352
3352
|
}) {
|
|
3353
3353
|
if (cycles.length < 2) return null;
|
|
3354
|
-
return /* @__PURE__ */ jsx32(
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3354
|
+
return /* @__PURE__ */ jsx32(
|
|
3355
|
+
"div",
|
|
3356
|
+
{
|
|
3357
|
+
role: "radiogroup",
|
|
3358
|
+
"aria-label": "Ciclo de cobran\xE7a",
|
|
3359
|
+
className: ["flex flex-row gap-2", className].filter(Boolean).join(" "),
|
|
3360
|
+
children: cycles.map((c) => {
|
|
3361
|
+
const active = c === selected;
|
|
3362
|
+
const label = c === "YEARLY" ? labels.annualLabel : labels.monthlyLabel;
|
|
3363
|
+
const suffix = c === "YEARLY" ? labels.annualSuffix : labels.monthlySuffix;
|
|
3364
|
+
const mainCents = c === "YEARLY" ? monthlyEquivByCycle[c] : priceCentsByCycle[c];
|
|
3365
|
+
const anchorCents = anchorCentsByCycle[c];
|
|
3366
|
+
return /* @__PURE__ */ jsxs19(
|
|
3367
|
+
"button",
|
|
3368
|
+
{
|
|
3369
|
+
type: "button",
|
|
3370
|
+
role: "radio",
|
|
3371
|
+
"aria-checked": active,
|
|
3372
|
+
onClick: () => onSelect(c),
|
|
3373
|
+
className: ["flex flex-col items-center gap-0.5", cardClassName, active ? cardSelectedClassName : ""].filter(Boolean).join(" "),
|
|
3374
|
+
children: [
|
|
3375
|
+
/* @__PURE__ */ jsx32("span", { className: "font-bold text-base leading-tight", children: formatBRL(mainCents) }),
|
|
3376
|
+
/* @__PURE__ */ jsx32("span", { className: "text-xs opacity-70 leading-tight", children: suffix }),
|
|
3377
|
+
/* @__PURE__ */ jsx32("span", { className: "text-xs opacity-60 leading-tight", children: label }),
|
|
3378
|
+
anchorCents != null && anchorCents > mainCents ? /* @__PURE__ */ jsx32("span", { className: anchorClassName ?? "text-xs opacity-50", children: /* @__PURE__ */ jsx32("s", { children: formatBRL(anchorCents) }) }) : null
|
|
3379
|
+
]
|
|
3380
|
+
},
|
|
3381
|
+
c
|
|
3382
|
+
);
|
|
3383
|
+
})
|
|
3384
|
+
}
|
|
3385
|
+
);
|
|
3378
3386
|
}
|
|
3379
3387
|
|
|
3380
3388
|
// src/components/paywall/PaywallCta.tsx
|