@hook-sdk/template 0.21.0 → 0.22.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 +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -390,7 +390,7 @@ function usePaywallState() {
|
|
|
390
390
|
const defaultMethod = (configDefault && methods.includes(configDefault) ? configDefault : null) ?? methods[0] ?? declaredMethods[0] ?? "card";
|
|
391
391
|
const [selectedMethodRaw, setSelectedMethod] = (0, import_react6.useState)(defaultMethod);
|
|
392
392
|
const selectedMethod = methods.includes(selectedMethodRaw) ? selectedMethodRaw : methods[0] ?? selectedMethodRaw;
|
|
393
|
-
const initialCycle = isFree ? "MONTHLY" : paywall.cycles[0] ?? "MONTHLY";
|
|
393
|
+
const initialCycle = isFree ? "MONTHLY" : paywall.cycles.includes("YEARLY") ? "YEARLY" : paywall.cycles[0] ?? "MONTHLY";
|
|
394
394
|
const [cycle, setCycle] = (0, import_react6.useState)(initialCycle);
|
|
395
395
|
const cpfRequired = !isFree && paywall.requiresCpf;
|
|
396
396
|
const [cpf, setCpf] = (0, import_react6.useState)("");
|
|
@@ -3456,12 +3456,12 @@ function PaywallCyclePicker({
|
|
|
3456
3456
|
role: "radio",
|
|
3457
3457
|
"aria-checked": active,
|
|
3458
3458
|
onClick: () => onSelect(c),
|
|
3459
|
-
className: [cardClassName, active ? cardSelectedClassName : ""].filter(Boolean).join(" "),
|
|
3459
|
+
className: ["flex flex-col items-center gap-0.5", cardClassName, active ? cardSelectedClassName : ""].filter(Boolean).join(" "),
|
|
3460
3460
|
children: [
|
|
3461
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("
|
|
3462
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: suffix }),
|
|
3463
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { children: label }),
|
|
3464
|
-
anchorCents != null && anchorCents > mainCents ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: anchorClassName, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("s", { children: formatBRL(anchorCents) }) }) : null
|
|
3461
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "font-bold text-base leading-tight", children: formatBRL(mainCents) }),
|
|
3462
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-xs opacity-70 leading-tight", children: suffix }),
|
|
3463
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-xs opacity-60 leading-tight", children: label }),
|
|
3464
|
+
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
|
|
3465
3465
|
]
|
|
3466
3466
|
},
|
|
3467
3467
|
c
|
|
@@ -3634,7 +3634,7 @@ function Paywall({
|
|
|
3634
3634
|
switchHint,
|
|
3635
3635
|
trustLine: copy.trustLine,
|
|
3636
3636
|
onClick: handleCta,
|
|
3637
|
-
disabled:
|
|
3637
|
+
disabled: s.submitting,
|
|
3638
3638
|
loading: s.submitting,
|
|
3639
3639
|
buttonClassName: ctaTheme,
|
|
3640
3640
|
switchHintClassName: themeClasses.switchHint,
|